delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2005/05/03/14:51:19

Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
Delivered-To: mailing list cygwin AT cygwin DOT com
Date: Tue, 3 May 2005 20:48:44 +0200
From: Corinna Vinschen <corinna-cygwin AT cygwin DOT com>
To: cygwin AT cygwin DOT com
Subject: Re: impossible to restore MBR using dd
Message-ID: <20050503184844.GB31567@calimero.vinschen.de>
Reply-To: cygwin AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
References: <050320051806 DOT 4132 DOT 4277BD93000F03C60000102422069984990A050E040D0C079D0A AT comcast DOT net>
Mime-Version: 1.0
In-Reply-To: <050320051806.4132.4277BD93000F03C60000102422069984990A050E040D0C079D0A@comcast.net>
User-Agent: Mutt/1.4.2i

On May  3 18:06, Eric Blake wrote:
> The limitation here is not in dd, but in cygwin-1.5.16's use of the underlying
> Window's features to access raw devices.  Just because Linux has chosen
> to allow a non-block access of a block-special device (implemented as a block
> read, edit, block write sequence), it does not mean that Windows has to do
> likewise.  Perhaps cygwin 1.5.17 can be patched to do a read-write sequence
> on block-special raw devices when write(2) is unaligned or not a full block, at
> which point dd would automatically work in the way you desire.  And if you
> really want that feature, consider patching cygwin yourself.  Also, from your
> original description, it sounds like write(2) was failing with ENOSPC when
> Windows rejected the non-aligned write, although the better error to comply
> with POSIX would have been ENXIO for a request outside of the device's
> capabilities.  I'd have to see an strace output to be sure (but right now I'm
> not brave enough to risk overwriting my own MBR as an experiment to generate
> such an strace output).

I like the read/write idea and I'd be happy to see a patch for this.

If you want to debug this, why not just write to /dev/fd0?  The floppy
isn't handled any different in writing to raw devices.


Corinna

-- 
Corinna Vinschen                  Please, send mails regarding Cygwin to
Cygwin Project Co-Leader          mailto:cygwin AT cygwin DOT com
Red Hat, Inc.

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

- Raw text -


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