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.


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

test:
export LC_ALL=C; find / -type d -maxdepth 1 -printf "%p(%F)\n"
	/(system)
	/bin(system)
	/cygdrive(unknown)
	/dev(system)
	/etc(system)
	/home(system)
	/lib(system)
	/proc(unknown)
	/RECYCLER(system)
	/sbin(system)
	/tmp(system)
	/usr(system)
	/var(system)

export LC_ALL=C; find /cygdrive/ -type d -maxdepth 1 -printf "%p(%F)\n"
	/cygdrive/(unknown)
	/cygdrive/c(system)
	/cygdrive/d(system)
	/cygdrive/e(system)
	/cygdrive/f(system)
	/cygdrive/h(system)
	/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
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/


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