From owner-freebsd-doc@FreeBSD.ORG Fri Oct 14 23:50:09 2011 Return-Path: Delivered-To: freebsd-doc@hub.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 5FFC8106566B for ; Fri, 14 Oct 2011 23:50:09 +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 4D1C38FC0A for ; Fri, 14 Oct 2011 23:50:09 +0000 (UTC) Received: from freefall.freebsd.org (localhost [127.0.0.1]) by freefall.freebsd.org (8.14.4/8.14.4) with ESMTP id p9ENo9UZ060618 for ; Fri, 14 Oct 2011 23:50:09 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.4/8.14.4/Submit) id p9ENo9lI060617; Fri, 14 Oct 2011 23:50:09 GMT (envelope-from gnats) Date: Fri, 14 Oct 2011 23:50:09 GMT Message-Id: <201110142350.p9ENo9lI060617@freefall.freebsd.org> To: freebsd-doc@FreeBSD.org From: Garrett Cooper Cc: Subject: Re: docs/161673: mkdir(2) doesn't discuss EISDIR X-BeenThere: freebsd-doc@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: Garrett Cooper List-Id: Documentation project List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 14 Oct 2011 23:50:09 -0000 The following reply was made to PR docs/161673; it has been noted by GNATS. From: Garrett Cooper To: Jeremy Huddleston Cc: freebsd-gnats-submit@freebsd.org Subject: Re: docs/161673: mkdir(2) doesn't discuss EISDIR Date: Fri, 14 Oct 2011 16:42:31 -0700 On Fri, Oct 14, 2011 at 4:24 PM, Jeremy Huddleston wro= te: > >>Number: =A0 =A0 =A0 =A0 161673 >>Category: =A0 =A0 =A0 docs >>Synopsis: =A0 =A0 =A0 mkdir(2) doesn't discuss EISDIR >>Confidential: =A0 no >>Severity: =A0 =A0 =A0 non-critical >>Priority: =A0 =A0 =A0 low >>Responsible: =A0 =A0freebsd-doc >>State: =A0 =A0 =A0 =A0 =A0open >>Quarter: >>Keywords: >>Date-Required: >>Class: =A0 =A0 =A0 =A0 =A0doc-bug >>Submitter-Id: =A0 current-users >>Arrival-Date: =A0 Fri Oct 14 23:30:03 UTC 2011 >>Closed-Date: >>Last-Modified: >>Originator: =A0 =A0 Jeremy Huddleston >>Release: =A0 =A0 =A0 =A08.1 >>Organization: > Apple Inc >>Environment: > FreeBSD freebsd8.apple.com 8.1-RELEASE FreeBSD 8.1-RELEASE #0: Mon Jul 19= 02:36:49 UTC 2010 =A0 =A0 root@mason.cse.buffalo.edu:/usr/obj/usr/src/sys/= GENERIC =A0amd64 > >>Description: > mkdir(2) can set errno to EISDIR, but the man page does not discuss this.= =A0You can use mkdir(1) to see this: > > $ mkdir / > mkdir: /: Is a directory > $ mkdir /var > mkdir: /var: File exists > >>How-To-Repeat: > $ mkdir / > mkdir: /: Is a directory > $ mkdir /var > mkdir: /var: File exists > >>Fix: > I would expect EEXIST to be returned for /, but EISDIR was set instead. = =A0I guess either update documentation or change the syscall to return EEXI= ST instead. You aren't the first one to ponder this question: http://lists.freebsd.org/pipermail/freebsd-hackers/2009-November/029940.htm= l -Garrett