projects
/
webmin.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
93107a7
)
Allow editing partition withing allow disk (thanks to Caspar Smit)
author
Jamie Cameron
<jcameron@webmin.com>
Tue, 15 Mar 2011 18:24:10 +0000
(11:24 -0700)
committer
Jamie Cameron
<jcameron@webmin.com>
Tue, 15 Mar 2011 18:24:10 +0000
(11:24 -0700)
fdisk/fdisk-lib.pl
patch
|
blob
|
history
diff --git
a/fdisk/fdisk-lib.pl
b/fdisk/fdisk-lib.pl
index
ba9c66c
..
0ef7b37
100755
(executable)
--- a/
fdisk/fdisk-lib.pl
+++ b/
fdisk/fdisk-lib.pl
@@
-1159,8
+1159,10
@@
else { return " $_[2] $in{$_[0]}"; }
# can_edit_disk(device)
sub can_edit_disk
{
+my ($device) = @_;
+$device =~ s/\d+$//;
foreach (split(/\s+/, $access{'disks'})) {
- return 1 if ($_ eq "*" || $_ eq $
_[0]
);
+ return 1 if ($_ eq "*" || $_ eq $
device
);
}
return 0;
}