delorie.com/archives/browse.cgi | search |
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: | Wed, 7 Sep 2005 20:18:36 +0200 |
From: | Corinna Vinschen <corinna-cygwin AT cygwin DOT com> |
To: | "[ML] CygWin " <cygwin AT cygwin DOT com> |
Subject: | Re: happily messing up with raw devices (aka: lseek problems) |
Message-ID: | <20050907181836.GT5555@calimero.vinschen.de> |
Reply-To: | cygwin AT cygwin DOT com |
Mail-Followup-To: | "[ML] CygWin " <cygwin AT cygwin DOT com> |
References: | <431F266D DOT 3050604 AT lapo DOT it> <20050907174848 DOT GR5555 AT calimero DOT vinschen DOT de> <431F2D6D DOT 8000200 AT lapo DOT it> |
Mime-Version: | 1.0 |
In-Reply-To: | <431F2D6D.8000200@lapo.it> |
User-Agent: | Mutt/1.4.2i |
Try this: On Sep 7 20:11, Lapo Luchini wrote: > At the bare minumum it all boils down to: > > % cat short.c > #include <sys/stat.h> > #include <errno.h> > #include <fcntl.h> > #include <stdio.h> #include <unistd.h> > #define GAG_OFFSET 0x59BD > main() { > char sect[512]; > int dev, i; > dev = open("/dev/sdb", O_RDONLY | O_BINARY, 0); > if (dev < 0) perror("open"); > i = lseek(dev, GAG_OFFSET & (~0x1FF), SEEK_SET); > if (i < 0) perror("seek"); > } > % gcc -O -ggdb -o short short.c > % ./short > seek: Invalid argument -- 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/
webmaster | delorie software privacy |
Copyright © 2019 by DJ Delorie | Updated Jul 2019 |