Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 09 Nov 1999 02:18:44 +0200
From:      Maxim Sobolev <sobomax@altavista.net>
To:        Bruce Evans <bde@zeta.org.au>
Cc:        current@FreeBSD.ORG
Subject:   Re: rm error code on FAT
Message-ID:  <38276863.F71C2915@altavista.net>
References:  <Pine.BSF.4.10.9911081351050.2071-100000@alphplex.bde.org>

next in thread | previous in thread | raw e-mail | index | archive | help
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




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?38276863.F71C2915>