En réponse à Axel Dörfler <axeld@xxxxxxxxxxxxxxxx>: > François wrote: > > Since we don't want to maintain compatibility with R5 filesystems, I > > > suggest > > we revamp the data parameter of the mount() call... > > This one seems really braindead to me. > > Partially, yes :) > > > that could be extended, like the module_info is included in bus > > manager info > > struct... > > I don't think this is a good idea - different file systems have > different needs. For example for an ISO-9660 file system you could have Well, when I say url, this is still a char *, can be used for other things, but the general idea was to make it transparent to the mount command, and maybe also from Tracker somehow... > > options like "no rock-ridge", or "no joliet" etc. Sure > That would make this structure bloated and hard to use, especially is > the "mount" command should provide a way to set all those options. What about typedef struct { char *name; char *value; } mount_param_item; struct mount_options { char *url; // maybe not usefull then... int param_count; mount_param_item options[0]; // or maybe a pointer to this }; ? mount would parse the option string (given with -o under Linux... but -p is fine), and break it into parts. mount -p rockridge=no,joliet=no,ro would give {3, {"rockridge", "no"}, {"joliet", "no"}, {"ro", NULL}}; Also, using the comma as under Linux gets rid of the quotes you use to escape the space chars... and we still can quote it if we want a space in the params And while we are at it, a mean of telling userland which options a filesystem supports would be nice, that could give: mount --help iso9660 iso9660 filesystem options: rockridge [yes]/no: use rockridge support joliet [yes]/no: use joliet support ro: mount readonly > > What I want to do is to change this into a "char *", so file systems > have to expect a option string in there, not a special structure. > The mount command I put into the tree already has a (hidden) -p option > > to pass those arguments via the command line. > We could also provide a way to parse those strings in a consistent > manner, like "arg1=value arg2=value ...". > > So in you example above, it could be something like: > mount -t cifs -p "user='xyz' password=abc" //192.168.0.1//share / > mountpoint And btw the device string could be used directly for an url, didn't even thought about it :) François.