2009/4/6 Chris Robinson <[email protected]>: > On Sunday 05 April 2009 6:45:42 pm Ben Klein wrote: >> That might be fine for mount points and mountable devices, but how >> could you accurately determine the filesystem type for an arbitrary >> directory like $HOME/.wine/drive_c? > Expand it (eg. $HOME -> /home/<user>), resolve all symlinks, then see which > active mount points that falls into. The mount point with the longest name > would then be the mount point/partition to use. Eg: > > Drive path for C: > $HOME/.wine/dosdrives/c: -> /home/user/.wine/dosdrives/c: -> > /home/user/.wine/drive_c > > Available fs mount points: > / -> /dev/sda3 > /home -> /dev/sda4 > /boot -> /dev/sda1 > /mnt/cdrom -> /dev/hda1 > > Matching mount points that /home/user/.wine/drive_c exists in and are active: > / > /home > > Mount point with the longest name: > /home > > Thus, C: is on /home, which is /dev/sda4.
Easier said than done. Care to write and submit a patch? :)
