This is the mail archive of the cygwin mailing list for the Cygwin project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

getmntent extended

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.

  updatedb could skip subst'ed drives.
  df could display only ntfs drives.
  find could skip remote shares.

export LC_ALL=C; find / -type d -maxdepth 1 -printf "%p(%F)\n"

export LC_ALL=C; find /cygdrive/ -type d -maxdepth 1 -printf "%p(%F)\n"
	/cygdrive/i(user)	remote pc
	/cygdrive/k(user)	remote pc
	/cygdrive/m(system)	subst
	/cygdrive/n(system)      -"-
	/cygdrive/o(user)	remote pc
	/cygdrive/p(system) 	subst
	/cygdrive/q(system)      -"-
	/cygdrive/r(system)      -"-
	/cygdrive/s(system)      -"-
	/cygdrive/u(system)      -"-
	/cygdrive/v(system)      -"-
	/cygdrive/w(system)      -"-

Reini Urban

-- Unsubscribe info: Problem reports: Documentation: FAQ:

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]