lkml.org 
[lkml]   [2013]   [May]   [21]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] PowerPC: kernel: need return the related error code when failure occurs.
On 05/21/2013 04:10 PM, Paul Mackerras wrote:
> On Tue, May 21, 2013 at 01:48:58PM +0800, Chen Gang wrote:
>> >
>> > When error occurs, need return the related error code to let upper
>> > caller know about it.
>> >
>> > ppc_md.nvram_size() can return the error code (e.g. core99_nvram_size()
>> > in 'arch/powerpc/platforms/powermac/nvram.c').
>> >
>> > And when '*ppos >= size', need return -ESPIPE (Illegal seek)
> Why? When *ppos >= size, it should return 0 (end of file) in my opinion.
> ESPIPE means that any seek would be ineffective, not that a particular
> seek went out of bounds.

OK, thanks, I will send patch v2. :-)


Thanks.
--
Chen Gang

Asianux Corporation


\
 
 \ /
  Last update: 2013-05-21 11:21    [W:0.046 / U:0.052 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site