From owner-freebsd-fs@freebsd.org Sat Mar 4 20:08:50 2017 Return-Path: Delivered-To: freebsd-fs@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 4D501CF941E for ; Sat, 4 Mar 2017 20:08:50 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from kenobi.freebsd.org (kenobi.freebsd.org [IPv6:2001:1900:2254:206a::16:76]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 3CA6E1F52 for ; Sat, 4 Mar 2017 20:08:50 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from bugs.freebsd.org ([127.0.1.118]) by kenobi.freebsd.org (8.15.2/8.15.2) with ESMTP id v24K8oKc013127 for ; Sat, 4 Mar 2017 20:08:50 GMT (envelope-from bugzilla-noreply@freebsd.org) From: bugzilla-noreply@freebsd.org To: freebsd-fs@FreeBSD.org Subject: [Bug 217440] FAT32 formatted USB stick with files written by PS4 - Invalid argument, unable to list directory contents Date: Sat, 04 Mar 2017 20:08:50 +0000 X-Bugzilla-Reason: AssignedTo X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: Base System X-Bugzilla-Component: bin X-Bugzilla-Version: 11.0-RELEASE X-Bugzilla-Keywords: X-Bugzilla-Severity: Affects Only Me X-Bugzilla-Who: cem@freebsd.org X-Bugzilla-Status: New X-Bugzilla-Resolution: X-Bugzilla-Priority: --- X-Bugzilla-Assigned-To: freebsd-fs@FreeBSD.org X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: cc Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: https://bugs.freebsd.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-BeenThere: freebsd-fs@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Filesystems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 04 Mar 2017 20:08:50 -0000 https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D217440 Conrad Meyer changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |ache@FreeBSD.org --- Comment #6 from Conrad Meyer --- I think I see why ls(1)/fts(3) shows "Invalid". The directory entries are readable: $ echo ./testdir/* ./testdir/123t=EF=BF=BDst ./testdir/abc? $ echo $? 0 However, that '?' is an actual question mark symbol, because =E2=84=A2 can = not be represented in iso-8859-1, only win-1252 and unicode. So you cannot access that file by its directory entry: $ ls ./testdir/abc? ls: ./testdir/abc?: Invalid argument $ truss stat ./testdir/abc? ... lstat("./testdir/abc?",0x7fffffffe298) ERR#22 'Invalid argument' I think that EINVAL return is bogus. lstat() misses should return ENOENT. = But that doesn't help you very much. Maybe VOP_READDIR should prefer 8.3 names if LFN names do not convert into cs_local. Although, lookup of 8.3 names doesn't work. So maybe not. It seems cs_local should default to UTF-8 or user's locale, not ISO-8859-1.= Or if it must be a 8-bit character set, Win-1252 may be a better choice. --=20 You are receiving this mail because: You are the assignee for the bug.=