delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2004/10/31/10:09:29

Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
Delivered-To: mailing list cygwin AT cygwin DOT com
Message-ID: <41850016.90204@x-ray.at>
Date: Sun, 31 Oct 2004 16:09:10 +0100
From: Reini Urban <rurban AT x-ray DOT 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 AT cygwin DOT com>
Subject: getmntent extended
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/

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019