2 # Functions for parsing this module's logs
6 # parse_webmin_log(user, script, action, type, object, ¶ms)
7 # Converts logged information from this module into human-readable form
10 local ($user, $script, $action, $type, $object, $p) = @_;
11 if ($type eq 'part') {
12 return &text("log_${action}", &part_name2($object, $p->{'np'}));
14 elsif ($action eq 'mkfs' || $action eq 'tunefs' || $action eq 'fsck') {
15 return &text("log_${action}", "<tt>".uc($p->{'type'})."</tt>",
18 elsif ($action eq 'hdparm') {
19 return &text('log_hdparm', &device_name($object));
28 return $_[0] =~ /^\/dev\/(s|h)d([a-z])$/ ?
29 &text('select_part', $1 eq 's' ? 'SCSI' : 'IDE', uc($2), $_[1]) :
30 $_[0] =~ /rd\/c(\d+)d(\d+)$/ ?
31 &text('select_mpart', "$1", "$2", $_[1]) :
32 $_[0] =~ /ida\/c(\d+)d(\d+)$/ ?
33 &text('select_cpart', "$1", "$2", $_[1]) :
39 return $_[0] =~ /^\/dev\/(s|h)d([a-z])(\d+)$/ ?
40 &text('select_part', $1 eq 's' ? 'SCSI' : 'IDE', uc($2), "$3") :
41 $_[0] =~ /rd\/c(\d+)d(\d+)p(\d+)$/ ?
42 &text('select_mpart', "$1", "$2", "$3") :
43 $_[0] =~ /ida\/c(\d+)d(\d+)p(\d+)$/ ?
44 &text('select_cpart', "$1", "$2", "$3") :
50 return $_[0] =~ /^\/dev\/(s|h)d([a-z])$/ ?
51 &text('select_device', $1 eq 's' ? 'SCSI' : 'IDE', uc($2)) :
52 $_[0] =~ /rd\/c(\d+)d(\d+)$/ ?
53 &text('select_mylex', "$1", "$2") :
54 $_[0] =~ /ida\/c(\d+)d(\d+)$/ ?
55 &text('select_cpq', "$1", "$2") :