[prev in list] [next in list] [prev in thread] [next in thread] 

List:       fwts-devel
Subject:    Re: [PATCH 4/8] lib: fwts_iasl.c: add more comments
From:       Keng-Yu Lin <kengyu () canonical ! com>
Date:       2012-05-31 6:52:49
Message-ID: CADXHx7bQrgfad+uWUwgNLvTEoj7v1r4ONMsRLQAxUnYC4TjEng () mail ! gmail ! com
[Download RAW message or body]

On Fri, May 25, 2012 at 6:40 PM, Colin King <colin.king@canonical.com> wrot=
e:
> From: Colin Ian King <colin.king@canonical.com>
>
> Signed-off-by: Colin Ian King <colin.king@canonical.com>
> ---
> =C2=A0src/lib/src/fwts_iasl.c | =C2=A0 34 +++++++++++++++++++++++++++++++=
++-
> =C2=A01 file changed, 33 insertions(+), 1 deletion(-)
>
> diff --git a/src/lib/src/fwts_iasl.c b/src/lib/src/fwts_iasl.c
> index d75d997..e3ef36a 100644
> --- a/src/lib/src/fwts_iasl.c
> +++ b/src/lib/src/fwts_iasl.c
> @@ -30,7 +30,14 @@
> =C2=A0#include "fwts.h"
> =C2=A0#include "fwts_iasl_interface.h"
>
> -static int fwts_iasl_dump_aml_to_file(fwts_framework *fw, const uint8_t =
*data, const int length, const char *amlfile)
> +/*
> + * =C2=A0fwts_iasl_dump_aml_to_file()
> + * =C2=A0 =C2=A0 write AML data of given length to file amlfile.
> + */
> +static int fwts_iasl_dump_aml_to_file(fwts_framework *fw,
> + =C2=A0 =C2=A0 =C2=A0 const uint8_t *data,
> + =C2=A0 =C2=A0 =C2=A0 const int length,
> + =C2=A0 =C2=A0 =C2=A0 const char *amlfile)
> =C2=A0{
> =C2=A0 =C2=A0 =C2=A0 =C2=A0int fd;
>
> @@ -51,6 +58,13 @@ static int fwts_iasl_dump_aml_to_file(fwts_framework *=
fw, const uint8_t *data, c
> =C2=A0 =C2=A0 =C2=A0 =C2=A0return FWTS_OK;
> =C2=A0}
>
> +/*
> + * =C2=A0fwts_iasl_disassemble_to_file()
> + * =C2=A0 =C2=A0 Disassemble a given table and dump disassembly to a fil=
e.
> + * =C2=A0 =C2=A0 For tables where there are multiple matches, e.g. SSDT,=
 we
> + * =C2=A0 =C2=A0 specify the Nth table with 'which'.
> + *
> + */
> =C2=A0int fwts_iasl_disassemble_to_file(fwts_framework *fw,
> =C2=A0 =C2=A0 =C2=A0 =C2=A0const char *tablename,
> =C2=A0 =C2=A0 =C2=A0 =C2=A0const int which,
> @@ -83,6 +97,13 @@ int fwts_iasl_disassemble_to_file(fwts_framework *fw,
> =C2=A0 =C2=A0 =C2=A0 =C2=A0return FWTS_OK;
> =C2=A0}
>
> +/*
> + * =C2=A0fwts_iasl_disassemble()
> + * =C2=A0 =C2=A0 Disassemble a given table and dump disassembly list of =
strings.
> + * =C2=A0 =C2=A0 For tables where there are multiple matches, e.g. SSDT,=
 we
> + * =C2=A0 =C2=A0 specify the Nth table with 'which'.
> + *
> + */
> =C2=A0int fwts_iasl_disassemble(fwts_framework *fw,
> =C2=A0 =C2=A0 =C2=A0 =C2=A0const char *tablename,
> =C2=A0 =C2=A0 =C2=A0 =C2=A0const int which,
> @@ -108,6 +129,11 @@ int fwts_iasl_disassemble(fwts_framework *fw,
> =C2=A0 =C2=A0 =C2=A0 =C2=A0return *iasl_output ? FWTS_OK : FWTS_ERROR;
> =C2=A0}
>
> +
> +/*
> + * =C2=A0fwts_iasl_disassemble_all_to_file()
> + * =C2=A0 =C2=A0 Disassemble DSDT and SSDT tables to separate files.
> + */
> =C2=A0int fwts_iasl_disassemble_all_to_file(fwts_framework *fw)
> =C2=A0{
> =C2=A0 =C2=A0 =C2=A0 =C2=A0int i;
> @@ -133,6 +159,12 @@ int fwts_iasl_disassemble_all_to_file(fwts_framework=
 *fw)
> =C2=A0 =C2=A0 =C2=A0 =C2=A0return FWTS_OK;
> =C2=A0}
>
> +/*
> + * =C2=A0fwts_iasl_reassemble()
> + * =C2=A0 =C2=A0 given a ACPI table in 'data', lenth 'len, go and disass=
emble it
> + * =C2=A0 =C2=A0 and re-assemble it. =C2=A0Dump the disassembly into lis=
t iasl_disassembly and
> + * =C2=A0 =C2=A0 any re-assembly errors into list iasl_errors.
> + */
> =C2=A0int fwts_iasl_reassemble(fwts_framework *fw,
> =C2=A0 =C2=A0 =C2=A0 =C2=A0const uint8_t *data,
> =C2=A0 =C2=A0 =C2=A0 =C2=A0const int len,
> --
> 1.7.10
>
Acked-by: Keng-Yu Lin <kengyu@canonical.com>


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic