[syslinux] Rock Ridge

Thomas Schmitt scdbackup at gmx.net
Thu Apr 4 10:11:13 PDT 2013


Hi,

> https://github.com/pbatard/rufus/commit/97576d79cbc180dd9509b1d7144107261c6d58a3
> (quoting Pete), when using libcdio and RR, you should 
> not call on iso9660_name_translate_ext() on the filename attribute of 
> the iso9660_stat_t struct you process, but instead use the name 
> returned as is.

Sounds rather like a libcdio-specific bug.
If i understand the patch correctly, then libcdio applied the ISO 9660
name back-translation to Rock Ridge names.

That would be wrong, because Rock Ridge bears plain POSIX names, whereas
the names of ISO 9660 are combined of user-visible name, mandatory dot
(if missing in name), and version number. Everything is mapped to upper
case. "foo" becomes "FOO.;1" in ISO 9660. This has to be compensated by
some back-translation. (As good as is possible with a non-injective
forth-translation.)

To see real ISO 9660 names, you may mount an ISO image on Linux with
  -o loop,norock,nojoliet,map=off


The changeset to syslinux/core/fs/iso8660/iso9660.c is supposed to
handle Rock Ridge names correctly in this aspect:
  http://git.kernel.org/cgit/boot/syslinux/syslinux.git/commit/?h=rockridge&id=556ccf02efe3eae833bcc82c4764179580ba6361

It compares them with the user-visible name by
   if (strcmp(rr_name, dname) == 0) {
rather than by
   if (iso_compare_name(de_name, de_name_len, dname)) {
as is done with ISO 9660 names.

It returns obtained Rock Ridge names without conversion by
   memcpy(dirent->d_name, rr_name, name_len);
rather than
   name_len = iso_convert_name(dirent->d_name, de->name, de->name_len);
as done with ISO 9660 names.


Well, the code ist now waiting for its first tester.

A benefit of interpreting Rock Ridge will be that ISO 9660 name
mapping cannot alter your POSIX file names. So you have not to care
about possible name collisions in the ISO 9660 name space.
(Those get resolved by "mangling" which alters the ISO names in a
 quite unpredictable way.)

Another benefit (and reason of this thread) is the wish to use UTF-8
as character set for filenames. A no-go for ISO 9660, no problem for
Rock Ridge.


Have a nice day :)

Thomas



More information about the Syslinux mailing list