Re: [PATCH v6 2/4] x86/ucode: refactor xen-ucode to utilize getopt

2024-08-19 Thread Fouad Hilly
On Thu, Jul 25, 2024 at 9:41 AM Jan Beulich wrote: > On 25.07.2024 10:27, Fouad Hilly wrote: > > @@ -71,12 +72,29 @@ static void show_curr_cpu(FILE *f) > > } > > } > > > > +static void usage(FILE *stream, const char *name) > > +{ > > +fprintf(stream, > > +"%s: Xen microcode

Re: [PATCH v6 2/4] x86/ucode: refactor xen-ucode to utilize getopt

2024-07-25 Thread Jan Beulich
On 25.07.2024 10:27, Fouad Hilly wrote: > @@ -71,12 +72,29 @@ static void show_curr_cpu(FILE *f) > } > } > > +static void usage(FILE *stream, const char *name) > +{ > +fprintf(stream, > +"%s: Xen microcode updating tool\n" > +"options:\n" > +" -h, --

Re: [PATCH v6 2/4] x86/ucode: refactor xen-ucode to utilize getopt

2024-07-25 Thread Jan Beulich
On 25.07.2024 10:27, Fouad Hilly wrote: > @@ -71,12 +72,29 @@ static void show_curr_cpu(FILE *f) > } > } > > +static void usage(FILE *stream, const char *name) > +{ > +fprintf(stream, > +"%s: Xen microcode updating tool\n" > +"options:\n" > +" -h, --

[PATCH v6 2/4] x86/ucode: refactor xen-ucode to utilize getopt

2024-07-25 Thread Fouad Hilly
Use getopt_long() to handle command line arguments. Introduce ext_err for common exit with errors. Introducing usage() to handle usage\help messages in a common block. show_curr_cpu is printed to stdout only. Signed-off-by: Fouad Hilly --- [v6] 1- Update usage() printed message format: [microcode