On Fri, Apr 05, 2024 at 01:11:27PM +0100, Fouad Hilly wrote:
> diff --git a/tools/misc/xen-ucode.c b/tools/misc/xen-ucode.c
> index 1edcebfb9f9c..9bde991c5df5 100644
> --- a/tools/misc/xen-ucode.c
> +++ b/tools/misc/xen-ucode.c
> @@ -11,6 +11,7 @@
> #include
> #include
> #include
> +#include
On 05.04.2024 14:11, Fouad Hilly wrote:
> @@ -82,9 +86,16 @@ static void show_curr_cpu(FILE *f)
> int main(int argc, char *argv[])
> {
> int fd, ret;
> -char *filename, *buf;
> +char *filename = NULL, *buf;
Why?
> size_t len;
> struct stat st;
> +int opt;
> +
> +
Use getopt_long() to handle command line arguments.
Introduce ext_err for common exit with errors.
Signed-off-by: Fouad Hilly
---
tools/misc/xen-ucode.c | 49 +-
1 file changed, 39 insertions(+), 10 deletions(-)
diff --git a/tools/misc/xen-ucode.c