lkml.org 
[lkml]   [1999]   [Sep]   [5]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: Your backup is broken! (W95 only :-)
In article <82e33e16e2210e5a@home-box.demon.co.uk>, Robert de Bath
<rd103983@home-box.demon.co.uk> writes
>
>[About Dos Attr's]
>
>But I had an idea, a nasty ugly idea, at first, but it does grow on you.
>
>Add a mount option: "gidset=400"
>This make the gid seen on files to be one of 400..403, they corrispond to:
>
> 400 = dos_files
> 401 = dos_sys
> 402 = dos_hidden
> 403 = dos_hiddensys
>
>It's simple, works on any fat fs and will save & restore to any UNIX
>backup method. You could add the archive bit in there too, but that's
>even more ugly!!

Well it is certainly one way of doing it.

Another I considered was to append ':ASH' to the file name and set the
case of the ASH bit appropriately.[1]

The choice of colon as a separator was made as has little special
meaning in unix and is a banned character in FAT filenames.

I even did the lookup part of the patch (including a mount option) for
2.0.35, but ran out of time before I could do the create/rename fixes.

>This did lead onto an even nastier idea for long file names ...
>
>Take LFN "abcdefghijk" this will be mapped onto one of:
>
> abcdefgh
> abcdef~1
> abcdef~2
>
>and so on. Assign each of these a number 0..N, add this number (or four
>times it) to the "gidset=?" value for the group id of this file.
>
> Eyuck!! But ...

The big problem with this is that it makes assumptions about the name
shortening algorithm used, AFAIK from my descriptions of VFAT the actual
method is not mandated (and certainly not enforced by the data
structures). So I would prefer a method which exposed a
vfat_set_short_name() [2] to userspace, but this is easier said then
done and has come up before.

Again a mount option to form filenames in a "SHRTNAME.EXT:TheLongName"
format might be one simple way round this problem, at least the idea of
both names being set together I _think_ alleviates some of the
complaints/problem with the vfat_set_short_name() method.

Additionally this mount option could be specified together with the
above mount option for the rest of FAT attributes.

TTFN

[1] Use Permission bit for Read_only, so this then exposes all FAT
attributes.
[2] ISTR, we already have a ioctl for vfat_get_short_name().
--
Roger Gammans
"If I have trouble installing Linux, something is wrong. Very wrong."
-- Linus Torvalds

-
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/

\
 
 \ /
  Last update: 2005-03-22 13:53    [W:0.065 / U:1.492 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site