From nobody Sun Sep 21 23:25:12 2025 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of seabios.org designates 78.46.105.101 as permitted sender) client-ip=78.46.105.101; envelope-from=seabios-bounces@seabios.org; helo=coreboot.org; Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of seabios.org designates 78.46.105.101 as permitted sender) smtp.mailfrom=seabios-bounces@seabios.org; dmarc=fail(p=none dis=none) header.from=flygoat.com Return-Path: Received: from coreboot.org (mail.coreboot.org [78.46.105.101]) by mx.zohomail.com with SMTPS id 1757391523597675.8111127682779; Mon, 8 Sep 2025 21:18:43 -0700 (PDT) Received: from authenticated-user (PRIMARY_HOSTNAME [PUBLIC_IP]) by coreboot.org (Postfix) with ESMTPA id 37FDF40448; Tue, 9 Sep 2025 04:18:41 +0000 (UTC) Received: from authenticated-user (PRIMARY_HOSTNAME [PUBLIC_IP]) (fhigh-b3-smtp.messagingengine.com [202.12.124.154]) by coreboot.org (Postfix) with ESMTP id 6D6D140293 for ; Tue, 9 Sep 2025 04:18:02 +0000 (UTC) Received: from authenticated-user (PRIMARY_HOSTNAME [PUBLIC_IP]) by mailfhigh.stl.internal (Postfix) with ESMTP id CF1E97A0171; Tue, 9 Sep 2025 00:18:00 -0400 (EDT) Received: from authenticated-user (PRIMARY_HOSTNAME [PUBLIC_IP]) by phl-compute-03.internal (MEProxy); Tue, 09 Sep 2025 00:18:00 -0400 Received: from authenticated-user (PRIMARY_HOSTNAME [PUBLIC_IP]) 9 Sep 2025 00:17:59 -0400 (EDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=flygoat.com; h= cc:cc:content-transfer-encoding:content-type:content-type:date :date:from:from:in-reply-to:in-reply-to:message-id:mime-version :references:reply-to:subject:subject:to:to; s=fm2; t=1757391480; x=1757477880; bh=/D4k+xdpBLnHgGg47/1XASBgV8Hn6yniMGf6rZtCfCg=; b= N2BR6cRsPzdvzdykQTGl7o4i+Gj6W/rPfGLHfr9uZdDQiztzCDf62wt+aezTmU7N TL3kTtiKgs40PbJ5CSJR4DkiGRImNjuLMAr9Y3zjAg36ID5wJpEEgBxKPXJLyUFv WGOwitULDygKAGVpRIDrvzusXLJ64jUc2UJyXPY4lbz9EObxBDGe4vD034sqOsYu HrFmKIcGdimuKVvw1iE+SyKdr5PZSMT7R1+eE3mBdymP4+qyp+gj8ontaeC3T/zg t8EKNAhcuSSjXb2yVqWg+a6bAmI1cMONvhYJK7O5WGK7GfAj0gcQISYmSLueldIK W25Pz1bZ8psV523XlukWDA== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-transfer-encoding :content-type:content-type:date:date:feedback-id:feedback-id :from:from:in-reply-to:in-reply-to:message-id:mime-version :references:reply-to:subject:subject:to:to:x-me-proxy :x-me-sender:x-me-sender:x-sasl-enc; s=fm1; t=1757391480; x= 1757477880; bh=/D4k+xdpBLnHgGg47/1XASBgV8Hn6yniMGf6rZtCfCg=; b=g fwXuQImfC49KmRoJayvaXjGjdqf8OpL+DfDzv9+qr30OHpGN950wekurCrIYpam5 Zk0TL0++lIHn8oSubFLWsjaVt6XmvqmElOVQ5BuINGuPS9/UYtwthVKC35IxdUUj c/MU5jMeTSDp3+6EjJNHLX28XhU1wZ7TkOQgqC/AN4r+5yr8IMduLvcF8208UeCB /WNjGrsTYwz0HCvQJsBLu8VfB6n3ejBzR4QDPYxowyYl1hAgNccLB1hUYvTBJ5R1 tgFpw/lasntnXG01x8q88CMTqXbu5by7Xkx6UY0vDJsHs5dYMzJTNiakZCSoLSRh IBBGvfdilcTGyQYgc80ng== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeeffedrtdeggdduleegfecutefuodetggdotefrod ftvfcurfhrohhfihhlvgemucfhrghsthforghilhdpuffrtefokffrpgfnqfghnecuuegr ihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenucfjug hrpefhfffugggtgffkfhgjvfevofesthekredtredtjeenucfhrhhomheplfhirgiguhhn ucgjrghnghcuoehjihgrgihunhdrhigrnhhgsehflhihghhorghtrdgtohhmqeenucggtf frrghtthgvrhhnpeevveetheeggfegjeekjedttdetueeludehveejgfejtedvhfdugeet gfelhfevkeenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfhhroh hmpehjihgrgihunhdrhigrnhhgsehflhihghhorghtrdgtohhmpdhnsggprhgtphhtthho peefpdhmohguvgepshhmthhpohhuthdprhgtphhtthhopehsvggrsghiohhssehsvggrsg hiohhsrdhorhhgpdhrtghpthhtohepjhhirgiguhhnrdihrghnghesfhhlhihgohgrthdr tghomhdprhgtphhtthhopehphhhilhhmugeslhhinhgrrhhordhorhhg X-ME-Proxy: Feedback-ID: ifd894703:Fastmail From: Jiaxun Yang Date: Tue, 09 Sep 2025 04:17:54 +0000 MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Message-Id: <20250909-build-v3-1-3128c8c8c3ad@flygoat.com> References: <20250909-build-v3-0-3128c8c8c3ad@flygoat.com> In-Reply-To: <20250909-build-v3-0-3128c8c8c3ad@flygoat.com> To: seabios@seabios.org Message-ID-Hash: 2U2TVXJOT24KZHMLXVQ3OM4CZ6JEJY3G X-Message-ID-Hash: 2U2TVXJOT24KZHMLXVQ3OM4CZ6JEJY3G X-MailFrom: jiaxun.yang@flygoat.com X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; loop; banned-address; header-match-seabios.seabios.org-0; header-match-seabios.seabios.org-1; emergency; member-moderation; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header CC: Jiaxun Yang , =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= X-Mailman-Version: 3.3.11b1 Precedence: list Subject: [SeaBIOS] [PATCH v3 1/9] Remove remaining ACPI tooling bits List-Id: SeaBIOS mailing list Archived-At: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: Content-Transfer-Encoding: quoted-printable Authentication-Results: coreboot.org; auth=pass smtp.auth=mailman@coreboot.org smtp.mailfrom=seabios-bounces@seabios.org X-Spamd-Bar: ---- X-ZohoMail-DKIM: fail (found 2 invalid signatures) X-ZM-MESSAGEID: 1757391525900124100 Builtin ACPI support was removed before. Now clean remaining tooling bits. Fixes: 35aa9a72c279 ("drop obsolete acpi table code") Signed-off-by: Jiaxun Yang Reviewed-by: Philippe Mathieu-Daud=C3=A9 --- Makefile | 3 +- scripts/acpi_extract.py | 366 ---------------------------------= ---- scripts/acpi_extract_preprocess.py | 41 ----- 3 files changed, 1 insertion(+), 409 deletions(-) diff --git a/Makefile b/Makefile index 4ccc2bee8129b1f1d49f61559533fdbdf6e1ddd8..01f42ec334591be5c6ed58c6bbe= 478de01f4b26d 100644 --- a/Makefile +++ b/Makefile @@ -24,7 +24,6 @@ OBJDUMP=3D$(CROSS_PREFIX)objdump STRIP=3D$(CROSS_PREFIX)strip PYTHON=3Dpython CPP=3Dcpp -IASL:=3Diasl LD32BIT_FLAG:=3D-melf_i386 =20 # Source files @@ -111,7 +110,7 @@ all: $(target-y) ################ Common build rules =20 # Verify the build environment works. -TESTGCC:=3D$(shell OUT=3D"$(OUT)" CC=3D"$(CC)" LD=3D"$(LD)" IASL=3D"$(IASL= )" scripts/test-build.sh) +TESTGCC:=3D$(shell OUT=3D"$(OUT)" CC=3D"$(CC)" LD=3D"$(LD)" scripts/test-b= uild.sh) ifeq "$(TESTGCC)" "-1" $(error "Please upgrade the build environment") endif diff --git a/scripts/acpi_extract.py b/scripts/acpi_extract.py deleted file mode 100755 index 3ed863b6a79412a1276bb905d08f92bd677e9e09..000000000000000000000000000= 0000000000000 --- a/scripts/acpi_extract.py +++ /dev/null @@ -1,366 +0,0 @@ -#!/usr/bin/python -# Copyright (C) 2011 Red Hat, Inc., Michael S. Tsirkin -# -# This file may be distributed under the terms of the GNU GPLv3 license. - -# Process mixed ASL/AML listing (.lst file) produced by iasl -l -# Locate and execute ACPI_EXTRACT directives, output offset info -#=20 -# Documentation of ACPI_EXTRACT_* directive tags: -#=20 -# These directive tags output offset information from AML for BIOS runtime -# table generation. -# Each directive is of the form: -# ACPI_EXTRACT_ (...) -# and causes the extractor to create an array -# named with offset, in the generated AML, -# of an object of a given type in the following . -#=20 -# A directive must fit on a single code line. -#=20 -# Object type in AML is verified, a mismatch causes a build failure. -#=20 -# Directives and operators currently supported are: -# ACPI_EXTRACT_NAME_DWORD_CONST - extract a Dword Const object from Name() -# ACPI_EXTRACT_NAME_WORD_CONST - extract a Word Const object from Name() -# ACPI_EXTRACT_NAME_BYTE_CONST - extract a Byte Const object from Name() -# ACPI_EXTRACT_METHOD_STRING - extract a NameString from Method() -# ACPI_EXTRACT_NAME_STRING - extract a NameString from Name() -# ACPI_EXTRACT_PROCESSOR_START - start of Processor() block -# ACPI_EXTRACT_PROCESSOR_STRING - extract a NameString from Processor() -# ACPI_EXTRACT_PROCESSOR_END - offset at last byte of Processor() + 1 -# ACPI_EXTRACT_DEVICE_START - start of Device() block -# ACPI_EXTRACT_DEVICE_STRING - extract a NameString from Device() -# ACPI_EXTRACT_DEVICE_END - offset at last byte of Device() + 1 -# ACPI_EXTRACT_PKG_START - start of Package block -# -# ACPI_EXTRACT_ALL_CODE - create an array storing the generated AML byteco= de -#=20 -# ACPI_EXTRACT is not allowed anywhere else in code, except in comments. - -import re -import sys -import fileinput - -aml =3D [] -asl =3D [] -output =3D {} -debug =3D "" - -class asl_line: - line =3D None - lineno =3D None - aml_offset =3D None - -def die(diag): - sys.stderr.write("Error: %s; %s\n" % (diag, debug)) - sys.exit(1) - -#Store an ASL command, matching AML offset, and input line (for debugging) -def add_asl(lineno, line): - l =3D asl_line() - l.line =3D line - l.lineno =3D lineno - l.aml_offset =3D len(aml) - asl.append(l) - -#Store an AML byte sequence -#Verify that offset output by iasl matches # of bytes so far -def add_aml(offset, line): - o =3D int(offset, 16) - # Sanity check: offset must match size of code so far - if (o !=3D len(aml)): - die("Offset 0x%x !=3D 0x%x" % (o, len(aml))) - # Strip any trailing dots and ASCII dump after " - line =3D re.sub(r'\s*\.*\s*".*$', "", line) - # Strip traling whitespace - line =3D re.sub(r'\s+$', "", line) - # Strip leading whitespace - line =3D re.sub(r'^\s+', "", line) - # Split on whitespace - code =3D re.split(r'\s+', line) - for c in code: - # Require a legal hex number, two digits - if (not(re.search(r'^[0-9A-Fa-f][0-9A-Fa-f]$', c))): - die("Unexpected octet %s" % c) - aml.append(int(c, 16)) - -# Process aml bytecode array, decoding AML -def aml_pkglen_bytes(offset): - # PkgLength can be multibyte. Bits 8-7 give the # of extra bytes. - pkglenbytes =3D aml[offset] >> 6 - return pkglenbytes + 1 - -def aml_pkglen(offset): - pkgstart =3D offset - pkglenbytes =3D aml_pkglen_bytes(offset) - pkglen =3D aml[offset] & 0x3F - # If multibyte, first nibble only uses bits 0-3 - if ((pkglenbytes > 1) and (pkglen & 0x30)): - die("PkgLen bytes 0x%x but first nibble 0x%x expected 0x0X" % - (pkglen, pkglen)) - offset +=3D 1 - pkglenbytes -=3D 1 - for i in range(pkglenbytes): - pkglen |=3D aml[offset + i] << (i * 8 + 4) - if (len(aml) < pkgstart + pkglen): - die("PckgLen 0x%x at offset 0x%x exceeds AML size 0x%x" % - (pkglen, offset, len(aml))) - return pkglen - -# Given method offset, find its NameString offset -def aml_method_string(offset): - #0x14 MethodOp PkgLength NameString MethodFlags TermList - if (aml[offset] !=3D 0x14): - die( "Method offset 0x%x: expected 0x14 actual 0x%x" % - (offset, aml[offset])) - offset +=3D 1 - pkglenbytes =3D aml_pkglen_bytes(offset) - offset +=3D pkglenbytes - return offset - -# Given name offset, find its NameString offset -def aml_name_string(offset): - #0x08 NameOp NameString DataRef - if (aml[offset] !=3D 0x08): - die( "Name offset 0x%x: expected 0x08 actual 0x%x" % - (offset, aml[offset])) - offset +=3D 1 - # Block Name Modifier. Skip it. - if (aml[offset] =3D=3D 0x5c or aml[offset] =3D=3D 0x5e): - offset +=3D 1 - return offset - -# Given data offset, find 8 byte buffer offset -def aml_data_buffer8(offset): - #0x08 NameOp NameString DataRef - expect =3D [0x11, 0x0B, 0x0A, 0x08] - if (aml[offset:offset+4] !=3D expect): - die( "Name offset 0x%x: expected %s actual %s" % - (offset, aml[offset:offset+4], expect)) - return offset + len(expect) - -# Given data offset, find dword const offset -def aml_data_dword_const(offset): - #0x08 NameOp NameString DataRef - if (aml[offset] !=3D 0x0C): - die( "Name offset 0x%x: expected 0x0C actual 0x%x" % - (offset, aml[offset])) - return offset + 1 - -# Given data offset, find word const offset -def aml_data_word_const(offset): - #0x08 NameOp NameString DataRef - if (aml[offset] !=3D 0x0B): - die( "Name offset 0x%x: expected 0x0B actual 0x%x" % - (offset, aml[offset])) - return offset + 1 - -# Given data offset, find byte const offset -def aml_data_byte_const(offset): - #0x08 NameOp NameString DataRef - if (aml[offset] !=3D 0x0A): - die( "Name offset 0x%x: expected 0x0A actual 0x%x" % - (offset, aml[offset])) - return offset + 1 - -# Find name'd buffer8 -def aml_name_buffer8(offset): - return aml_data_buffer8(aml_name_string(offset) + 4) - -# Given name offset, find dword const offset -def aml_name_dword_const(offset): - return aml_data_dword_const(aml_name_string(offset) + 4) - -# Given name offset, find word const offset -def aml_name_word_const(offset): - return aml_data_word_const(aml_name_string(offset) + 4) - -# Given name offset, find byte const offset -def aml_name_byte_const(offset): - return aml_data_byte_const(aml_name_string(offset) + 4) - -def aml_device_start(offset): - #0x5B 0x82 DeviceOp PkgLength NameString - if ((aml[offset] !=3D 0x5B) or (aml[offset + 1] !=3D 0x82)): - die( "Name offset 0x%x: expected 0x5B 0x82 actual 0x%x 0x%x" % - (offset, aml[offset], aml[offset + 1])) - return offset - -def aml_device_string(offset): - #0x5B 0x82 DeviceOp PkgLength NameString - start =3D aml_device_start(offset) - offset +=3D 2 - pkglenbytes =3D aml_pkglen_bytes(offset) - offset +=3D pkglenbytes - return offset - -def aml_device_end(offset): - start =3D aml_device_start(offset) - offset +=3D 2 - pkglenbytes =3D aml_pkglen_bytes(offset) - pkglen =3D aml_pkglen(offset) - return offset + pkglen - -def aml_processor_start(offset): - #0x5B 0x83 ProcessorOp PkgLength NameString ProcID - if ((aml[offset] !=3D 0x5B) or (aml[offset + 1] !=3D 0x83)): - die( "Name offset 0x%x: expected 0x5B 0x83 actual 0x%x 0x%x" % - (offset, aml[offset], aml[offset + 1])) - return offset - -def aml_processor_string(offset): - #0x5B 0x83 ProcessorOp PkgLength NameString ProcID - start =3D aml_processor_start(offset) - offset +=3D 2 - pkglenbytes =3D aml_pkglen_bytes(offset) - offset +=3D pkglenbytes - return offset - -def aml_processor_end(offset): - start =3D aml_processor_start(offset) - offset +=3D 2 - pkglenbytes =3D aml_pkglen_bytes(offset) - pkglen =3D aml_pkglen(offset) - return offset + pkglen - -def aml_package_start(offset): - offset =3D aml_name_string(offset) + 4 - # 0x12 PkgLength NumElements PackageElementList - if (aml[offset] !=3D 0x12): - die( "Name offset 0x%x: expected 0x12 actual 0x%x" % - (offset, aml[offset])) - offset +=3D 1 - return offset + aml_pkglen_bytes(offset) + 1 - -def get_value_type(maxvalue): - #Use type large enough to fit the table - if (maxvalue >=3D 0x10000): - return "int" - elif (maxvalue >=3D 0x100): - return "short" - else: - return "char" - -def main(): - global debug - lineno =3D 0 - for line in fileinput.input(): - # Strip trailing newline - line =3D line.rstrip() - # line number and debug string to output in case of errors - lineno =3D lineno + 1 - debug =3D "input line %d: %s" % (lineno, line) - #ASL listing: space, then line#, then ...., then code - pasl =3D re.compile('^\s+([0-9]+)(:\s\s|\.\.\.\.)\s*') - m =3D pasl.search(line) - if (m): - add_asl(lineno, pasl.sub("", line)) - # AML listing: offset in hex, then ...., then code - paml =3D re.compile('^([0-9A-Fa-f]+)(:\s\s|\.\.\.\.)\s*') - m =3D paml.search(line) - if (m): - add_aml(m.group(1), paml.sub("", line)) - - # Now go over code - # Track AML offset of a previous non-empty ASL command - prev_aml_offset =3D -1 - for i in range(len(asl)): - debug =3D "input line %d: %s" % (asl[i].lineno, asl[i].line) - - l =3D asl[i].line - - # skip if not an extract directive - a =3D len(re.findall(r'ACPI_EXTRACT', l)) - if (not a): - # If not empty, store AML offset. Will be used for sanity chec= ks - # IASL seems to put {}. at random places in the listing. - # Ignore any non-words for the purpose of this test. - m =3D re.search(r'\w+', l) - if (m): - prev_aml_offset =3D asl[i].aml_offset - continue - - if (a > 1): - die("Expected at most one ACPI_EXTRACT per line, actual %d" % = a) - - mext =3D re.search(r''' - ^\s* # leading whitespace - /\*\s* # start C comment - (ACPI_EXTRACT_\w+) # directive: group(1) - \s+ # whitspace separates directive from array n= ame - (\w+) # array name: group(2) - \s*\*/ # end of C comment - \s*$ # trailing whitespace - ''', l, re.VERBOSE) - if (not mext): - die("Stray ACPI_EXTRACT in input") - - # previous command must have produced some AML, - # otherwise we are in a middle of a block - if (prev_aml_offset =3D=3D asl[i].aml_offset): - die("ACPI_EXTRACT directive in the middle of a block") - - directive =3D mext.group(1) - array =3D mext.group(2) - offset =3D asl[i].aml_offset - - if (directive =3D=3D "ACPI_EXTRACT_ALL_CODE"): - if array in output: - die("%s directive used more than once" % directive) - output[array] =3D aml - continue - if (directive =3D=3D "ACPI_EXTRACT_NAME_BUFFER8"): - offset =3D aml_name_buffer8(offset) - elif (directive =3D=3D "ACPI_EXTRACT_NAME_DWORD_CONST"): - offset =3D aml_name_dword_const(offset) - elif (directive =3D=3D "ACPI_EXTRACT_NAME_WORD_CONST"): - offset =3D aml_name_word_const(offset) - elif (directive =3D=3D "ACPI_EXTRACT_NAME_BYTE_CONST"): - offset =3D aml_name_byte_const(offset) - elif (directive =3D=3D "ACPI_EXTRACT_NAME_STRING"): - offset =3D aml_name_string(offset) - elif (directive =3D=3D "ACPI_EXTRACT_METHOD_STRING"): - offset =3D aml_method_string(offset) - elif (directive =3D=3D "ACPI_EXTRACT_DEVICE_START"): - offset =3D aml_device_start(offset) - elif (directive =3D=3D "ACPI_EXTRACT_DEVICE_STRING"): - offset =3D aml_device_string(offset) - elif (directive =3D=3D "ACPI_EXTRACT_DEVICE_END"): - offset =3D aml_device_end(offset) - elif (directive =3D=3D "ACPI_EXTRACT_PROCESSOR_START"): - offset =3D aml_processor_start(offset) - elif (directive =3D=3D "ACPI_EXTRACT_PROCESSOR_STRING"): - offset =3D aml_processor_string(offset) - elif (directive =3D=3D "ACPI_EXTRACT_PROCESSOR_END"): - offset =3D aml_processor_end(offset) - elif (directive =3D=3D "ACPI_EXTRACT_PKG_START"): - offset =3D aml_package_start(offset) - else: - die("Unsupported directive %s" % directive) - - if array not in output: - output[array] =3D [] - output[array].append(offset) - - debug =3D "at end of file" - - # Pretty print output - outstrs =3D ["/* DO NOT EDIT! This is an autogenerated file." - " See scripts/acpi_extract.py. */"] - for array in output.keys(): - otype =3D get_value_type(max(output[array])) - outstrs.append("static unsigned %s %s[] =3D {" % (otype, array)) - odata =3D [] - for value in output[array]: - odata.append("0x%02x" % value) - if len(odata) >=3D 8: - outstrs.append(" %s," % (', '.join(odata),)) - del odata[:] - outstrs.append(" %s" % (', '.join(odata),)) - outstrs.append('};') - outstrs.append('') - sys.stdout.write('\n'.join(outstrs)) - -if __name__ =3D=3D '__main__': - main() diff --git a/scripts/acpi_extract_preprocess.py b/scripts/acpi_extract_prep= rocess.py deleted file mode 100755 index 2698118406d97c164783335c7fb6cbfa6239183b..000000000000000000000000000= 0000000000000 --- a/scripts/acpi_extract_preprocess.py +++ /dev/null @@ -1,41 +0,0 @@ -#!/usr/bin/python -# Copyright (C) 2011 Red Hat, Inc., Michael S. Tsirkin -# -# This file may be distributed under the terms of the GNU GPLv3 license. - -# Read a preprocessed ASL listing and put each ACPI_EXTRACT -# directive in a comment, to make iasl skip it. -# We also put each directive on a new line, the machinery -# in scripts/acpi_extract.py requires this. - -import re -import sys -import fileinput - -def die(diag): - sys.stderr.write("Error: %s\n" % (diag)) - sys.exit(1) - -# Note: () around pattern make split return matched string as part of list -psplit =3D re.compile(r''' ( - \b # At word boundary - ACPI_EXTRACT_\w+ # directive - \s+ # some whitespace - \w+ # array name - )''', re.VERBOSE) - -lineno =3D 0 -for line in fileinput.input(): - # line number and debug string to output in case of errors - lineno =3D lineno + 1 - debug =3D "input line %d: %s" % (lineno, line.rstrip()) - - s =3D psplit.split(line) - # The way split works, each odd item is the matching ACPI_EXTRACT dire= ctive. - # Put each in a comment, and on a line by itself. - for i in range(len(s)): - if (i % 2): - sys.stdout.write("\n/* %s */\n" % s[i]) - else: - sys.stdout.write(s[i]) - --=20 2.43.0 _______________________________________________ SeaBIOS mailing list -- seabios@seabios.org To unsubscribe send an email to seabios-leave@seabios.org