lkml.org 
[lkml]   [2017]   [May]   [30]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRe: [PATCH v2] powerpc/fadump: return error when fadump registration fails
Date
Mahesh Jagannath Salgaonkar <mahesh@linux.vnet.ibm.com> writes:

> On 05/27/2017 09:16 PM, Michal Suchanek wrote:
>> - log an error message when registration fails and no error code listed
>> in the switch is returned
>> - translate the hv error code to posix error code and return it from
>> fw_register
>> - return the posix error code from fw_register to the process writing
>> to sysfs
>> - return EEXIST on re-registration
>> - return success on deregistration when fadump is not registered
>> - return ENODEV when no memory is reserved for fadump
>
> Why do we need this ?

Because that's how we do error handling.

> Userspace can always read back the fadump registration status from
> /sys/kernel/fadump_registered (after echo 1 to it) to find out
> whether fadump registration succeeded or not.

That's a terrible API.

If we followed that example, open() wouldn't return a value, you'd have
to do another syscall to check if it worked.

I'd appreciate if someone could test this and give me a Tested-by.

cheers

\
 
 \ /
  Last update: 2017-05-30 12:46    [W:0.111 / U:0.140 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site