Re: rm error code on FAT
Maxim Sobolev wrote: "Matthew D. Fuller" wrote: On Tue, Nov 09, 1999 at 02:18:44AM +0200, a little birdie told me that Maxim Sobolev remarked 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. I think you'll find that the '*' in that case is expanded by your shell long before rm ever gets to it. *sigh* (seems it is time for me to go into the bed ;). You are probably right - it seems I forgot to take into account shell role. So it is pure and unavoidable "feature" of FAT Wildcards only get expanded by the shell if there is something to expand. Just write an "echo" instead of "rm" for your command and see by yourself. csh would show the error message "no match", but sh compatible shells just display: # mkdir empty # cd empty # echo *xtra *xtra So in fact, if you try to remove something, the '*' is indeed part of the filename for the unlink() command. Daniel To Unsubscribe: send mail to [EMAIL PROTECTED] with "unsubscribe freebsd-current" in the body of the message
rm error code on FAT
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. bash-2.03# mount /dev/ad0s2a on / (ufs, local, noatime, soft-updates, writes: sync 231 async 5542) procfs on /proc (procfs, local) /dev/ad0s1 on /mnt (msdos, local) bash-2.03# rm /tmp/*.no_such_files rm: /tmp/*.no_such_files: No such file or directory bash-2.03# rm /mnt/*.no_such_files rm: /mnt/*.no_such_files: Invalid argument -Maxim To Unsubscribe: send mail to [EMAIL PROTECTED] with "unsubscribe freebsd-current" in the body of the message
Re: rm error code on FAT
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. Bruce To Unsubscribe: send mail to [EMAIL PROTECTED] with "unsubscribe freebsd-current" in the body of the message