hddtemp plugin: Use SCSI_DISK8_MAJOR thru SCSI_DISK15_MAJOR only if available.
authorSebastian Harl <sh@tokkee.org>
Tue, 19 Feb 2008 11:24:53 +0000 (12:24 +0100)
committerFlorian Forster <octo@huhu.verplant.org>
Tue, 26 Feb 2008 10:27:30 +0000 (11:27 +0100)
Some Linux versions don't seem to provide the major numbers 8 thru 15.

Signed-off-by: Sebastian Harl <sh@tokkee.org>
Signed-off-by: Florian Forster <octo@huhu.verplant.org>
src/hddtemp.c

index 0a93920..1047077 100644 (file)
@@ -304,6 +304,7 @@ static int hddtemp_init (void)
                                case SCSI_DISK5_MAJOR:
                                case SCSI_DISK6_MAJOR:
                                case SCSI_DISK7_MAJOR:
+#ifdef SCSI_DISK8_MAJOR
                                case SCSI_DISK8_MAJOR:
                                case SCSI_DISK9_MAJOR:
                                case SCSI_DISK10_MAJOR:
@@ -312,6 +313,7 @@ static int hddtemp_init (void)
                                case SCSI_DISK13_MAJOR:
                                case SCSI_DISK14_MAJOR:
                                case SCSI_DISK15_MAJOR:
+#endif /* SCSI_DISK8_MAJOR */
                                        /* SCSI disks minors are multiples of 16.
                                         * Keep only those. */
                                        if (minor % 16)