Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 27 Sep 1998 18:40:41 -0600 (MDT)
From:      "Justin T. Gibbs" <gibbs@narnia.plutotech.com>
To:        shimon@simon-shapiro.org
Cc:        current@FreeBSD.ORG
Subject:   Re: Raw Devices, Please Explain...
Message-ID:  <199809280040.SAA13233@narnia.plutotech.com>
In-Reply-To: <XFMail.980927200001.shimon@simon-shapiro.org>

next in thread | previous in thread | raw e-mail | index | archive | help
In article <XFMail.980927200001.shimon@simon-shapiro.org> you wrote:
> $ dd if=/dev/rda4s4d of=/dev/null bs=1 count=1
> dd: /dev/rda4s4d: Invalid argument
> 0+0 records in
> 0+0 records out
> 0 bytes transferred in 0.078265 secs (0 bytes/sec)
> root@nomiS on ttyp6 at Sun Sep 27 in /usr/local/src/st 1.[158]
> $ dd if=/dev/rda4s4d of=/dev/null bs=512 count=1
> 1+0 records in
> 1+0 records out
> 512 bytes transferred in 0.000723 secs (708156 bytes/sec)
> 
> Cannot read one byte form a CHARACTER device?

The character device is a "raw" device.  This means you must talk
to the device in terms of the data sizes it understands.  In otherwords,
you are talking directly to the device, so you must perform any necessary
buffering for your application.  'dd' doesn't do this for sizes that
aren't a multiple of the device block size.

--
Justin

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-current" in the body of the message



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199809280040.SAA13233>