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: How to remount hotplugged USB drive as noacl (for use with rsync)?


On Feb  4 22:47, Marco Atzeri wrote:
> On 04/02/2014 22:41, carolus wrote:
> 
> >
> >>You're not remounting the Cygwin root.
> >
> >I'm confused by this statement. Isn't /cygdrive/c/cygwin/ the same as
> >Cygwin root?
> 
> YES

Uhm... no?

You have to look at this from the POSIX path angle.

"/" is not the same as "/cygdrive/c/cygwin", even if, under the hood,
they resolve to the same Windows path.  For every POSIX path, the mount
flags are taken from the matching fstab entry.  So, take two fstab
entries:

  C:/foo /bar some_fs binary 0 0
  C:/foo /baz some_fs text 0 0 

If you write to a file under /bar, it will be written in binary mode,
if you write to the exact same file under /baz, it will be written in
text mode:

  $ cd /bar
  $ echo Hallo > blub
  $ od -c blub
  0000000   H   e   l   l   o  \n
  0000006
  [~]$ cd /baz
  [~]$ echo Hello > blub
  [~]$ od -c blub
  0000000   H   e   l   l   o  \r  \n
  0000007

Does this example make it clearer?


Corinna

-- 
Corinna Vinschen                  Please, send mails regarding Cygwin to
Cygwin Maintainer                 cygwin AT cygwin DOT com
Red Hat

Attachment: pgpE6IFphcqwZ.pgp
Description: PGP signature


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