DragonFly BSD
DragonFly bugs List (threaded) for 2013-04
[Date Prev][Date Next]  [Thread Prev][Thread Next]  [Date Index][Thread Index]

[DragonFlyBSD - Bug #2543] man rmdir(2) : add EINVAL to the error section


From: Sascha Wildner via Redmine <bugtracker-admin@xxxxxxxxxxxxxxxxxxxxx>
Date: Wed, 10 Apr 2013 10:22:44 -0700

Issue #2543 has been updated by swildner.


POSIX has this to say about EINVAL and EBUSY:

[EBUSY]
The directory to be removed is currently in use by the system or some process and the implementation considers this to be an error.

[EINVAL]
The path argument contains a last component that is dot.

So I think that we should actually return EBUSY instead of EINVAL for the attempt to rmdir() a directory that is a mount point.

Also, I'm not sure if we handle the "last component that is dot" case correctly yet.

----------------------------------------
Bug #2543: man rmdir(2) : add EINVAL to the error section
http://bugs.dragonflybsd.org/issues/2543

Author: jorisgio
Status: New
Priority: Normal
Assignee: 
Category: 
Target version: 


rmdir can return EINVAL if the directory is a mount point :

See sys/kern/vfs_syscalls.c:3997

        /*
         * Do not allow directories representing mount points to be
         * deleted, even if empty.  Check write perms on mount point
         * in case the vnode is aliased (aka nullfs).
         */
        if (nd->nl_nch.ncp->nc_flag & (NCF_ISMOUNTPT))
                return (EINVAL);


-- 
You have received this notification because you have either subscribed to it, or are involved in it.
To change your notification preferences, please click here: http://bugs.dragonflybsd.org/my/account



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