From owner-freebsd-bugs@FreeBSD.ORG Sun Nov 8 03:10:03 2009 Return-Path: Delivered-To: freebsd-bugs@hub.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id A6A25106566C for ; Sun, 8 Nov 2009 03:10:03 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by mx1.freebsd.org (Postfix) with ESMTP id 7B1D48FC1A for ; Sun, 8 Nov 2009 03:10:03 +0000 (UTC) Received: from freefall.freebsd.org (localhost [127.0.0.1]) by freefall.freebsd.org (8.14.3/8.14.3) with ESMTP id nA83A3vg052307 for ; Sun, 8 Nov 2009 03:10:03 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.3/8.14.3/Submit) id nA83A31V052306; Sun, 8 Nov 2009 03:10:03 GMT (envelope-from gnats) Date: Sun, 8 Nov 2009 03:10:03 GMT Message-Id: <200911080310.nA83A31V052306@freefall.freebsd.org> To: freebsd-bugs@FreeBSD.org From: Alexander Best Cc: Subject: Re: kern/59739: [libc] rmdir(2) and mkdir(2) both return EISDIR for argument "/" X-BeenThere: freebsd-bugs@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: Alexander Best List-Id: Bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 08 Nov 2009 03:10:03 -0000 The following reply was made to PR kern/59739; it has been noted by GNATS. From: Alexander Best To: , Cc: Subject: Re: kern/59739: [libc] rmdir(2) and mkdir(2) both return EISDIR for argument "/" Date: Sun, 08 Nov 2009 04:05:11 +0100 (CET) This is a MIME encoded multipart message. --+permail-200911080305111e86ffa800003557-a_best01+ Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit after discussing this problem in the thread mentioned in the previous followup it was decide to move all changes to sys/kern/vfs_syscalls.c in order not to break any code which relies on namei() returning EISDIR. attached you'll find the final patch (which supersedes the previous one). this patch doesn't require any changes to the rename(2), mkdir(2) or rmdir(2) manuals. please set this pr into analysed state. alex --+permail-200911080305111e86ffa800003557-a_best01+ Content-Type: text/plain Content-Transfer-Encoding: Base64 Content-Disposition: attachment; filename="vfssyscalls.c.patch.txt" SW5kZXg6IHN5cy9rZXJuL3Zmc19zeXNjYWxscy5jCj09PT09PT09PT09PT09PT09PT09PT09PT09 PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT0KLS0tIHN5cy9rZXJuL3Zm c19zeXNjYWxscy5jCShyZXZpc2lvbiAxOTkwMTYpCisrKyBzeXMva2Vybi92ZnNfc3lzY2FsbHMu Ywkod29ya2luZyBjb3B5KQpAQCAtMzU4Nyw4ICszNTg3LDEyIEBACiAJICAgIEFVRElUVk5PREUx LCBwYXRoc2VnLCBvbGQsIG9sZGZkLCB0ZCk7CiAjZW5kaWYKIAotCWlmICgoZXJyb3IgPSBuYW1l aSgmZnJvbW5kKSkgIT0gMCkKKwlpZiAoKGVycm9yID0gbmFtZWkoJmZyb21uZCkpICE9IDApIHsK KwkJLyogVHJhbnNsYXRlIGVycm9yIGNvZGUgZm9yIHJlbmFtZSgiLyIsICJkaXIyIikuICovCisJ CWlmIChlcnJvciA9PSBFSVNESVIpCisJCQllcnJvciA9IEVJTlZBTDsKIAkJcmV0dXJuIChlcnJv cik7CisJfQogCWZ2ZnNsb2NrZWQgPSBOREhBU0dJQU5UKCZmcm9tbmQpOwogCXR2ZnNsb2NrZWQg PSAwOwogI2lmZGVmIE1BQwpAQCAtMzczNyw4ICszNzQxLDEyIEBACiAJTkRJTklUX0FUKCZuZCwg Q1JFQVRFLCBMT0NLUEFSRU5UIHwgU0FWRU5BTUUgfCBNUFNBRkUgfCBBVURJVFZOT0RFMSwKIAkg ICAgc2VnZmxnLCBwYXRoLCBmZCwgdGQpOwogCW5kLm5pX2NuZC5jbl9mbGFncyB8PSBXSUxMQkVE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Jvb3Qgb2YgYSBtb3VudGVkIGZpbGVzeXN0ZW0gY2Fu bm90IGJlIGRlbGV0ZWQuCiAJICovCiAJaWYgKHZwLT52X3ZmbGFnICYgVlZfUk9PVCkgewo= --+permail-200911080305111e86ffa800003557-a_best01+--