Mailing-List: contact cygwin-help@cygwin.com; run by ezmlm
List-Subscribe: <mailto:cygwin-subscribe@cygwin.com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin@cygwin.com>
List-Help: <mailto:cygwin-help@cygwin.com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner@cygwin.com
Mail-Followup-To: cygwin@cygwin.com
Delivered-To: mailing list cygwin@cygwin.com
Message-ID: <41850016.90204@x-ray.at>
Date: Sun, 31 Oct 2004 16:09:10 +0100
From: Reini Urban <rurban@x-ray.at>
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.0; de-AT; rv:1.8a3) Gecko/20040817
MIME-Version: 1.0
To: cygwin <cygwin@cygwin.com>
Subject: getmntent extended
Content-Type: text/plain; charset=ISO-8859-15; format=flowed
Content-Transfer-Encoding: 7bit
X-IsSubscribed: yes

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/

