diff options
author | Pascal Rigaux <pixel@mandriva.com> | 1999-09-09 09:02:47 +0000 |
---|---|---|
committer | Pascal Rigaux <pixel@mandriva.com> | 1999-09-09 09:02:47 +0000 |
commit | 1d3ac921d66022bb6e19a96dce95472cc31f0987 (patch) | |
tree | 4da18678cee71134f6cec6004f0b41afe6d25145 /perl-install/devices.pm | |
parent | db4013c2a40eaeb3752cc69623037e4bb274693b (diff) | |
download | drakx-1d3ac921d66022bb6e19a96dce95472cc31f0987.tar drakx-1d3ac921d66022bb6e19a96dce95472cc31f0987.tar.gz drakx-1d3ac921d66022bb6e19a96dce95472cc31f0987.tar.bz2 drakx-1d3ac921d66022bb6e19a96dce95472cc31f0987.tar.xz drakx-1d3ac921d66022bb6e19a96dce95472cc31f0987.zip |
no_comment
Diffstat (limited to 'perl-install/devices.pm')
-rw-r--r-- | perl-install/devices.pm | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/perl-install/devices.pm b/perl-install/devices.pm index af5dd3ab1..f29ac194b 100644 --- a/perl-install/devices.pm +++ b/perl-install/devices.pm @@ -17,15 +17,15 @@ sub size($) { my $valid_offset = sub { sysseek(F, $_[0], 0) && sysread(F, my $a, 1) }; - # first try getting the size nicely + #- first try getting the size nicely my $size = 0; ioctl(F, c::BLKGETSIZE(), $size) and return unpack("i", $size) * $common::SECTORSIZE; - # sad it didn't work, well searching the size using the dichotomy algorithm! + #- sad it didn't work, well searching the size using the dichotomy algorithm! my $low = 0; my ($high, $mid); - # first find n where 2^n < size <= 2^n+1 + #- first find n where 2^n < size <= 2^n+1 for ($high = 1; $high > 0 && &$valid_offset($high); $high *= 2) { $low = $high; } while ($low < $high - 1) { @@ -46,7 +46,7 @@ sub make($) { $file = "$prefix/dev/$_"; -e $file or $file = "$prefix/tmp/$_"; } - -e $file and return $file; # assume nobody takes fun at creating files named as device + -e $file and return $file; #- assume nobody takes fun at creating files named as device if (/^sd(.)(\d{0,2})/) { $type = c::S_IFBLK(); @@ -100,7 +100,7 @@ sub make($) { }}{$_} or die "unknown device $_" }; } - # make a directory for this inode if needed. + #- make a directory for this inode if needed. mkdir dirname($file), 0755; syscall_('mknod', $file, $type | 0600, makedev($major, $minor)) or die "mknod failed (dev:$_): $!"; |