On segunda-feira, 19 de março de 2012 12.43.37, PCMan wrote: > Another problem is, how can you map mime-type ids to mime-type strings? > It's not possible to hard code an array of known mime-types and look it up > with the ids. > Mime-types can be added to and removed from the system dynamically using > shared-mime-database. > The only possible way to do it I can think of is to have a list of known > types and use them only. > Or do you have a better way to do it?
Even before that: how does one set the st_rdev field to anything? There is no
setter function counterpart to stat. Changing the file size involves writing to
it; changing the UID and GID are done by chown and chgrp; the mode with chmod;
the times are done with utime and utimes.
I don't remember any function that sets the st_rdev field aside from mknod.
Moreover, I don't see any guarantee that the filesystem has room for the
st_rdev field for regular files in its on-disk format.
--
Thiago Macieira - thiago (AT) macieira.info - thiago (AT) kde.org
Software Architect - Intel Open Source Technology Center
PGP/GPG: 0x6EF45358; fingerprint:
E067 918B B660 DBD1 105C 966C 33F5 F005 6EF4 5358
signature.asc
Description: This is a digitally signed message part.
_______________________________________________ xdg mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/xdg
