getfsent and LABEL= or UUID=
Jakub Jelinek
jakub@redhat.com
Wed Jan 31 02:20:00 GMT 2001
Hi!
I just got a request whether getfsent and family could return in fs_spec the
actual device in case LABEL= or UUID= is used. It might make some sense
since otherwise all various programs using getfsent would have to do it
themselves, on the other side there might be some applications interested in
the LABEL= or UUID= (e.g. to copy it somewhere else).
One option could be to enlarge struct fstab (together with symbol
versioning) and either put the actual device into a new const char * field,
or put the actual device into fs_spec and put the original LABEL= or UUID=
into the new field.
At least checking ext2 labels or uuids does not require bringing too much
ext2 knowledge in, it basically means reading /proc/partitions, for each
partition there try to read ext2 superblock, check ext2 magic and if it is
ok, copy in two superblock fields into some cache.
Comments?
Jakub
More information about the Libc-hacker
mailing list