From owner-freebsd-drivers@FreeBSD.ORG Sun Apr 26 17:01:08 2009 Return-Path: Delivered-To: freebsd-drivers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 712B910656ED; Sun, 26 Apr 2009 17:01:08 +0000 (UTC) (envelope-from mitchell@wyatt672earp.force9.co.uk) Received: from relay.ptn-ipout01.plus.net (relay.ptn-ipout01.plus.net [212.159.7.35]) by mx1.freebsd.org (Postfix) with ESMTP id B6F388FC1B; Sun, 26 Apr 2009 17:01:07 +0000 (UTC) (envelope-from mitchell@wyatt672earp.force9.co.uk) X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: ApoEAOco9EnUnw4R/2dsb2JhbADKMIN0BQ Received: from pih-relay04.plus.net ([212.159.14.17]) by relay.ptn-ipout01.plus.net with ESMTP; 26 Apr 2009 17:32:15 +0100 Received: from [81.174.211.119] (helo=81-174-211-119.pth-as4.dial.plus.net) by pih-relay04.plus.net with esmtp (Exim) id 1Ly7H4-00042E-SJ; Sun, 26 Apr 2009 17:32:15 +0100 From: Frank Mitchell To: freebsd-hackers@freebsd.org, freebsd-drivers@freebsd.org Date: Sun, 26 Apr 2009 14:55:26 +0100 User-Agent: KMail/1.9.10 MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200904261455.26952.mitchell@wyatt672earp.force9.co.uk> X-Plusnet-Relay: 04d793b6d1709c62d3c49c6d7479f591 Cc: Subject: cd9660 Lowercasing X-BeenThere: freebsd-drivers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Writing device drivers for FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 26 Apr 2009 17:01:10 -0000 I've developed a CD/DVD Backup Utility using the Enhanced Volume Descriptor specified in ISO9660:1999. It doesn't have Rock Ridge yet, so the first thing you notice on mounting is the automatic Lowercase, which interferes with Backup Verification using "diff -qr". There's a simple solution using the "gens" mount option, which has Case Preservation as a side-effect, but it's still annoying. There must be some reason behind it, because NetBSD and Linux have a similar feature, with options to disable it like: "nomaplcase" and "map=off". But their manpages make it look like a throwback to MS-DOS, and a time when all filenames were accessed from the Primary Volume Descriptor. By default you can't have filenames in ASCII using the Supplementary or Enhanced Volume Descriptors either. I think I tracked this feature down to cd9660_util.c, in Function isofntrans, around Line 200: <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< for (; infn != infnend; ) { infn += isochar(infn, infnend, joliet_level, &c, &clen, flags, handle); if (!original && !joliet_level && c >= 'A' && c <= 'Z') c += ('a' - 'A'); else if (!original && c == ';') { outp -= (d == '.'); break; } d = c; while(clen--) *outp++ = c >> (clen << 3); } >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> This only alters ASCII characters. Accented uppercase letters from the top half of ISO8859-1 are unaffected. And it doesn't apply to Joliet either. I don't see the point. Why not just zap it away? Yours Truly: Frank Mitchell