On 01.12.20 13:31, [ext] Silvano Cirujano Cuesta wrote: > Flag "output_to_file" not needed, since "envfilepath != NULL" only when > output to file requested. > > Signed-off-by: Silvano Cirujano Cuesta <[email protected]> > --- > tools/bg_setenv.c | 5 +---- > 1 file changed, 1 insertion(+), 4 deletions(-) > > diff --git a/tools/bg_setenv.c b/tools/bg_setenv.c > index 3d7329f..0395751 100644 > --- a/tools/bg_setenv.c > +++ b/tools/bg_setenv.c > @@ -53,7 +53,6 @@ static struct argp_option options_printenv[] = { > {0}}; > > struct arguments { > - bool output_to_file; > int which_part; > }; > > @@ -351,7 +350,6 @@ static error_t parse_opt(int key, char *arg, struct > argp_state *state) > (uint8_t *)arg, strlen(arg) + 1); > break; > case 'f': > - arguments->output_to_file = true; > res = asprintf(&envfilepath, "%s/%s", arg, FAT_ENV_FILENAME); > if (res == -1) { > return ENOMEM; > @@ -557,7 +555,6 @@ int main(int argc, char **argv) > } > > struct arguments arguments; > - arguments.output_to_file = false; > arguments.which_part = 0; > > STAILQ_INIT(&head); > @@ -573,7 +570,7 @@ int main(int argc, char **argv) > /* arguments are parsed, journal is filled */ > > /* is output to file ? */ > - if (arguments.output_to_file) { > + if (envfilepath) { > /* execute journal and write to file */ > BGENV env; > BG_ENVDATA data; >
Applied up to here. Thanks. Could you reorder patch 4 and 5 on top of current next? That would avoid adding code in one place, just to move it around in the next moment. Jan -- Siemens AG, T RDA IOT Corporate Competence Center Embedded Linux -- You received this message because you are subscribed to the Google Groups "EFI Boot Guard" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/efibootguard-dev/6c1e8a18-4447-93e2-e97c-0c5a74ce7e75%40siemens.com.
