From owner-freebsd-current Sun Sep 27 17:47:29 1998 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id RAA20025 for freebsd-current-outgoing; Sun, 27 Sep 1998 17:47:29 -0700 (PDT) (envelope-from owner-freebsd-current@FreeBSD.ORG) Received: from narnia.plutotech.com (narnia.plutotech.com [206.168.67.130]) by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id RAA20015 for ; Sun, 27 Sep 1998 17:47:23 -0700 (PDT) (envelope-from gibbs@narnia.plutotech.com) Received: (from gibbs@localhost) by narnia.plutotech.com (8.9.1/8.7.3) id SAA13233; Sun, 27 Sep 1998 18:40:41 -0600 (MDT) Date: Sun, 27 Sep 1998 18:40:41 -0600 (MDT) From: "Justin T. Gibbs" Message-Id: <199809280040.SAA13233@narnia.plutotech.com> To: shimon@simon-shapiro.org cc: current@FreeBSD.ORG Subject: Re: Raw Devices, Please Explain... Newsgroups: pluto.freebsd.current In-Reply-To: User-Agent: tin/pre-1.4-971204 (UNIX) (FreeBSD/3.0-BETA (i386)) Sender: owner-freebsd-current@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG In article 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