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: devices and mount points


On Mon, 12 May 2003, Larry Hall (RFK Partners, Inc.) wrote:

> Robert Citek wrote:
> > Hello all,
> >
> > Is there an easy way to discover what device is mounted to what drive?
> >
> > Specifically, I have a CD drive.  If I put a CD into the drive, I can
> > access it at the filesystem level as /cygdrive/d/.  However, mount does not
> > tell me what device the CD drive is.  It only says d: is mounted on
> > /cygdrive/d/.  I eventually discovered that is was /dev/scd4, but not
> > before trying devices /dev/scd[0-3].
> >
> > To get a list of all devices I tried 'ls -la /dev/*' but that did not work.
> >  I also searched the archives using "CD device" and "/dev/ mount" but did
> > not see anything relevant.
> >
> > Any pointers?
>
> Cygwin mount is not the same as a UNIX mount.  It doesn't mention (or
> need) devices.  It's really just a mapping of one file system notation
> into another.  Cygwin emulates certain common UNIX devices but these are
> virtual.  They don't show up in the file system by default (you can create
> explicit names for them if you like).  The best way to find out the
> currently supported virtual devices is to grep through the Cygwin code
> for them.

Here are a couple of scripts (well, one's a batch file) I whipped up a
while ago to create physical zero-length files so that "ls /dev" works
correctly.  They should be run from "/cygdrive/c/cygwin/dev", the .bat
first, and then the .sh to create symbolic links.  I was going to suggest
putting them in the base-files package, but with the coming of mkdev(),
/dev will cease to be a virtual directory, so there is really no point.
Use 'em while you can! ;-)
	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!

Knowledge is an unending adventure at the edge of uncertainty.
  -- Leto II

Attachment: create_devices.bat
Description: Text document

Attachment: create_devices.sh
Description: Text document

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