www.delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2000/09/13/16:02:17

Mailing-List: contact cygwin-help AT sourceware DOT cygnus DOT com; run by ezmlm
List-Subscribe: <mailto:cygwin-subscribe AT sources DOT redhat DOT com>
List-Archive: <http://sources.redhat.com/ml/cygwin/>
List-Post: <mailto:cygwin AT sources DOT redhat DOT com>
List-Help: <mailto:cygwin-help AT sources DOT redhat DOT com>, <http://sources.redhat.com/ml/#faqs>
Sender: cygwin-owner AT sources DOT redhat DOT com
Delivered-To: mailing list cygwin AT sources DOT redhat DOT com
Message-ID: <39BFDCED.6B3165E9@cygnus.com>
Date: Wed, 13 Sep 2000 22:00:45 +0200
From: Corinna Vinschen <vinschen AT cygnus DOT com>
Reply-To: cygwin <cygwin AT sources DOT redhat DOT com>
X-Mailer: Mozilla 4.75 [en] (X11; U; Linux 2.2.16 i686)
X-Accept-Language: de, en
MIME-Version: 1.0
To: cygwin list <cygwin AT sources DOT redhat DOT com>
Subject: Re: dd if=/cygdrive/a of=foo.img doesn't work
References: <000913093111C2 DOT 21827 AT weba8 DOT iname DOT net> <39BFA889 DOT 4ECC07E2 AT veritas DOT com>

Bob McGowan wrote:
> First, you need access to the Windows physical device, second it needs
> to be mounted:
> 
>   mount -b //./a: /dev/fd0
> 
> then:
> 
>   dd if=/dev/fd0 of=file
> 
> I'm not sure if the -b option of mount is required, I use it to be
> safe.

It is required. The raw device handler implements only the raw
read/write access which is explicitely binary. The next layer
(read(2)/write(2) calls) uses text and binmode as usual, though.

> I also use -s with mount to make it a system wide mount so other
> users (if any) will see it also.  And I tend to use the dd option bs=18k
> which will do track at a time read/write of a 1.44MB floppy (80
> tracks).  This makes a difference on standard UNIX systems.  I don't
> know if it impacts performance for Cygwin.

It won't noticably. The primary performance factor is the
internally used buffer. Each file descriptor of an raw device has
an internal buffer associated which is by default 60K. I chose
that value to have a large common multiplier for typical cpio and
tar buffering.

To change the performance the application would need to change
that internal buffer after opening the file. There's a ioctl()
call for that. The appropriate header for that ioctl() call is
/usr/include/cygwin/rdevio.h.

Corinna

-- 
Corinna Vinschen                  Please, send mails regarding Cygwin to
Cygwin Developer                        mailto:cygwin AT sources DOT redhat DOT com
Red Hat, Inc.
mailto:vinschen AT cygnus DOT com

--
Want to unsubscribe from this list?
Send a message to cygwin-unsubscribe AT sourceware DOT cygnus DOT com

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019