On Tue, 13 Jul 1999, John Polstra wrote:
> In article <[EMAIL PROTECTED]>,
> Brian F. Feldman <[EMAIL PROTECTED]> wrote:
> > On Tue, 13 Jul 1999, Luigi Rizzo wrote:
> >
> > > couldn't we first try lseek and only do the reads on char devs where
> > > the lseek fails ?
> >
> > lseek() won't usually fail unless it's something like EBADF. It merely
> > sets the current fd's offset. It would be nice to be able to tell from
> > a device driver if it supports seeking (da) or not (sa). Hmm... actually,
> > if we just specify somehow that we support either direct or sequential
> > access... this would be possible.
>
> It would be a big improvement if dd could handle seeking on character
> disk devices. I'm reasonably certain there exists some ioctl (perhaps
> related to reading disk labels) which could be used to figure out
> whether a character device was a disk or not. A simple fix like that
> would make dd a lot more useful for the case Luigi brought up.
Okay, I implemented it, and it's in -CURRENT. I forgot about dsioctl()...
I was thinking in majors and minors, and that they'd have to be hardcoded
in... ;) This is better.
>
> John
> --
> John Polstra [EMAIL PROTECTED]
> John D. Polstra & Co., Inc. Seattle, Washington USA
> "No matter how cynical I get, I just can't keep up." -- Nora Ephron
>
Brian Fundakowski Feldman _ __ ___ ____ ___ ___ ___
[EMAIL PROTECTED] _ __ ___ | _ ) __| \
FreeBSD: The Power to Serve! _ __ | _ \._ \ |) |
http://www.FreeBSD.org/ _ |___/___/___/
To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-hackers" in the body of the message