summaryrefslogtreecommitdiffstats
path: root/perl-install
diff options
context:
space:
mode:
authorGuillaume Cottenceau <gc@mandriva.com>2003-12-01 18:45:16 +0000
committerGuillaume Cottenceau <gc@mandriva.com>2003-12-01 18:45:16 +0000
commitea8b58e0f58bdfc04c1fc563501eadb85a04913c (patch)
tree6ff33f90762ef7da846df57ac47249129495b4a6 /perl-install
parentd5687fcf08f951399635388e1c5998bc5bf02276 (diff)
downloaddrakx-ea8b58e0f58bdfc04c1fc563501eadb85a04913c.tar
drakx-ea8b58e0f58bdfc04c1fc563501eadb85a04913c.tar.gz
drakx-ea8b58e0f58bdfc04c1fc563501eadb85a04913c.tar.bz2
drakx-ea8b58e0f58bdfc04c1fc563501eadb85a04913c.tar.xz
drakx-ea8b58e0f58bdfc04c1fc563501eadb85a04913c.zip
chloop support
Diffstat (limited to 'perl-install')
-rw-r--r--perl-install/devices.pm9
1 files changed, 7 insertions, 2 deletions
diff --git a/perl-install/devices.pm b/perl-install/devices.pm
index b2b44aec7..106a6db52 100644
--- a/perl-install/devices.pm
+++ b/perl-install/devices.pm
@@ -37,15 +37,19 @@ sub del_loop {
my ($dev) = @_;
run_program::run("losetup", "-d", $dev);
}
-sub find_free_loop() {
+sub find_free_loop_raw {
+ my ($o_chloop) = @_;
foreach (0..7) {
- my $dev = make("loop$_");
+ my $dev = make(($o_chloop && 'ch') . "loop$_");
+ log::l("trying $dev");
sysopen(my $F, $dev, 2) or next;
!ioctl($F, c::LOOP_GET_STATUS(), my $_tmp) && $! == 6 or next; #- 6 == ENXIO
return $dev;
}
die "no free loop found";
}
+sub find_free_loop() { find_free_loop_raw() }
+sub find_free_chloop() { find_free_loop_raw('chloop') }
sub set_loop {
my ($file, $o_encrypt_key, $o_encryption) = @_;
my $dev = find_free_loop();
@@ -115,6 +119,7 @@ sub entry {
"usb/lp" => [ c::S_IFCHR(), 180, 0 ],
"input/event" => [ c::S_IFCHR(), 13, 64 ],
"loop" => [ c::S_IFBLK(), 7, 0 ],
+ "chloop" => [ c::S_IFBLK(), 100, 0 ],
"md" => [ c::S_IFBLK(), 9, 0 ],
"nst" => [ c::S_IFCHR(), 9, 128 ],
"scd" => [ c::S_IFBLK(), 11, 0 ],