summaryrefslogtreecommitdiffstats
path: root/perl-install/harddrake
ModeNameSize
-rw-r--r--TODO5923logstatsplain
-rw-r--r--data.pm4494logstatsplain
-rw-r--r--sound.pm8169logstatsplain
-rw-r--r--ui.pm10525logstatsplain
-rw-r--r--v4l.pm8749logstatsplain
97' href='#n97'>97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202
package partition_table::sun; # $Id$

use diagnostics;
use strict;
use vars qw(@ISA);

@ISA = qw(partition_table::raw);

use common;
use partition_table::raw;
use partition_table;
use fs::type;
use c;

my ($main_format, $main_fields) = list2kv(
  a128  => 'info',
  a14   => 'spare0',
  a32   => 'infos',
  a246  => 'spare1',
  n     => 'rspeed',
  n     => 'pcylcount',
  n     => 'sparecyl',
  a4    => 'spare2',
  n     => 'ilfact',
  n     => 'ncyl',
  n     => 'nacyl',
  n     => 'ntrks',
  n     => 'nsect',
  a4    => 'spare3',
  a64   => 'partitions',
  n     => 'magic',
  n     => 'csum',
);
$main_format = join '', @$main_format;

my ($fields1, $fields2) = ([ qw(pt_type flags) ], [ qw(start_cylinder size) ]);
my ($format1, $format2) = ("xCxC", "N2");
my $magic = 0xDABE;
my $nb_primary = 8;
my $offset = 0;

sub adjustStart($$) {
    my ($hd, $part) = @_;
    my $end = $part->{start} + $part->{size};

    #- since partition must always start on cylinders boundaries on sparc,
    #- note that if start sector is on the first cylinder, it is adjusted
    #- to 0 and it is valid, cylinder 0 bug is from bad define for sparc
    #- compilation of mke2fs combined with a blind kernel...
    $part->{start} = round_down($part->{start}, $hd->cylinder_size);
    $part->{size} = $end - $part->{start};
    $part->{size} = $hd->cylinder_size if $part->{size} <= 0;
}
sub adjustEnd($$) {
    my ($hd, $part) = @_;
    my $end = $part->{start} + $part->{size};
    my $end2 = round_up($end, $hd->cylinder_size);