From 24897ac61e8f09a91ed7e0de16c19c39e2c01a9c Mon Sep 17 00:00:00 2001 From: freesource Date: Sat, 9 Mar 2002 06:50:27 +0000 Subject: [PATCH] This goes a step farther an allows ubd to be ubd\d{1] rather then confined to 1, however, mtd and mtdblock will be 0 for the first module invocation. --- BootRoot/BootRoot.pm | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/BootRoot/BootRoot.pm b/BootRoot/BootRoot.pm index 8e8898c..26abc81 100644 --- a/BootRoot/BootRoot.pm +++ b/BootRoot/BootRoot.pm @@ -1691,7 +1691,7 @@ sub uml_box { $mtd_total_size = $blocks * 1024; } $eab3->signal_connect( "changed", sub { - my $root_fs = (split(/ubd0\w?=/,$entry_advanced[10]))[1]; + my $root_fs = (split(/ubd\d{1}\w?=/,$entry_advanced[10]))[1]; if ( -f $root_fs ) { my $stat_size = (stat("$root_fs"))[12]/2; my $blocks = ($stat_size + ( $stat_size * 0.30 ))/1024; @@ -1822,7 +1822,7 @@ sub uml_box { } # Grab the file being used - if ( m,(ubd0\w?=[/\d\w-]+), ) { + if ( m,(ubd\d{1}\w?=[/\d\w-]+), ) { if ( $1 !~ /_dd/ ) { my $ubd0_replacement = $1; $ubd0 = (split(/=/,$1))[1]; @@ -1833,7 +1833,7 @@ sub uml_box { s/$ubd0_replacement/$ubd0_replacement_dd/; } else { - m,(ubd0\w?=[/\d\w-]+),; + m,(ubd\d{1}\w?=[/\d\w-]+),; $ubd0 = (split(/=/,$1))[1]; chomp $ubd0; } @@ -1919,7 +1919,7 @@ sub uml_box { # blkmtd uses the _dd images, mtdram uses the real image for ( $entry_advanced[10],$entry_advanced[9] ) { - if ( m,(ubd0\w?=[/\d\w-]+), ) { + if ( m,(ubd\d{1}\w?=[/\d\w-]+), ) { if ( $1 =~ /_dd/ ) { s/_dd//g; }