Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 06 Nov 2009 15:06:25 +0100
From:      Alex Dupre <ale@FreeBSD.org>
To:        Alexander Best <alexbestms@math.uni-muenster.de>
Cc:        freebsd-hackers@FreeBSD.org
Subject:   Re: rmdir(2) and mkdir(2) both return EISDIR for argument "/"
Message-ID:  <4AF42D61.6050403@FreeBSD.org>
In-Reply-To: <permail-2009110501171580e26a0b00006a75-a_best01@message-id.uni-muenster.de>
References:  <permail-2009110501171580e26a0b00006a75-a_best01@message-id.uni-muenster.de>

next in thread | previous in thread | raw e-mail | index | archive | help
Alexander Best ha scritto:
> i dug up this old pr http://www.freebsd.org/cgi/query-pr.cgi?pr=kern/59739

I think the EISDIR error is coming from kern/vfs_lookup.c, lookup()
function with cn_nameptr = "":


        /*
         * Check for degenerate name (e.g. / or "")
         * which is a way of talking about a directory,
         * e.g. like "/." or ".".
         */
        if (cnp->cn_nameptr[0] == '\0') {
                ...
                if (cnp->cn_nameiop != LOOKUP) {
                        error = EISDIR;
                        goto bad;
                }
                ...

-- 
Alex Dupre



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?4AF42D61.6050403>