The SunOS format program dumps and loads files of bad blocks. The first line
of these files contains information that allows it to read the rest of the
file. This line contains three space separated fields
1) a magic number
2) the count of the number of bad blocks in the list
3) a checksum.
There are two possible values for the magic number.
0x89898989 tells format to believe the checksum
0x1 tells format to ignore the checksum
The checksum itself is calculated as a simple rolling xor of the structure
that contains the deflect list (using 32 bit ints pieces of the structure
each time).
While one could calculate the checksum, it turns out to be easier to tell
format to simply ignore them. When this is done, format will gladly read
a file that has been construted by hand.
My thanks to those out there who knew and shared this information with me.
magi David Wiseman, Network Manager e-mail: magi@csd.uwo.CA
Department of Computer Science
The University of Western Ontario fax: +1 519 661 3515
London Ontario Canada N6A 5B7 voice: +1 519 679 2111 x6879
-------------------------------------------------------------------------------
Never attribute to malice what can be adequately explained by stupidity.
This archive was generated by hypermail 2.1.2 : Fri Sep 28 2001 - 23:06:38 CDT