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]

Bug with /cygdrive/X in binmode


I'm having trouble mounting some of my drives in binmode. As an ordinary 
user, I tried:

mount -b -f E: /cygdrive/e

To mount the E: drive in binmode. Mount reports:

$ mount
C:\cygwin\bin on /usr/bin type system (textmode)
C:\cygwin\lib on /usr/lib type system (textmode)
C:\cygwin on / type system (textmode)
E: on /cygdrive/e type user (binmode)
c: on /cygdrive/c type user (textmode,noumount)
d: on /cygdrive/d type user (textmode,noumount)
z: on /cygdrive/z type user (textmode,noumount)

Writing to files under /cydrive/e still converts \n to \r\n. I used the 
following test program (testNL.c):

#include <stdio.h>
main ()
{
FILE *fd;
fd = fopen("HelloWorld", "w");
fprintf(fd, "Hello world\n");
}

Compiled with:

gcc -g testNL.c -o testNL

Test results:

cd /cygdrive/e/Partage/Images
testNL
od -c HelloWorld
0000000   H   e   l   l   o       w   o   r   l   d  \r  \n
0000015

However, creating another binary mount point, things work as they should:

mkdir /Partage
mount -b  E:/Partage /Partage
$ mount
C:\cygwin\bin on /usr/bin type system (textmode)
C:\cygwin\lib on /usr/lib type system (textmode)
E:\Partage on /Partage type user (binmode)
C:\cygwin on / type system (textmode)
E: on /cygdrive/e type user (binmode)
c: on /cygdrive/c type user (textmode,noumount)
d: on /cygdrive/d type user (textmode,noumount)
z: on /cygdrive/z type user (textmode,noumount)

cd /Partage/Images
testNL
od -c HelloWorld
0000000   H   e   l   l   o       w   o   r   l   d  \n
0000014

It seems that users cannot remount their drives in binmode but only 
subdirectories.

cygwin version is 1.3.10-1


André Bleau, ing., associé de recherche
bleau@igb.umontreal.ca

Laboratoire de recherche en imagerie et orthopédie (LIO)
École de technologie supérieure (ETS)


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