Get mkfs7 to write 8000 empty blocks to fill the bottom half before the
real filesystem in the top half.
This commit is contained in:
+17
-1
@@ -480,7 +480,7 @@ sub dump_image {
|
|||||||
my ( $format, $output ) = @_;
|
my ( $format, $output ) = @_;
|
||||||
open( my $OUT, ">", $output ) || die("Can't write to $output: $!\n");
|
open( my $OUT, ">", $output ) || die("Can't write to $output: $!\n");
|
||||||
|
|
||||||
# list: Octal output with block comments
|
# list: Octal output with block comments. We don't dump the first 8K blocks
|
||||||
if ( $format eq "list" ) {
|
if ( $format eq "list" ) {
|
||||||
foreach my $blocknum ( 0 .. NUMBLOCKS - 1 ) {
|
foreach my $blocknum ( 0 .. NUMBLOCKS - 1 ) {
|
||||||
printf( $OUT "Block %d (%06o)\n", $blocknum, $blocknum );
|
printf( $OUT "Block %d (%06o)\n", $blocknum, $blocknum );
|
||||||
@@ -506,6 +506,14 @@ sub dump_image {
|
|||||||
|
|
||||||
# ptr: Each word into three bytes, a sixbit in each one
|
# ptr: Each word into three bytes, a sixbit in each one
|
||||||
if ( $format eq "ptr" ) {
|
if ( $format eq "ptr" ) {
|
||||||
|
# Dump 8000 empty blocks first
|
||||||
|
foreach my $blocknum ( 0 .. NUMBLOCKS - 1 ) {
|
||||||
|
foreach my $offset ( 0 .. WORDSPERBLK ) {
|
||||||
|
print( $OUT word2three( 0 ) );
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
# Now the real blocks
|
||||||
foreach my $blocknum ( 0 .. NUMBLOCKS - 1 ) {
|
foreach my $blocknum ( 0 .. NUMBLOCKS - 1 ) {
|
||||||
foreach my $offset ( 0 .. WORDSPERBLK ) {
|
foreach my $offset ( 0 .. WORDSPERBLK ) {
|
||||||
print( $OUT word2three( $Block[$blocknum][$offset] || 0 ) );
|
print( $OUT word2three( $Block[$blocknum][$offset] || 0 ) );
|
||||||
@@ -515,6 +523,14 @@ sub dump_image {
|
|||||||
|
|
||||||
# simh: Each word into four bytes, little endian
|
# simh: Each word into four bytes, little endian
|
||||||
if ( $format eq "simh" ) {
|
if ( $format eq "simh" ) {
|
||||||
|
# Dump 8000 empty blocks first
|
||||||
|
foreach my $blocknum ( 0 .. NUMBLOCKS - 1 ) {
|
||||||
|
foreach my $offset ( 0 .. WORDSPERBLK ) {
|
||||||
|
print( $OUT pack( "CCCC", 0,0,0,0));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
# Now the real blocks
|
||||||
foreach my $blocknum ( 0 .. NUMBLOCKS - 1 ) {
|
foreach my $blocknum ( 0 .. NUMBLOCKS - 1 ) {
|
||||||
foreach my $offset ( 0 .. WORDSPERBLK ) {
|
foreach my $offset ( 0 .. WORDSPERBLK ) {
|
||||||
my $word = $Block[$blocknum][$offset] || 0;
|
my $word = $Block[$blocknum][$offset] || 0;
|
||||||
|
|||||||
Reference in New Issue
Block a user