Re: [RFC/PATCH 0/5] read/write on attribute w/o show/store shouldreturn -ENOSYS

From: Robert Love
Date: Thu Apr 28 2005 - 15:10:08 EST


On Thu, 2005-04-28 at 15:56 -0400, Richard B. Johnson wrote:

> Perhaps...
> ENOSPC, i.e., the device is full. This is the usual return value
> for a CD/ROM and `df` always shows it's full even if it has
> one small file.

But there is space on the backing device. Given two files on the same
file system, one should not be returning ENOSPC on write and the other
succeeding.

> The only thing that really makes sense is EPERM but it is usually
> associated with permissions rather than if an operation is permitted.

EPERM isn't even a valid SUSv3 return for write(2). Permissions don't
apply to writes, only opens (and, thus, this is a valid return for
open(2)).

The answer has already been suggested: EACCESS or EIO.

Robert Love


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