This is the mail archive of the cygwin@cygwin.com 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]

Re: df --local


On Sat, 21 Sep 2002, Michael A Chase wrote:

> On Sat, 21 Sep 2002 12:46:13 -0400 (EDT) Igor Pechtchanski <pechtcha@cs.nyu.edu> wrote:
>
> > On Sat, 21 Sep 2002, egor duda wrote:
> >
> > > Friday, 20 September, 2002 Rob Brown rob@mp3.com wrote:
> > >
> > > RB> OK, that will *mostly* work except for the cdrom drive issue.
> > >
> > > The proper way is to convert path to win32 form and then use
> > > GetDriveType() and GetVolumeInformation() APIs.
> >
> > This is related to the question I asked on the cygwin-developers list (
> > http://www.cygwin.com/ml/cygwin-developers/2002-09/msg00078.html ).  Maybe
> > people can discuss it here...
> >
> > Basically, Cygwin's getmntent() returns either "user" or "system" as the
> > fstype, whereas on other systems (Linux, etc) the fstype is the type of
> > the filesystem (cdrom, nfs, local, etc).  I was proposing a change to make
> > the user/system distinction part of mnt_opts, and set the type field to
> > whatever's returned by GetVolumeInformation().  This method is called in
> > path.cc anyway, to distinguish Samba filesystems...
>
> It sounds like a good idea to me.  I found the current values being used in
> a few places.
>
> newlib/libc/sys/linux/fstab.c
>    Just passing the value through.
>
> newlib/libc/sys/linux/mntent_r.c
>    Extracting the value from a string.
>    I'm not sure where the string is created, possibly path.cc.
>
> winsup/cygwin/path.cc
>    Converts bits in flags to string ("user" or "system").
>
> winsup/utils/cygcheck.cc
>    Prints whatever it finds in mnt->mnt_type.
>
> winsup/utils/mount.cc
>    Uses current values of mnt_type several places.
>
> winsup/utils/path.cc
>    Converts m->issys to string ("user" or "system").
>
> winsup/utils/umount.cc
>    Tests p->mnt_type for current values.
>
> It looks like the main confusion would come from people parsing the output
> from cygcheck or mount and expecting the current values of "user" or
> "system".

Thanks for doing this research.  These are the obvious places.  I was
afraid that I'd break something non-obvious in some package that I don't
currently have the source for...  If people agree it's a good idea, I'll
start on the implementation.
	Igor
-- 
				http://cs.nyu.edu/~pechtcha/
      |\      _,,,---,,_		pechtcha@cs.nyu.edu
ZZZzz /,`.-'`'    -.  ;-;;,_		igor@watson.ibm.com
     |,4-  ) )-,_. ,\ (  `'-'		Igor Pechtchanski
    '---''(_/--'  `-'\_) fL	a.k.a JaguaR-R-R-r-r-r-.-.-.  Meow!

"Water molecules expand as they grow warmer" (C) Popular Science, Oct'02, p.51


--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Bug reporting:         http://cygwin.com/bugs.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]