Adjust memory layout for 2.6.22+ kernels with 32KB setup code
[mknbi.git] / disdosbb.pl
1 #!/usr/bin/perl -w
2 if ($#ARGV >= 0) {
3         open(STDIN, "$ARGV[0]") or die "$ARGV[0]: $!\n";
4 }
5 binmode(STDIN);
6 $nread = read(STDIN, $params, 0x3e);
7 (defined($nread) and $nread == 0x3e) or die "Cannot read 0x3e bytes of boot block\n";
8 (undef,
9         $oem_name,
10         $bytes_per_sector,
11         $sectors_per_cluster,
12         $reserved_sectors,
13         $fat_copies,
14         $root_dir_entries,
15         $total_disk_sectors,
16         $media_descriptor,
17         $sectors_per_fat,
18         $sectors_per_track,
19         $sides,
20         $hidden_sectors_low,
21         $hidden_sectors_high,
22         $total_num_sectors,
23         $phys_drive_number_1,
24         $phys_drive_number_2,
25         $boot_record_sig,
26         $vol_serial_num,
27         $volume_label,
28         $file_system_id) = unpack('A3a8vCvCvvCvvvvvVCCCVa11a8', $params);
29         print <<EOF;
30 oem_name: $oem_name
31 bytes_per_sector: $bytes_per_sector
32 sectors_per_cluster: $sectors_per_cluster
33 reserved_sectors: $reserved_sectors
34 fat_copies: $fat_copies
35 root_dir_entries: $root_dir_entries
36 total_disk_sectors: $total_disk_sectors
37 media_descriptor: $media_descriptor
38 sectors_per_fat: $sectors_per_fat
39 sectors_per_track: $sectors_per_track
40 sides: $sides
41 hidden_sectors_low: $hidden_sectors_low
42 hidden_sectors_high: $hidden_sectors_high
43 total_num_sectors: $total_num_sectors
44 phys_drive_number_1: $phys_drive_number_1
45 phys_drive_number_2: $phys_drive_number_2
46 boot_record_sig: $boot_record_sig
47 vol_serial_num: $vol_serial_num
48 volume_label: $volume_label
49 file_system_id: $file_system_id
50 EOF