[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-devel] [PATCH v3 20/52] xen/arch/x86/shutdown.c: let custom parameter parsing routines return errno
>>> On 16.08.17 at 14:51, <jgross@xxxxxxxx> wrote: > --- a/xen/arch/x86/shutdown.c > +++ b/xen/arch/x86/shutdown.c > @@ -51,8 +51,11 @@ static int reboot_mode; > * efi Use the EFI reboot (if running under EFI) > */ > static enum reboot_type reboot_type = BOOT_INVALID; > -static void __init set_reboot_type(char *str) > + > +static int __init set_reboot_type(const char *str) > { > + int rc = 0; > + > for ( ; ; ) > { > switch ( *str ) > @@ -74,6 +77,8 @@ static void __init set_reboot_type(char *str) > case 't': > reboot_type = *str; > break; > + default: > + rc = -EINVAL; > } Please don't omit the break statement, even if it is not strictly needed here. > @@ -82,6 +87,8 @@ static void __init set_reboot_type(char *str) > > if ( reboot_type == BOOT_EFI && !efi_enabled(EFI_RS) ) > reboot_type = BOOT_INVALID; Should this perhaps also lead to -EINVAL being returned? Jan _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxx https://lists.xen.org/xen-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |