summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorStew Benedict <stewb@mandriva.org>2005-03-10 17:59:25 +0000
committerStew Benedict <stewb@mandriva.org>2005-03-10 17:59:25 +0000
commit07176b363fe8b3cb3c885f378c93748ef749dcfb (patch)
tree43f6030b7fbbff156f6c3c715a7337e172842a5b
parent3fb415deb585958c2e8f5cf86cfafc899fd9153a (diff)
downloaddrakx-07176b363fe8b3cb3c885f378c93748ef749dcfb.tar
drakx-07176b363fe8b3cb3c885f378c93748ef749dcfb.tar.gz
drakx-07176b363fe8b3cb3c885f378c93748ef749dcfb.tar.bz2
drakx-07176b363fe8b3cb3c885f378c93748ef749dcfb.tar.xz
drakx-07176b363fe8b3cb3c885f378c93748ef749dcfb.zip
Diskdrake mods for XBox (thks Pixel)
-rw-r--r--perl-install/diskdrake/interactive.pm5
-rw-r--r--perl-install/fs/type.pm1
-rw-r--r--perl-install/partition_table/raw.pm5
3 files changed, 10 insertions, 1 deletions
diff --git a/perl-install/diskdrake/interactive.pm b/perl-install/diskdrake/interactive.pm
index ef78889a1..bead96915 100644
--- a/perl-install/diskdrake/interactive.pm
+++ b/perl-install/diskdrake/interactive.pm
@@ -316,7 +316,7 @@ sub hd_possible_actions_interactive {
sub Clear_all {
my ($in, $hd, $all_hds) = @_;
-
+ return if is_xbox(); #- do not let them wipe the OS
my @parts = partition_table::get_normal_parts($hd);
foreach (@parts) {
RemoveFromLVM($in, $hd, $_, $all_hds) if isPartOfLVM($_);
@@ -457,6 +457,9 @@ sub part_possible_actions {
);
if (isEmpty($part)) {
if_(!$hd->{readonly}, N_("Create"));
+ } elsif ($part->{pt_type} == 0xbf) {
+ #- XBox OS partitions, do not allow anything
+ return;
} else {
grep {
my $cond = $actions{$_};
diff --git a/perl-install/fs/type.pm b/perl-install/fs/type.pm
index caada6dfb..841d6e12b 100644
--- a/perl-install/fs/type.pm
+++ b/perl-install/fs/type.pm
@@ -138,6 +138,7 @@ if_(arch() !~ /ppc/,
0xb8 => '', 'BSDI swap',
0xbb => '', 'Boot Wizard hidden',
0xbe => '', 'Solaris boot',
+ 0xbf => '', 'Microsoft XBox OS Partitions',
0xc1 => '', 'DRDOS/sec (FAT-12)',
0xc4 => '', 'DRDOS/sec (FAT-16 < 32M)',
0xc6 => '', 'DRDOS/sec (FAT-16)',
diff --git a/perl-install/partition_table/raw.pm b/perl-install/partition_table/raw.pm
index 28f0fc797..db1d40584 100644
--- a/perl-install/partition_table/raw.pm
+++ b/perl-install/partition_table/raw.pm
@@ -201,6 +201,11 @@ sub zero_MBR {
bless $hd, "partition_table::$type";
$hd->{primary} = $hd->clear_raw;
delete $hd->{extended};
+ if (is_xbox()) {
+ my $part = { start => 1, size => 15632048, pt_type => 0x0bf, isFormatted => 1 };
+ partition_table::dos::compute_CHS($hd, $part);
+ $hd->{primary}{raw}[0] = $part;
+ }
}
sub zero_MBR_and_dirty {