delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2005/09/07/13:42:22

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
Message-ID: <431F266D.3050604@lapo.it>
Date: Wed, 07 Sep 2005 19:42:05 +0200
From: Lapo Luchini <lapo AT lapo DOT it>
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.2; en-US; rv:1.7.6) Gecko/20050317 Thunderbird/1.0.2 Mnenhy/0.7.2.0
MIME-Version: 1.0
To: "[ML] CygWin " <cygwin AT cygwin DOT com>
Subject: happily messing up with raw devices (aka: lseek problems)

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hi there.
I'm (trying to) writing a program to configure a GAG boot manager
installation (gag.sf.net) from command line, while trying to create a
program as portable as possible.

I began the developement under FreeBSD, and there I learnt that
/dev/ad0 (FreeBSD's /dev/sda) must be read at 512 bytes block size
(which seems quite natural but, well, I tought the OS would have done
the necessary things by himself, not being overly complicate at all ni
reading and not so complicate in writing too).

Once I got a fairly fuctioning program in FreeBSD I tried it on Cygwin
(as by te way my FreeBSD box does *not* use GAG, so once succeding to
read the wanted sector and printing the string "GAG not detected" I
couldn't really go on).

Under Cygwin, for a change, the problem is in the lseek I use to skipp
the first 4 sectors in order to read the 45th (the one that contains
te actual data I'm interested into).

Is is normal that Cygwin's lseek doesn't work on /dev/sda?
What should I do?
My own personal work-around would be to read all those 44 sectors (and
discarding them), but I don't like that very much, is there some
better/cleaner alternative?

If anyone wants to see the source code, it's all in my Monotone
server, so either
    monotone pull cyberx.lapo.it it.lapo.gagulator
or browse it online:
    http://cyberx.lapo.it/viewmtn/branch.psp?branch=it.lapo.gagulator

    Lapo

PS: why doesn't Cygwin's man include man2 pages such as lseek? =)

- --
Lapo Luchini
lapo AT lapo DOT it (OpenPGP & X.509)
www.lapo.it (ICQ UIN: 529796)
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.1 (Cygwin)
Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org

iQIcBAEBAgAGBQJDHyZtAAoJELBiMTth2oCDA9kQAI6ncnDgdBCcLrI+6kSwWOZ/
IdvpNAyEAwaARGRJc/DRMeiGtpxrxQYkA7OEQhqLXHlQre9NCjlJcHacx5awC7PA
QxJgG9gr13oVCoQ3JXC6EJXUJ++atHzRmYxcDobRr71YlLENpPxGI7GkUz71Dv/o
nSWvVWpp0p3vXcwKcLCzHqSBsD0Fpjx0kDHr1EsU7ya79WyU/dwymHbRy+dmvrN3
t8zL4R/4dwhEpozVcL/df42DhghYDV8bqCCS6G7lI/yk/Nrqm2LWvOVBfD0ScW1n
liZx3ztRMGBakKaVYs309mNQzi5aFmb2sFIY2IaTLftjwOWlJvZV5WLXWs6XjxMG
QJTtKHRyDf8eSWITEzgTboo7eGrs790WLNNa46TQ/DpmWR8sp2ZjmOzoSII0UE+W
yGpdZQF28fpMi3BpxnD2ce01kRVc2elKJkDDjAqGKI0n4PYuE5OLc4zKIYOUOsoP
LUWyCFJcFY9l5PCFTS0D0cZOSl9zYlw/mVMtxYbywtl4C9Cfz1rWgyR8NyyG7MXI
rOyBnZ5HjkEDyn4qTQStSgKgTgPLEoQvsd2VlmPlsMeT0T4yIb1gep25tZW8LRoQ
3k+w+ZAVevMjsdRECae2tVkxgKTn84r0Okl2GFAXHQFm8Td6ZeV9tTSASuGl7XKS
VzJ/psK4V+JCS3qi0YjD
=Mvhb
-----END PGP SIGNATURE-----


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