Re: bcwipe won't wipe a block device...

From: John-Mark Gurney <gurney_j_at_efn.org>
Date: Fri, 20 Feb 2004 10:36:34 -0800
Peter Jeremy wrote this message on Fri, Feb 20, 2004 at 18:23 +1100:
> On Thu, Feb 19, 2004 at 03:50:09PM -0500, Aaron Peterson wrote:
> >The output was too long I though to post back to the list from
> >ktrace/kdump...  you can read it here:
> >
> >http://www.alpete.com/bcwipe.kdump.txt
> 
> Summary: bcwipe is trying to read 1 byte from an offset of 2^N-1.
> FreeBSD no longer has block devices (since 4.0) - /dev/da0 is a
> character device.  Character devices can only be read in blocksize
> units (typically 512 bytes for disks).  You need to fix bcwipe to
> handle character devices.

this can be done by using the fstat call on the device node.. it will
provide both the proper block size (so it'll work w/ md swap backed
devices that have a 4k block size) and device size...

-- 
  John-Mark Gurney				Voice: +1 415 225 5579

     "All that I will do, has been done, All that I have, has not."
Received on Fri Feb 20 2004 - 09:36:39 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:37:44 UTC