This is the mail archive of the cygwin 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: Is it OK to mount cygdrive on / ?


Greetings, Rustam!

> I've added an extra / mountpoint in /etc/fstab in order to be able to
> access C: without /cygdrive like this:

> none /cygdrive cygdrive binary,posix=0,user 0 0
> none /         cygdrive binary,posix=0,user 0 0

Only one cygdrive mount is effective.

> It seems to work, I can access the C: drive with just /c.

> But normally an "ls /cygdrive" should list the drives, whereas "ls /"
> lists the contents of the Cygwin root. So it seems there are now two
> root mountpoints overlaying each other.

> So I was wondering if my approach is if this is technically undefined
> behavior and might conceivably break something or is it OK (less the
> drive listing limitation mentioned above).

Undefined behavior, but only because you're using two mount entries at once.
Accessing drive letters directly from inside Cygwin is often considered a grey area.
Too much may happen on this border. You have to clearly understand, how Cygwin
interact with other system, to avoid issues.
If you want to access Windows path, recommended route lies through the use of
cygpath utility to convert native paths to the Cygwin scheme. Et vice versa.


-- 
With best regards,
Andrey Repin
Saturday, February 4, 2017 17:17:15

Sorry for my terrible english...


--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]