From owner-freebsd-current Mon Nov 8 16:20:31 1999 Delivered-To: freebsd-current@freebsd.org Received: from ipt2.iptelecom.net.ua (ipt2.iptelecom.net.ua [212.9.224.2]) by hub.freebsd.org (Postfix) with ESMTP id E31E11532A for ; Mon, 8 Nov 1999 16:20:07 -0800 (PST) (envelope-from sobomax@altavista.net) Received: from altavista.net (dialup6-26.iptelecom.net.ua [212.9.227.90]) by ipt2.iptelecom.net.ua (8.9.3/8.9.3) with ESMTP id CAA09883; Tue, 9 Nov 1999 02:22:49 +0200 (EET) Message-ID: <38276863.F71C2915@altavista.net> Date: Tue, 09 Nov 1999 02:18:44 +0200 From: Maxim Sobolev Organization: Home, sweet home X-Mailer: Mozilla 4.7 [en] (Win98; I) X-Accept-Language: uk,ru,en MIME-Version: 1.0 To: Bruce Evans Cc: current@FreeBSD.ORG Subject: Re: rm error code on FAT References: Content-Type: text/plain; charset=x-user-defined Content-Transfer-Encoding: 7bit Sender: owner-freebsd-current@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG Bruce Evans wrote: > On Mon, 8 Nov 1999, Maxim Sobolev wrote: > > > Does anybody can explain why two absolutely identical attempts to remove > > unexistent files on UFS and FAT32 yields different error codes ("No such > > file or directory" and "Invalid argument" respectively)? This breaks "rm > > -f" behaviour, because instead of expected "0", "rm -f" on FAT returns > > error code instead. > > unlink("/mnt/*.no_such_files") on msdosfs returns EINVAL because the > pathname contains the invalid character '*'. EINVAL used to be a > documented errno for pathnames containing characters with their high > bit set). This documentation should have been made filesystem- > dependent instead of removing it. If your logic is right, then attempt to remove existent files from FAT using '*' should yield absolutely the same result (i.e. EINVAL). But in fact files being removed from FAT w/o any problems (touch /fat/1.exist /fat/2.exist ; rm /*.exist). IMHO it is clear bug in unlink error codes on FAT f/s. -Maxim To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-current" in the body of the message