[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Xen-devel] [PATCH v2 20/52] xen/arch/x86/shutdown.c: let custom parameter parsing routines return errno



On 14/08/17 15:39, Jan Beulich wrote:
>>>> On 14.08.17 at 09:08, <jgross@xxxxxxxx> wrote:
>> --- a/xen/arch/x86/shutdown.c
>> +++ b/xen/arch/x86/shutdown.c
>> @@ -51,7 +51,7 @@ 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(char *str)
>>  {
>>      for ( ; ; )
>>      {
>> @@ -74,6 +74,8 @@ static void __init set_reboot_type(char *str)
>>          case 't':
>>              reboot_type = *str;
>>              break;
>> +        default:
>> +            return -EINVAL;
> 
> This alters behavior - you want to store -EINVAL in a local variable,
> but continue the loop.

Aah, yes. Okay.


Juergen



_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
https://lists.xen.org/xen-devel

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.