Re: unlink(nonexistent): EROFS or ENOENT?

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

 



29.05.2011 20:08, Michael Tokarev ÐÐÑÐÑ:
> Hello.
> 
> Just noticed that at least on ext4, unlinking a
> non-existing file from a read-only filesystem
> results in EROFS instead of ENOENT.  I'd expect
> it return ENOENT - it is more logical, at least
> in my opinion.

http://pubs.opengroup.org/onlinepubs/009695399/functions/unlink.html
this case is quite clear:

 [EROFS]
    The directory entry to be unlinked
    is part of a read-only file system

Ie, the entry is a _part_ of a file system, so it should be
_existing_ entry to start with.

> For one, (readonly) NFS mount returns ENOENT in
> this case.
> 
> Thanks!

/mjt
--
To unsubscribe from this list: send the line "unsubscribe linux-fsdevel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Ext4 Filesystem]     [Union Filesystem]     [Filesystem Testing]     [Ceph Users]     [Ecryptfs]     [AutoFS]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux Cachefs]     [Reiser Filesystem]     [Linux RAID]     [Samba]     [Device Mapper]     [CEPH Development]
  Powered by Linux