| Submitter | Colin King |
|---|---|
| Date | May 25, 2012, 10:40 a.m. |
| Message ID | <1337942453-30224-5-git-send-email-colin.king@canonical.com> |
| Download | mbox | patch |
| Permalink | /patch/161280/ |
| State | Accepted |
| Headers | show |
Comments
On 05/25/2012 06:40 PM, Colin King wrote: > From: Colin Ian King<colin.king@canonical.com> > > Signed-off-by: Colin Ian King<colin.king@canonical.com> > --- > src/lib/src/fwts_iasl.c | 34 +++++++++++++++++++++++++++++++++- > 1 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 @@ > #include "fwts.h" > #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) > +/* > + * fwts_iasl_dump_aml_to_file() > + * write AML data of given length to file amlfile. > + */ > +static int fwts_iasl_dump_aml_to_file(fwts_framework *fw, > + const uint8_t *data, > + const int length, > + const char *amlfile) > { > int fd; > > @@ -51,6 +58,13 @@ static int fwts_iasl_dump_aml_to_file(fwts_framework *fw, const uint8_t *data, c > return FWTS_OK; > } > > +/* > + * fwts_iasl_disassemble_to_file() > + * Disassemble a given table and dump disassembly to a file. > + * For tables where there are multiple matches, e.g. SSDT, we > + * specify the Nth table with 'which'. > + * > + */ > int fwts_iasl_disassemble_to_file(fwts_framework *fw, > const char *tablename, > const int which, > @@ -83,6 +97,13 @@ int fwts_iasl_disassemble_to_file(fwts_framework *fw, > return FWTS_OK; > } > > +/* > + * fwts_iasl_disassemble() > + * Disassemble a given table and dump disassembly list of strings. > + * For tables where there are multiple matches, e.g. SSDT, we > + * specify the Nth table with 'which'. > + * > + */ > int fwts_iasl_disassemble(fwts_framework *fw, > const char *tablename, > const int which, > @@ -108,6 +129,11 @@ int fwts_iasl_disassemble(fwts_framework *fw, > return *iasl_output ? FWTS_OK : FWTS_ERROR; > } > > + > +/* > + * fwts_iasl_disassemble_all_to_file() > + * Disassemble DSDT and SSDT tables to separate files. > + */ > int fwts_iasl_disassemble_all_to_file(fwts_framework *fw) > { > int i; > @@ -133,6 +159,12 @@ int fwts_iasl_disassemble_all_to_file(fwts_framework *fw) > return FWTS_OK; > } > > +/* > + * fwts_iasl_reassemble() > + * given a ACPI table in 'data', lenth 'len, go and disassemble it > + * and re-assemble it. Dump the disassembly into list iasl_disassembly and > + * any re-assembly errors into list iasl_errors. > + */ > int fwts_iasl_reassemble(fwts_framework *fw, > const uint8_t *data, > const int len, Hi Colin, There are 2 trailing whitespace here. Applying: lib: fwts_iasl.c: add more comments /home/ivanhu/fwts/.git/rebase-apply/patch:33: trailing whitespace. * specify the Nth table with 'which'. /home/ivanhu/fwts/.git/rebase-apply/patch:47: trailing whitespace. * specify the Nth table with 'which'. warning: 2 lines add whitespace errors. Best regards, Ivan
On Fri, May 25, 2012 at 6:40 PM, Colin King <colin.king@canonical.com> wrote: > From: Colin Ian King <colin.king@canonical.com> > > Signed-off-by: Colin Ian King <colin.king@canonical.com> > --- > src/lib/src/fwts_iasl.c | 34 +++++++++++++++++++++++++++++++++- > 1 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 @@ > #include "fwts.h" > #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) > +/* > + * fwts_iasl_dump_aml_to_file() > + * write AML data of given length to file amlfile. > + */ > +static int fwts_iasl_dump_aml_to_file(fwts_framework *fw, > + const uint8_t *data, > + const int length, > + const char *amlfile) > { > int fd; > > @@ -51,6 +58,13 @@ static int fwts_iasl_dump_aml_to_file(fwts_framework *fw, const uint8_t *data, c > return FWTS_OK; > } > > +/* > + * fwts_iasl_disassemble_to_file() > + * Disassemble a given table and dump disassembly to a file. > + * For tables where there are multiple matches, e.g. SSDT, we > + * specify the Nth table with 'which'. > + * > + */ > int fwts_iasl_disassemble_to_file(fwts_framework *fw, > const char *tablename, > const int which, > @@ -83,6 +97,13 @@ int fwts_iasl_disassemble_to_file(fwts_framework *fw, > return FWTS_OK; > } > > +/* > + * fwts_iasl_disassemble() > + * Disassemble a given table and dump disassembly list of strings. > + * For tables where there are multiple matches, e.g. SSDT, we > + * specify the Nth table with 'which'. > + * > + */ > int fwts_iasl_disassemble(fwts_framework *fw, > const char *tablename, > const int which, > @@ -108,6 +129,11 @@ int fwts_iasl_disassemble(fwts_framework *fw, > return *iasl_output ? FWTS_OK : FWTS_ERROR; > } > > + > +/* > + * fwts_iasl_disassemble_all_to_file() > + * Disassemble DSDT and SSDT tables to separate files. > + */ > int fwts_iasl_disassemble_all_to_file(fwts_framework *fw) > { > int i; > @@ -133,6 +159,12 @@ int fwts_iasl_disassemble_all_to_file(fwts_framework *fw) > return FWTS_OK; > } > > +/* > + * fwts_iasl_reassemble() > + * given a ACPI table in 'data', lenth 'len, go and disassemble it > + * and re-assemble it. Dump the disassembly into list iasl_disassembly and > + * any re-assembly errors into list iasl_errors. > + */ > int fwts_iasl_reassemble(fwts_framework *fw, > const uint8_t *data, > const int len, > -- > 1.7.10 > Acked-by: Keng-Yu Lin <kengyu@canonical.com>
On 05/25/2012 06:40 PM, Colin King wrote: > From: Colin Ian King<colin.king@canonical.com> > > Signed-off-by: Colin Ian King<colin.king@canonical.com> > --- > src/lib/src/fwts_iasl.c | 34 +++++++++++++++++++++++++++++++++- > 1 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 @@ > #include "fwts.h" > #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) > +/* > + * fwts_iasl_dump_aml_to_file() > + * write AML data of given length to file amlfile. > + */ > +static int fwts_iasl_dump_aml_to_file(fwts_framework *fw, > + const uint8_t *data, > + const int length, > + const char *amlfile) > { > int fd; > > @@ -51,6 +58,13 @@ static int fwts_iasl_dump_aml_to_file(fwts_framework *fw, const uint8_t *data, c > return FWTS_OK; > } > > +/* > + * fwts_iasl_disassemble_to_file() > + * Disassemble a given table and dump disassembly to a file. > + * For tables where there are multiple matches, e.g. SSDT, we > + * specify the Nth table with 'which'. > + * > + */ > int fwts_iasl_disassemble_to_file(fwts_framework *fw, > const char *tablename, > const int which, > @@ -83,6 +97,13 @@ int fwts_iasl_disassemble_to_file(fwts_framework *fw, > return FWTS_OK; > } > > +/* > + * fwts_iasl_disassemble() > + * Disassemble a given table and dump disassembly list of strings. > + * For tables where there are multiple matches, e.g. SSDT, we > + * specify the Nth table with 'which'. > + * > + */ > int fwts_iasl_disassemble(fwts_framework *fw, > const char *tablename, > const int which, > @@ -108,6 +129,11 @@ int fwts_iasl_disassemble(fwts_framework *fw, > return *iasl_output ? FWTS_OK : FWTS_ERROR; > } > > + > +/* > + * fwts_iasl_disassemble_all_to_file() > + * Disassemble DSDT and SSDT tables to separate files. > + */ > int fwts_iasl_disassemble_all_to_file(fwts_framework *fw) > { > int i; > @@ -133,6 +159,12 @@ int fwts_iasl_disassemble_all_to_file(fwts_framework *fw) > return FWTS_OK; > } > > +/* > + * fwts_iasl_reassemble() > + * given a ACPI table in 'data', lenth 'len, go and disassemble it > + * and re-assemble it. Dump the disassembly into list iasl_disassembly and > + * any re-assembly errors into list iasl_errors. > + */ > int fwts_iasl_reassemble(fwts_framework *fw, > const uint8_t *data, > const int len, Acked-by: Ivan Hu<ivan.hu@canonical.com>
Patch
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 @@ #include "fwts.h" #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) +/* + * fwts_iasl_dump_aml_to_file() + * write AML data of given length to file amlfile. + */ +static int fwts_iasl_dump_aml_to_file(fwts_framework *fw, + const uint8_t *data, + const int length, + const char *amlfile) { int fd; @@ -51,6 +58,13 @@ static int fwts_iasl_dump_aml_to_file(fwts_framework *fw, const uint8_t *data, c return FWTS_OK; } +/* + * fwts_iasl_disassemble_to_file() + * Disassemble a given table and dump disassembly to a file. + * For tables where there are multiple matches, e.g. SSDT, we + * specify the Nth table with 'which'. + * + */ int fwts_iasl_disassemble_to_file(fwts_framework *fw, const char *tablename, const int which, @@ -83,6 +97,13 @@ int fwts_iasl_disassemble_to_file(fwts_framework *fw, return FWTS_OK; } +/* + * fwts_iasl_disassemble() + * Disassemble a given table and dump disassembly list of strings. + * For tables where there are multiple matches, e.g. SSDT, we + * specify the Nth table with 'which'. + * + */ int fwts_iasl_disassemble(fwts_framework *fw, const char *tablename, const int which, @@ -108,6 +129,11 @@ int fwts_iasl_disassemble(fwts_framework *fw, return *iasl_output ? FWTS_OK : FWTS_ERROR; } + +/* + * fwts_iasl_disassemble_all_to_file() + * Disassemble DSDT and SSDT tables to separate files. + */ int fwts_iasl_disassemble_all_to_file(fwts_framework *fw) { int i; @@ -133,6 +159,12 @@ int fwts_iasl_disassemble_all_to_file(fwts_framework *fw) return FWTS_OK; } +/* + * fwts_iasl_reassemble() + * given a ACPI table in 'data', lenth 'len, go and disassemble it + * and re-assemble it. Dump the disassembly into list iasl_disassembly and + * any re-assembly errors into list iasl_errors. + */ int fwts_iasl_reassemble(fwts_framework *fw, const uint8_t *data, const int len,