Date: Sun, 12 Feb 2006 03:02:06 GMT From: "gs_stoller@juno.com" <gs_stoller@juno.com> To: freebsd-questions@freebsd.org Subject: (no subject) Message-ID: <20060211.190237.29586.250540@webmail65.nyc.untd.com>
next in thread | raw e-mail | index | archive | help
I would like to have the source code of (the set of) programs that can "read from"/"write to" any sector of a disk without a file-system, think of them as the disk i/o programs that underly the file-system. I expect them to have (collectively) about four arguments,= one specifying the disk to access, the second pointing to a buffer (supplying the data to write or to accept the data read), the third stating the number of bytes to transfer, and the fourth giving the LBA = = address of the sector to be accessed. One function common to both the read program and the write program is the function to position the disk read/write head at the desired sector (given by its LBA ) [or notify the user via an interrupt (which one?) when that sector is at the read/write head]. This function is often named "seek". Source code with good comments are more desireable. One could combine the read & write programs into one program and add another argument telling the program whether it is to read or to write. One program that meets some of these requirements (but not all) is fdisk [it accesses only sector 0 ]. Its source would also be appreciated, all of those in the following versions of FreeBSD if available: versions 4.3, 4.7, & current-stable (6.0).
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20060211.190237.29586.250540>