Hi,
I proposed this patch on the forum but there was not much attention there. So
maybe this list is more appropriate.
In my system I have a bunch of SATA disks that are handled as SCSI devices by
the Linux kernel. As a consequence, in the fdisk module these disks don't get
the "IDE parameter" or "SMART" links.
The patch below allows these links to be enabled for these disks. I guess
the "IDE parameter" link is more questionable as not all IDE options are
available on SATA. However this is working well enough for me.
I may have missed some implication with RAID devices and such but I don't have
any to test with.
Comments are welcome.
JC
--- fdisk/index.cgi.org 2007-10-10 12:16:50.000000000 +0200
+++ fdisk/index.cgi 2007-10-10 12:21:57.000000000 +0200
@@ -44,12 +44,12 @@
# Show links to other modules
@links = ( );
- if ($d->{'type'} eq 'ide' && $ed) {
+ if ($ed && ($d->{'type'} eq 'ide' || ($d->{'type'} eq 'scsi' &&
$d->{'model'} =~ /ATA /))) {
# Display link to IDE params form
push(@links, "<a href='edit_hdparm.cgi?".
"disk=$d->{'index'}'>$text{'index_hdparm'}</a>");
}
- if ($smart && $d->{'type'} eq 'ide') {
+ if ($smart) {
# Display link to smart module
push(@links, "<a href='../smart-status/index.cgi?".
"drive=$d->{'device'}'>$text{'index_smart'}</a>");
|