Messages in this thread | | | Date | Tue, 03 Aug 1999 11:23:14 +0000 | From | Bernd Paysan <> | Subject | Re: VFAT naming stuff |
| |
degs wrote: > If having the short name alias show up in directory listing is deemed > nessisary (but why - there are no UNIX programs with a long filename brain > deficit...) the short name should be a symlink to the long name.
I had some problems with VFAT's brain damaged system. I ocasionally run a Windows program from my Windows partition using Wine. That works fine for the old 16 bit programs I installed in 3.1 times (all their files are 8.3), and also fine (more or less ;-) for the new 32 bit programs I installed in W95 times. It doesn't work for the 16 bit programs I installed later, because they put some files in PROGRA~1 or PROGRA~2 (which is either really "Program Files" for english located programs or "Programme" for german located programs). Wine could use some special ioctls to resolve the issue (perhaps it does, and I just didn't figure out how to trigger that), but it simply can't guess. It has to have access on the 8.3 names.
What would make it most transparent IMHO is to give "shadow" dentries for the short names (not necessarily symlinks, just a special dentry in the cache, that allows you to open() that file - renaming of either the short or the long one would have to hunt down the other name and create a new long/8.3 dentry pair), and several modes for getdents(): 8.3 mode, long mode, and backup mode (select with an ioctl on the directory's file handle; LD_PRELOAD can give you the desired getdents for tar/cpio). The last puts long and short name together, separated by \, because \ is legal under Unix, but isn't an allowed character under VFAT (we might use :, too).
Uh, this really is ugly. You have to look up dentries by inode (to hunt down the other one) on a lot of cases (move, delete, ...). This William H. Gates III, who wrote the mess known as FAT 20 years ago for TRS80 BASIC on a weekend should have been shot before.
-- Bernd Paysan
- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.rutgers.edu Please read the FAQ at http://www.tux.org/lkml/
| |