Date: Tue, 6 Feb 2007 09:20:56 +0300 From: pluknet <pluknet@gmail.com> To: freebsd-current@freebsd.org, freebsd-fs@freebsd.org Subject: incorrect(?) errno value in msdosfs Message-ID: <a31046fc0702052220sc5d201aj143f45bcc9795173@mail.gmail.com>
next in thread | raw e-mail | index | archive | help
hello. I have discovered an unexpected behavior. If I perform a search operation in the directory for non-existing files, then I get the EINVAL value on msdosfs filesystem instead of the ENOENT value returned. Actually I don't know what is the right value should be returned and thus maybe I'm wrong and I'm sorry for annoying. But It simply differs from the value normally returned on ufs2 filesystem. So I decide to write here. :) It is observed on 6.2 and CURRENT. For example if I run the next command on msdosfs filesystem, this is what I get: bash-2.05b$ ls /mnt/msdosfs/*.nonexistent ls: /mnt/msdosfs/*.nonexistent: Invalid argument instead of: bash-2.05b$ ls /mnt/msdosfs/*.nonexistent ls: /mnt/msdosfs/*.nonexistent: No such file or directory This behavior is fixed with the next workaround in v1.47, but I guess that perhaps it needs to fix in some another place. bash-2.05b$ diff -u -p msdosfs_lookup.c.orig msdosfs_lookup.c --- msdosfs_lookup.c.orig Tue Feb 6 08:56:43 2007 +++ msdosfs_lookup.c Tue Feb 6 08:59:42 2007 @@ -147,7 +147,7 @@ msdosfs_lookup(ap) switch (unix2dosfn((const u_char *)cnp->cn_nameptr, dosfilename, cnp->cn_namelen, 0, pmp)) { case 0: - return (EINVAL); + return (ENOENT); case 1: break; case 2: wbr, pluknet
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?a31046fc0702052220sc5d201aj143f45bcc9795173>