On Sun, 31 Oct 2004, Reini Urban wrote:Is it possible to let getmntent() i.e. fillout_mntent() return something more appropriate? or would this break existing apps?
getmntent() currently returns either "system" or "user" (user or system mounts), which are kinda strange fstype names.
I expected them to return something like "msdos", "pc", "fat", "vfat" or "ntfs". Those are currently supported by current findutils on mounted dos drives in unix systems. Maybe also an indiciator for subst'ed drives: "subst" and remote shares, but this has no equivalent at unix.
Apps using this are to my knowledge only df -t <type>, and find -fstype <type> I could change that in coreutils and findutils, as findutils also adds some logic for certain esoteric platforms, but I thought asking for it upstream costs nothing. [snip]
Yes, it's possible: <http://cygwin.com/ml/cygwin/2002-09/msg01035.html>. But, <http://cygwin.com/acronyms/#SHTDI>...
Ok, we agreed now that it's a good thing. Have you already started?
http://cygwin.com/ml/cygwin/2002-09/msg01044.html >"If people agree it's a good idea, I'll start on the implementation. > Igor"
Idea: use mnt->mnt_type from GetVolumeInformation().lpFileSystemNameBuffer move user/system from mnt->mnt_type to mnt->mnt_opts add more mnt->mnt_opts fix all the places like m->issys add extended output (all opts) to cygcheck.cc, as in mount
If we agree mnt->mnt_opts will have then the following optional comma-seperated strings: (current state)
system/user, textmode/binmode, cygexec/exec/noexec,
managed, noumount
other useful options to consider, gathered by GetVolumeInformation(): compressed, case-preservant, case-sensitive, encrypted, read-only
other useful options to consider, gathered by GetDriveType(): no-root-dir, emovable, remote, cdrom, ramdisk
additional checks to be done for SUBST: subst
we should leave out default options, and only store them if they are non-default, ok?
so we should assume no-case-preservant on FAT and case-preservant on NTFS. no-case-sensitive on all windows drive types.
maybe sooner or later someone will come up with mounting external drive types (iso9660, ext2fs) also. (Daemon-Tools, e2fsimage, ...)
BTW: The research at the mail above forgot about getmntent() and fillout_mntent() in path.cc. fillout_mntent() is the main worker.
If not I'll start also, 'cause I want that feature in coreutils and findutils.
--
Reini Urban
http://xarch.tu-graz.ac.at/home/rurban/
-- Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple Problem reports: http://cygwin.com/problems.html Documentation: http://cygwin.com/docs.html FAQ: http://cygwin.com/faq/