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: Accessing ram drive as raw disk volume fails?


On Thu, 30 Nov 2006, Dave Korn wrote:

>     Hi all,
>
>   I'm trying to use dd to dump stuff to a usb flash drive (i.e. mass
> storage device).  However something tricks it into thinking the device
> is full (/dev/sdb is the pendrive):
>
> dk@CHILLI ~
> $ dd if=/tmp/msd-test-data.cXoEqa2332 of=/dev/sdb bs=100 count=1
> dd: writing `/dev/sdb': No space left on device
> 1+0 records in
> 0+0 records out
>
> dk@CHILLI ~
> $
>
>   Reading from it is no problem:
>
> dk@CHILLI ~
> $ dd if=/dev/sdb bs=100 count=1 | od -c
> 1+0 records in
> 1+0 records out
> 0000000 353   < 220   M   S   D   O   S   5   .   0  \0 002 001 006  \0
> 0000020 002  \0 002   @  \0 370 001  \0 001  \0 001  \0  \0  \0  \0  \0
> 0000040  \0  \0  \0  \0  \0  \0   )   {   6 354 024   N   O       N   A
> 0000060   M   E                   F   A   T   1   2               3 311
> 0000100 216 321 274 360   { 216 331 270  \0     216 300 374 275  \0   |
> 0000120   8   N   $   }   $ 213 301 231 350   < 001   r 034 203 353   :
> 0000140   f 241 034   |
> 0000144
>
> dk@CHILLI ~
> $
>
> Is this expected behaviour under cygwin?  What does "no space left on
> device" even mean for a raw disk volume as opposed to a logical volume /
> partition?

strace or gdb should be helpful in identifying the Windows error code that
is mapped by Cygwin to ENOSPC.  From a quick look at the code, this could
be a general write error, but I haven't spent all that much time looking
at it.
	Igor
-- 
				http://cs.nyu.edu/~pechtcha/
      |\      _,,,---,,_	    pechtcha@cs.nyu.edu | igor@watson.ibm.com
ZZZzz /,`.-'`'    -.  ;-;;,_		Igor Peshansky, Ph.D. (name changed!)
     |,4-  ) )-,_. ,\ (  `'-'		old name: Igor Pechtchanski
    '---''(_/--'  `-'\_) fL	a.k.a JaguaR-R-R-r-r-r-.-.-.  Meow!

Freedom is just another word for "nothing left to lose"...  -- Janis Joplin

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