diff options
author | Martin Whitaker <mageia@martin-whitaker.me.uk> | 2020-12-19 11:02:16 +0000 |
---|---|---|
committer | Martin Whitaker <mageia@martin-whitaker.me.uk> | 2020-12-19 20:44:57 +0000 |
commit | 057a1ef4ebdf018d9f260faf34a2f40f7b2227f7 (patch) | |
tree | 38dcbe351b0ee6d8dd0ca9bb0c64fb8045d58762 /perl-install | |
parent | 7fd3a959c9158f4e8c6bd2c8a49ae19f09777498 (diff) | |
download | drakx-057a1ef4ebdf018d9f260faf34a2f40f7b2227f7.tar drakx-057a1ef4ebdf018d9f260faf34a2f40f7b2227f7.tar.gz drakx-057a1ef4ebdf018d9f260faf34a2f40f7b2227f7.tar.bz2 drakx-057a1ef4ebdf018d9f260faf34a2f40f7b2227f7.tar.xz drakx-057a1ef4ebdf018d9f260faf34a2f40f7b2227f7.zip |
Erase iso9660 signature when clearing hybrid ISO partition table (mga#27864)
Diffstat (limited to 'perl-install')
-rw-r--r-- | perl-install/NEWS | 1 | ||||
-rw-r--r-- | perl-install/install/NEWS | 2 | ||||
-rw-r--r-- | perl-install/partition_table/dos.pm | 8 |
3 files changed, 11 insertions, 0 deletions
diff --git a/perl-install/NEWS b/perl-install/NEWS index 044bc22ab..553d1d463 100644 --- a/perl-install/NEWS +++ b/perl-install/NEWS @@ -1,5 +1,6 @@ - diskdrake: o fix adding parts to extended partition on hybrid ISO (mga#27862) + o erase iso9660 signature when clearing hybrid ISO disk (mga#27864) - drakbug_report: o also try journalctl for system log o include draklive-install.log diff --git a/perl-install/install/NEWS b/perl-install/install/NEWS index 1af0987b2..b88e624d5 100644 --- a/perl-install/install/NEWS +++ b/perl-install/install/NEWS @@ -1,3 +1,5 @@ +- partitioning: + o erase iso9660 signature when clearing hybrid ISO disk (mga#27864) - support https in media URL (mga#27776) Version 18.37 - 5 December 2020 diff --git a/perl-install/partition_table/dos.pm b/perl-install/partition_table/dos.pm index 3bcb226c4..aa020131a 100644 --- a/perl-install/partition_table/dos.pm +++ b/perl-install/partition_table/dos.pm @@ -272,6 +272,12 @@ sub start_write { open $F, ">$file" or die "error opening test file $file"; } else { $F = partition_table::raw::openit($hd, 2) or die "error opening device $hd->{device} for writing"; + if ($hd->{was_hybrid_iso}) { + log::l("partition::dos::start_write erasing hybrid iso9660 signature"); + c::lseek_sector(fileno($F), 0, 0x8001) or return 0; + syswrite $F, "\0\0\0\0\0", 5 or return 0; + $hd->{was_hybrid_iso} = 0; + } } $F; } @@ -344,6 +350,8 @@ sub initialize { my ($class, $hd) = @_; # Remember whether any existing partitions are mounted, for use by need_to_tell_kernel(). $hd->{hadMountedPartitions} = 1 if any { $_->{isMounted} } partition_table::get_normal_parts($hd); + # Remember whether this was a hybrid ISO so we can wipe the iso9660 signature. + $hd->{was_hybrid_iso} = 1 if $hd->{primary}{is_hybrid_iso}; $hd->{primary} = empty_raw(); bless $hd, $class; } |