mirror of
https://github.com/webmin/webmin.git
synced 2025-08-17 19:06:28 +00:00
21 lines
483 B
Perl
Executable File
21 lines
483 B
Perl
Executable File
|
|
do 'fdisk-lib.pl';
|
|
|
|
sub cgi_args
|
|
{
|
|
my ($cgi) = @_;
|
|
my @disks = &list_disks_partitions();
|
|
if ($cgi eq 'edit_disk.cgi') {
|
|
return @disks ? 'device='.&urlize($disks[0]->{'device'}) : 'none';
|
|
}
|
|
elsif ($cgi eq 'edit_part.cgi') {
|
|
return @disks ? 'device='.&urlize($disks[0]->{'device'}).'&part=0'
|
|
: 'none';
|
|
}
|
|
elsif ($cgi eq 'edit_hdparm.cgi') {
|
|
local @hdparm = grep { &supports_hdparm($_) } @disks;
|
|
return @hdparm ? 'disk='.$hdparm[0]->{'index'} : 'none';
|
|
}
|
|
return undef;
|
|
}
|