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

-b bug, feature or oddity ?


I've been playing around with mount -b, and stumbled
across something that surprised me a bit.

a) I have a "binary file" (in this case: a file with
   a CTRL-Z character at the start of line two):

   SOROKIN ~> cd /
   SOROKIN /> od -c foo
   0000000   L   i   n   e       1  \r  \n 032   L   i   n   e       2  \r
   0000020  \n
   0000021

b) If I try to 'cat' the file, it gets truncated. Fair enough:

   SOROKIN /> cat foo
   Line 1
   SOROKIN />

c) I decide to create a binary mountpoint in order to be able to
   see the entire file:

   SOROKIN /> mount -b D: /binpoint
   SOROKIN /> mount
   Device           Directory           Type        Flags
   \\.\tape1:       /dev/st1            native      text!=binary
   \\.\tape0:       /dev/st0            native      text!=binary
   \\.\b:           /dev/fd1            native      text!=binary
   \\.\a:           /dev/fd0            native      text!=binary
   D:               /binpoint           native      text=binary
   D:               /                   native      text!=binary

d) I test the new mountpoint

   SOROKIN /> cat /binpoint/foo
   Line 1
   Line 2
   SOROKIN /> 

e) Worked just great. But here comes the catch:

   SOROKIN /> cat /foo
   Line 1
   Line 2
   SOROKIN /> cat //d/foo
   Line 1
   Line 2
   SOROKIN /> cat 'D:\foo'
   Line 1
   Line 2
   SOROKIN /> 

   Ooops. It isn't just /binpoint that has become binary, it is
   all references to D: !


Why is this, is it as it should be, and is it documented anywhere?


In advance thanks, 

Bjorn

-
For help on using this list (especially unsubscribing), send a message to
"gnu-win32-request@cygnus.com" with one line of text: "help".


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