Re: [kvm-unit-tests PATCH v9 08/12] s390x: retrieve decimal and hexadecimal kernel parameters

Cornelia Huck
2020-06-17T08:38:00Z

On Mon, 15 Jun 2020 11:31:57 +0200
Pierre Morel <pmorel@linux.ibm.com> wrote:

> We often need to retrieve hexadecimal kernel parameters.
> Let's implement a shared utility to do it.
>
> Signed-off-by: Pierre Morel <pmorel@linux.ibm.com>
> ---
> lib/s390x/kernel-args.c | 60 +++++++++++++++++++++++++++++++++++++++++
> lib/s390x/kernel-args.h | 18 +++++++++++++
> s390x/Makefile | 1 +
> 3 files changed, 79 insertions(+)
> create mode 100644 lib/s390x/kernel-args.c
> create mode 100644 lib/s390x/kernel-args.h
>

(...)

> diff --git a/lib/s390x/kernel-args.h b/lib/s390x/kernel-args.h
> new file mode 100644
> index 0000000..a88e34e
> --- /dev/null
> +++ b/lib/s390x/kernel-args.h
> @@ -0,0 +1,18 @@
> +/*
> + * Kernel argument
> + *
> + * Copyright (c) 2020 IBM Corp
> + *
> + * Authors:
> + * Pierre Morel <pmorel@linux.ibm.com>
> + *
> + * This code is free software; you can redistribute it and/or modify it
> + * under the terms of the GNU General Public License version 2.
> + */
> +
> +#ifndef KERNEL_ARGS_H
> +#define KERNEL_ARGS_H
> +
> +int kernel_arg(int argc, char *argv[], const char *str, unsigned long *val);

<bikeshed>get_kernel_arg()?</bikeshed>

> +
> +#endif

Acked-by: Cornelia Huck <cohuck@redhat.com>