Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com Delivered-To: mailing list cygwin AT cygwin DOT com Date: Wed, 12 Oct 2005 16:13:43 +0200 From: Corinna Vinschen To: cygwin AT cygwin DOT com Subject: Re: mkdir(2) bug [Was: please test: coreutils-5.90-2] Message-ID: <20051012141343.GA2908@calimero.vinschen.de> Reply-To: cygwin AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com References: <433F5562 DOT 1060806 AT byu DOT net> <434C3906 DOT 6090304 AT acm DOT org> <434C8100 DOT 9010503 AT byu DOT net> <20051012074755 DOT GU12938 AT calimero DOT vinschen DOT de> <434D0880 DOT 8070105 AT byu DOT net> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <434D0880.8070105@byu.net> User-Agent: Mutt/1.4.2i On Oct 12 06:58, Eric Blake wrote: > I see the following bugs: > > $ ./foo // # should fail with EEXIST, not EROFS; no Windows call made > //: 30 Read-only file system > $ strace ./foo // | grep -B3 mkdir > 65 18986 [main] foo 3788 build_fh_pc: fh 0x6115AE1C > 34 19020 [main] foo 3788 path_conv::check: \\ is on a read-only > filesystem > 29 19049 [main] foo 3788 __set_errno: fhandler_base* > build_fh_name(const char*, void*, unsigned int, suffix_info*):347 val 30 > 29 19078 [main] foo 3788 mkdir: got 30 error from build_fh_name > 27 19105 [main] foo 3788 __set_errno: int mkdir(const char*, > mode_t):274 val 30 > 64 19169 [main] foo 3788 mkdir: -1 = mkdir (//, 511) We had this already. There's no such thing as a "correct" order of error messages. EROFS is as correct as EEXIST. If coreutils don't allow different correct error messages to be returned, than coreutils is just not foolproof enough. If this isn't a problem with coreutils, than the better. > $ ./foo c: # should fail with EEXIST, not EACCES > c:: 13 Permission denied > $ strace ./foo c: | grep -B3 mkdir > 69 141826 [main] foo 1368 seterrno_from_win_error: > /netrel/src/cygwin-snapshot-20051003-1/winsup/cygwin/fhandler_disk_file.cc:1225 > windows error 5 > 43 141869 [main] foo 1368 geterrno_from_win_error: windows error 5 == > errno 13 > 28 141897 [main] foo 1368 __set_errno: void > seterrno_from_win_error(const char*, int, DWORD):310 val 13 > 54 141951 [main] foo 1368 mkdir: -1 = mkdir (c:, 511) See my previous mail on this subject. > $ ./foo /proc # should fail with EEXIST, not EROFS > /proc: 30 Read-only file system See above. > $ ./foo a/. # should fail with EEXIST, not ENOENT > a/.: 2 No such file or directory I get ENOENT on Linux. Corinna -- Corinna Vinschen Please, send mails regarding Cygwin to Cygwin Project Co-Leader cygwin AT cygwin DOT com Red Hat, Inc. -- Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple Problem reports: http://cygwin.com/problems.html Documentation: http://cygwin.com/docs.html FAQ: http://cygwin.com/faq/