lkml.org 
[lkml]   [2005]   [Aug]   [19]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: sysfs: write returns ENOMEM?
Hi Dmitry,

On 8/19/05, Dmitry Torokhov <dtor_core@ameritech.net> wrote:
> According to the SuS write() can not return ENOMEM, only ENOBUFS is allowed
> (surprisingly read() is allowed to use both ENOMEM and ENOBUFS):
>
> http://www.opengroup.org/onlinepubs/000095399/functions/write.html
>
> Should we adjust sysfs write to follow the standard?

Please note that sysfs is not the only one to do this. A quick peek
reveals XFS and CIFS returing ENOMEM for write() and there are
probably others as well. Perhaps we should replace ENOMEM with ENOBUFS
in vfs_write() instead?

linvfs_write
xfs_write
xfs_zero_eof
xfs_zero_last_block
xfs_iozero
-> Returns -ENOMEM

cifs_user_write
cifs_reopen_file
-> Returns -ENOMEM

Pekka
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-08-19 09:43    [W:0.056 / U:2.440 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site