(no subject)

gs_stoller at juno.com gs_stoller at juno.com
Sat Feb 11 19:03:29 PST 2006


	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).




More information about the freebsd-questions mailing list