ó Q[c@s_ddlZddlZddlZd„Zd„Zejjdƒr[edejƒndS(iÿÿÿÿNc Csx|jd|ƒd}t|dƒ}d}zÛ|jdƒ}xÅ|dkrt|ƒ}|d@dkr|d|}d}n|d|}|d ks¢|d kr¯|d }n|t|ƒ}|d}|d@dkró|jd ||fƒn|jdƒ}qAWWd x%t|d@dƒD]} |d}qW|d@dkr\|jd ||fƒn|jƒX|jdƒd S(sDump a single ACPI tables%s @ 0x00000000 itrbtiis %4.4x: s%2.2x i i~t.s%s %s Nis s (twritetopentreadtordtchrtrangetclose( tfilenamet tablenametouttntfthex_strtbytetvalt ascii_strti((s%/usr/share/apport/dump_acpi_tables.pytdump_acpi_tables2      cCsztj|ƒ}xd|D]\}tjj||ƒ}tj|ƒj}tj|ƒrbt||ƒqt|||ƒqWdS(sDump ACPI tablesN( tostlistdirtpathtjointstattst_modetS_ISDIRtdump_acpi_tablesR(RR ttablesR tpathnametmode((s%/usr/share/apport/dump_acpi_tables.pyR)s s/sys/firmware/acpi/tables(RtsysRRRRtisdirtstdout(((s%/usr/share/apport/dump_acpi_tables.pyts$ #