summaryrefslogtreecommitdiffstats
path: root/po/sc.po
diff options
context:
space:
mode:
authorThierry Vignaud <tvignaud@mandriva.org>2004-09-01 04:11:27 +0000
committerThierry Vignaud <tvignaud@mandriva.org>2004-09-01 04:11:27 +0000
commit60ae34a05aad3f8ddc9d7a18ba45ff2033ad68ac (patch)
tree11ddc36b351b36b809012d0c26ed75fdf624431e /po/sc.po
parente6159487a0d2a457cf43e6dca23aaf0e31f22379 (diff)
downloadcontrol-center-60ae34a05aad3f8ddc9d7a18ba45ff2033ad68ac.tar
control-center-60ae34a05aad3f8ddc9d7a18ba45ff2033ad68ac.tar.gz
control-center-60ae34a05aad3f8ddc9d7a18ba45ff2033ad68ac.tar.bz2
control-center-60ae34a05aad3f8ddc9d7a18ba45ff2033ad68ac.tar.xz
control-center-60ae34a05aad3f8ddc9d7a18ba45ff2033ad68ac.zip
fix benoit entry (CREDITS file is broken)
Diffstat (limited to 'po/sc.po')
-rw-r--r--po/sc.po6
1 files changed, 3 insertions, 3 deletions
diff --git a/po/sc.po b/po/sc.po
index 113ef0f8..a61b0fdf 100644
--- a/po/sc.po
+++ b/po/sc.po
@@ -5,7 +5,7 @@
msgid ""
msgstr ""
"Project-Id-Version: drakconf-sc\n"
-"POT-Creation-Date: 2004-09-01 13:07+0200\n"
+"POT-Creation-Date: 2004-09-01 13:22+0200\n"
"PO-Revision-Date: 2004-07-16 12:16+0200\n"
"Last-Translator: Antonio Pistis <antonio.pistis@virgilio.it>\n"
"Language-Team: sardu\n"
@@ -418,12 +418,12 @@ msgstr "Testadoris"
#: ../contributors.pl:52
#, c-format
-msgid "Benoit Audouard testing and bug reporting"
+msgid "Benoit Audouard"
msgstr ""
#: ../contributors.pl:52
#, c-format
-msgid "integration of eagle-usb driver"
+msgid "testing and bug reporting, integration of eagle-usb driver"
msgstr ""
#: ../contributors.pl:53
n112' href='#n112'>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
package partition_table_raw; # $Id$

use diagnostics;
use strict;

use common;
use devices;
use detect_devices;
use log;
use c;

my @MBR_signatures = (
if_(arch() =~ /ppc/,
    map { [ 'yaboot', 0, "PM", 0x200 * $_ + 0x10, "bootstrap\0" ] } 0 .. 61
),
    [ 'empty', 0, "\0\0\0\0" ],
    [ 'grub', 0, "\xEBG", 0x17d, "stage1 \0" ],
    [ 'grub', 0, "\xEBH", 0x17e, "stage1 \0" ],
    [ 'grub', 0, "\xEBH", 0x18a, "stage1 \0" ],
    [ 'grub', 0, "\xEBH", 0x181, "GRUB \0" ],
    [ 'lilo', 0x2,  "LILO" ],
    [ 'lilo', 0x6,  "LILO" ],
    [ 'grub', 0x6,  "GRUB" ],
    [ 'osbs', 0x2,  "OSBS" ], #- http://www.prz.tu-berlin.de/~wolf/os-bs.html
    [ 'pqmagic', 0xef, "PQV" ],
    [ 'BootStar', 0x130, "BootStar:" ],
    [ 'DocsBoot', 0x148, 'DocsBoot' ],
    [ 'system_commander', 0x1ad, "SYSCMNDRSYS" ],
    [ 'Be Os', 0x24, 'Boot Manager' ],
    [ 'TimO', 0, 'IBM Thinkpad hibernation partition' ],
    [ 'dos', 0xa0, "\x25\x03\x4E\x02\xCD\x13" ],
    [ 'dos', 0xa0, "\x00\xB4\x08\xCD\x13\x72" ], #- nt2k's
    [ 'dos', 0x60, "\xBB\x00\x7C\xB8\x01\x02\x57\xCD\x13\x5F\x73\x0C\x33\xC0\xCD\x13" ], #- nt's
    [ 'dos', 0x70, "\x0C\x33\xC0\xCD\x13\x4F\x75\xED\xBE\xA3" ],
    [ 'freebsd', 0xC0, "\x00\x30\xE4\xCD\x16\xCD\x19\xBB\x07\x00\xB4" ],
    [ 'freebsd', 0x160, "\x6A\x10\x89\xE6\x48\x80\xCC\x40\xCD\x13" ],
    [ 'dummy', 0xAC, "\x0E\xB3\x07\x56\xCD\x10\x5E\xEB" ], #- caldera?
    [ 'ranish', 0x100, "\x6A\x10\xB4\x42\x8B\xF4\xCD\x13\x8B\xE5\x73" ],
    [ 'os2', 0x1c2, "\xA" ],
);

sub typeOfMBR($) { typeFromMagic(devices::make($_[0]), @MBR_signatures) }
sub typeOfMBR_($) { typeFromMagic($_[0], @MBR_signatures) }

sub hasExtended { 0 }

sub cylinder_size($) {
    my ($hd) = @_;
    $hd->{geom}{sectors} * $hd->{geom}{heads};
}
sub first_usable_sector { 1 }
sub last_usable_sector { 
    my ($hd) = @_;
    $hd->{totalsectors};
}

#- default method for starting a partition, only head size or twice
#- is allowed for starting a partition after a cylinder boundarie.
sub adjustStart($$) {
    my ($hd, $part) = @_;
    my $end = $part->{start} + $part->{size};

    $part->{start} = round_up($part->{start},
			      $part->{start} % cylinder_size($hd) < 2 * $hd->{geom}{sectors} ?
   			      $hd->{geom}{sectors} : cylinder_size($hd));
    $part->{size} = $end - $part->{start};
    $part->{size} > 0 or die "adjustStart get a too small partition to handle correctly";
}
#- adjusting end to match a cylinder boundary, two methods are used and must
#- match at the end, else something is wrong and nothing will be done on
#- partition table.
#- $end2 is computed by removing 2 (or only 1 if only 2 heads on drive) groups
#- of sectors, this is necessary to handle extended partition where logical
#- partition start after 1 (or 2 accepted) groups of sectors (typically 63).
#- $end is floating (is not on cylinder boudary) so we have to choice a good
#- candidate, $end1 or $end2 should always be good except $end1 for small
#- partition size.
sub adjustEnd($$) {
    my ($hd, $part) = @_;
    my $end = $part->{start} + $part->{size};
    $end > $hd->{geom}{cylinders} * cylinder_size($hd) && $end <= $hd->{totalsectors} and return;
    my $end1 = round_down($end, cylinder_size($hd));
    my $end2 = round_up($end - ($hd->{geom}{heads} > 2 ? 2 : 1) * $hd->{geom}{sectors}, cylinder_size($hd));
    $end2 <= $hd->{geom}{cylinders} * cylinder_size($hd) or die "adjustEnd go beyond end of device geometry ($end2 > $hd->{totalsectors})";
    $part->{size} = ($end1 - $part->{start} > cylinder_size($hd) ? $end1 : $end2) - $part->{start};
    $part->{size} > 0 or die "adjustEnd get a too small partition to handle correctly";
}

sub get_geometry($) {
    my ($dev) = @_;
    my $g = "";

    local *F; sysopen F, $dev, 0 or return;
    ioctl(F, c::HDIO_GETGEO(), $g) or return;
    my %geom; @geom{qw(heads sectors cylinders start)} = unpack "CCSL", $g;
    $geom{totalcylinders} = $geom{cylinders};

    my $total;
    #- $geom{cylinders} is no good (only a ushort, that means less than 2^16 => at best 512MB)
    if ($total = c::total_sectors(fileno F)) {
	$geom{cylinders} = int $total / $geom{heads} / $geom{sectors};
    } else {
	$total = $geom{heads} * $geom{sectors} * $geom{cylinders}
    }