[Libguestfs] [PATCH 0/3] Handle NTFS 3g case sensitive Windows paths in the daemon

Richard W.M. Jones rjones at redhat.com
Mon Oct 26 09:19:40 UTC 2009


In the current Perl library we have a function called
resolve_windows_path which handles the useful [for Windows guests]
case where we need to resolve the true, case-sensitive path behind a
case-insensitive Windows path.

For example, a Windows path like "C:\Windows\System32" can be
presented to Linux by NTFS 3g in a variety of ways, eg:

  /WINDOWS/system32
  /WINDOWS/SYSTEM32

depending entirely on the inconsequential details of how it was
originally created.  Windows doesn't care about case sensitivity, but
NTFS 3g does.

Since resolve_windows_path is a very useful function, the first patch
moves it into the daemon.  The new API is called
"guestfs_case_sensitive_path".

The second patch adds some useful functionality to guestfish, so you
can use Windows-style paths, like this:

  touch win:C:\windows\foo

(Note that all ordinary paths must begin with a '/' char, so this
can't conflict with any existing, working scripts).

The third patch deprecates resolve_windows_path in the Perl code and
replaces it with calls to $g->case_sensitive_path.

Rich.

-- 
Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones
virt-top is 'top' for virtual machines.  Tiny program with many
powerful monitoring features, net stats, disk stats, logging, etc.
http://et.redhat.com/~rjones/virt-top




More information about the Libguestfs mailing list