[Libguestfs] [PATCH 3/5] s390x: appliance: Use /dev/ttysclp0 for serial console.

Pino Toscano ptoscano at redhat.com
Wed May 17 16:01:41 UTC 2017


On Wednesday, 17 May 2017 13:09:03 CEST Richard W.M. Jones wrote:
> ---
>  lib/appliance-kcmdline.c | 14 +++++++++++---
>  1 file changed, 11 insertions(+), 3 deletions(-)
> 
> diff --git a/lib/appliance-kcmdline.c b/lib/appliance-kcmdline.c
> index 4dde7a865..a394e6e67 100644
> --- a/lib/appliance-kcmdline.c
> +++ b/lib/appliance-kcmdline.c
> @@ -40,11 +40,19 @@
>    guestfs_int_string_is_valid ((term), 1, 16, \
>                                 VALID_FLAG_ALPHA|VALID_FLAG_DIGIT, "-_")
>  
> -#if defined(__powerpc64__)
> +#ifdef __powerpc64__
>  #define SERIAL_CONSOLE "console=hvc0 console=ttyS0"
> -#elif defined(__arm__) || defined(__aarch64__)
> +#endif
> +
> +#if defined(__arm__) || defined(__aarch64__)
>  #define SERIAL_CONSOLE "console=ttyAMA0"
> -#else
> +#endif
> +
> +#ifdef __s390x__
> +#define SERIAL_CONSOLE "console=ttysclp0"
> +#endif

TBH I'd find better a #ifdef ... #elif ... #endif chain.

-- 
Pino Toscano
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: This is a digitally signed message part.
URL: <http://listman.redhat.com/archives/libguestfs/attachments/20170517/756b66f0/attachment.sig>


More information about the Libguestfs mailing list