delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2004/11/02/10:07:57

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
Date: Tue, 2 Nov 2004 10:07:17 -0500 (EST)
From: Igor Pechtchanski <pechtcha AT cs DOT nyu DOT edu>
Reply-To: cygwin AT cygwin DOT com
To: Reini Urban <rurban AT x-ray DOT at>
cc: cygwin AT cygwin DOT com
Subject: Re: getmntent extended
In-Reply-To: <418796A4.30302@x-ray.at>
Message-ID: <Pine.GSO.4.61.0411020954080.19454@slinky.cs.nyu.edu>
References: <41850016 DOT 90204 AT x-ray DOT at> <Pine DOT GSO DOT 4 DOT 61 DOT 0411011159390 DOT 13237 AT slinky DOT cs DOT nyu DOT edu> <418796A4 DOT 30302 AT x-ray DOT at>
MIME-Version: 1.0
X-Scanned-By: MIMEDefang 2.39

On Tue, 2 Nov 2004, Reini Urban wrote:

> Igor Pechtchanski schrieb:
> > 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"

No, I haven't started, unfortunately.  Feel free to take over.

> 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

It might be better to make those flags instead...

> other useful options to consider, gathered by GetVolumeInformation():
>   compressed, case-preservant, case-sensitive, encrypted, read-only

Again, flags.

> other useful options to consider, gathered by GetDriveType():
>   no-root-dir, emovable, remote, cdrom, ramdisk

This should be fstype.

> additional checks to be done for SUBST:
>   subst

So is this.

IIRC, what started this was a problem with 'find -xdev' which used a
(wrong) heuristic for determining remote drives (colon in the path) that
worked in reverse on Cygwin.  Is 'find' still part of findutils, or has it
moved to coreutils?  In any case, does the new version still have this
bug?  If so, it should be fixed to use the fstype field of the mntent...
Or is there a local/remote flag?

> we should leave out default options, and only store them if they are
> non-default, ok?

I don't see why, frankly.  If you use the flags approach, just make the
default values be 0's... :-D

> so we should assume no-case-preservant on FAT and case-preservant on NTFS.
> no-case-sensitive on all windows drive types.

I'd add a bit of logic for NTFS to set the case-preservant flag.  The
case-sensitive vs. case-insensitive is reasonably meaningless on Cygwin,
since it's controlled by the "check_case" option in $CYGWIN (which
hopefully will not be removed anytime soon [@Corinna])...

> maybe sooner or later someone will come up with mounting external drive
> types (iso9660, ext2fs) also. (Daemon-Tools, e2fsimage, ...)

It's already possible, using non-Cygwin tools, but that doesn't mean
people won't do this.  Other possible useful types to distinguish are
Unix->Samba drives and Clearcase drives...

> 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.

Yep, please do start on it.
	Igor
-- 
				http://cs.nyu.edu/~pechtcha/
      |\      _,,,---,,_		pechtcha AT cs DOT nyu DOT edu
ZZZzz /,`.-'`'    -.  ;-;;,_		igor AT watson DOT ibm DOT com
     |,4-  ) )-,_. ,\ (  `'-'		Igor Pechtchanski, Ph.D.
    '---''(_/--'  `-'\_) fL	a.k.a JaguaR-R-R-r-r-r-.-.-.  Meow!

"The Sun will pass between the Earth and the Moon tonight for a total
Lunar eclipse..." -- WCBS Radio Newsbrief, Oct 27 2004, 12:01 pm EDT

--
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