From: Sebastian Harl Date: Tue, 19 Feb 2008 11:24:53 +0000 (+0100) Subject: hddtemp plugin: Use SCSI_DISK8_MAJOR thru SCSI_DISK15_MAJOR only if available. X-Git-Tag: collectd-4.2.5~11 X-Git-Url: https://git.verplant.org/?a=commitdiff_plain;h=0a5bd9f384dbbd5674c391ae0420e7593fcdc80d;p=collectd.git hddtemp plugin: Use SCSI_DISK8_MAJOR thru SCSI_DISK15_MAJOR only if available. Some Linux versions don't seem to provide the major numbers 8 thru 15. Signed-off-by: Sebastian Harl Signed-off-by: Florian Forster --- diff --git a/src/hddtemp.c b/src/hddtemp.c index 0a93920b..1047077d 100644 --- a/src/hddtemp.c +++ b/src/hddtemp.c @@ -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)