From owner-freebsd-fs Mon Feb 18 5:27:54 2002 Delivered-To: freebsd-fs@freebsd.org Received: from elvis.mu.org (elvis.mu.org [192.203.228.196]) by hub.freebsd.org (Postfix) with ESMTP id 71F3137B404 for ; Mon, 18 Feb 2002 05:27:51 -0800 (PST) Received: by elvis.mu.org (Postfix, from userid 1192) id 5028AAE814; Mon, 18 Feb 2002 05:27:51 -0800 (PST) Date: Mon, 18 Feb 2002 05:27:51 -0800 From: Alfred Perlstein To: fs@freebsd.org Subject: mkdir / == odd Message-ID: <20020218132751.GX12136@elvis.mu.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.3.27i Sender: owner-freebsd-fs@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.org # mkdir / mkdir: /: Is a directory shouldn't mkdir get a EEXIST error back? this patch to mkdir also fixes it. Index: mkdir.c =================================================================== RCS file: /home/ncvs/src/bin/mkdir/mkdir.c,v retrieving revision 1.23 diff -u -r1.23 mkdir.c --- mkdir.c 5 Feb 2002 21:55:12 -0000 1.23 +++ mkdir.c 18 Feb 2002 13:28:06 -0000 @@ -143,7 +143,7 @@ p = path; oumask = 0; retval = 0; - if (p[0] == '/') /* Skip leading '/'. */ + while (p[0] == '/') /* Skip leading '/'. */ ++p; for (first = 1, last = 0; !last ; ++p) { if (p[0] == '\0') -- -Alfred Perlstein [alfred@freebsd.org] 'Instead of asking why a piece of software is using "1970s technology," start asking why software is ignoring 30 years of accumulated wisdom.' Tax deductible donations for FreeBSD: http://www.freebsdfoundation.org/ To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-fs" in the body of the message