From owner-freebsd-current@FreeBSD.ORG Tue Feb 6 06:50:03 2007 Return-Path: X-Original-To: freebsd-current@freebsd.org Delivered-To: freebsd-current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 8934916A403 for ; Tue, 6 Feb 2007 06:50:03 +0000 (UTC) (envelope-from pluknet@gmail.com) Received: from nf-out-0910.google.com (nf-out-0910.google.com [64.233.182.190]) by mx1.freebsd.org (Postfix) with ESMTP id 1784113C4A3 for ; Tue, 6 Feb 2007 06:50:02 +0000 (UTC) (envelope-from pluknet@gmail.com) Received: by nf-out-0910.google.com with SMTP id m19so72324nfc for ; Mon, 05 Feb 2007 22:50:02 -0800 (PST) DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=beta; h=received:message-id:date:from:to:subject:mime-version:content-type:content-transfer-encoding:content-disposition; b=QkBplrKN1CyadQSS+OOEPQPiAbl8ybCQOwuhLdOkSEo0Jp1TfaP+6Kp1KkQaxANCUcjgGpvSOSa5gzVA2vXcjKpCE6JSLbxqFUtbLjEaj2As+H2iOsW5GfCZr9ntBvYyUjXzD2mu8eC5GKnwgEGFRLgYEPdmXtyUDE/138P88ak= Received: by 10.49.93.4 with SMTP id v4mr134955nfl.1170742856457; Mon, 05 Feb 2007 22:20:56 -0800 (PST) Received: by 10.49.27.4 with HTTP; Mon, 5 Feb 2007 22:20:56 -0800 (PST) Message-ID: Date: Tue, 6 Feb 2007 09:20:56 +0300 From: pluknet To: freebsd-current@freebsd.org, freebsd-fs@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline Cc: Subject: incorrect(?) errno value in msdosfs X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 06 Feb 2007 06:50:03 -0000 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