perltidyrc and devicescan
in ptable.pm the devicescan was buggy - issuing tons of warnings
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/.perltidyrc Fri Jan 15 20:38:38 2010 +0100
@@ -0,0 +1,2 @@
+--paren-tightness=2
+--square-bracket-tightness=2
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/SI/.perltidyrc Fri Jan 15 20:38:38 2010 +0100
@@ -0,0 +1,1 @@
+../.perltidyrc
\ No newline at end of file
--- a/SI/ptable.pm Fri Jan 15 01:16:12 2010 +0100
+++ b/SI/ptable.pm Fri Jan 15 20:38:38 2010 +0100
@@ -23,11 +23,13 @@
my ($current, %dev);
foreach (`sfdisk -d 2>/dev/null`) {
chomp;
+ ### $_
if (/^# partition table .*?(\/\S+)/) {
$current = (stat $1)[6] >> 8 == $devmapper ? undef : $1
and push(@{$dev{$current}}, $_);
next;
}
+ next if not $current;
push @{$dev{$current}}, $_;
}
### partiton tables of useful blockdevices:
--- a/si Fri Jan 15 01:16:12 2010 +0100
+++ b/si Fri Jan 15 20:38:38 2010 +0100
@@ -11,13 +11,14 @@
my $OUT = "out";
+unlink(glob("$OUT/*"));
-d $OUT or mkdir($OUT, 0700) or die "Can't mkdir $OUT: $!\n";
-my %physical;
+my %devices;
-SI::ptable::info("$OUT/partitions.%s", %physical);
-SI::blkid::info("$OUT/blkid", %physical);
-SI::lvm::vg_info("$OUT/vg.%s", %physical);
+SI::ptable::info("$OUT/partitions.%s", %devices);
+SI::blkid::info("$OUT/blkid", %devices);
+SI::lvm::vg_info("$OUT/vg.%s", %devices);
-### %physical
+### %devices;