[collectd] [PATCH] hddtemp plugin: Use SCSI_DISK8_MAJOR thru SCSI_DISK15_MAJOR only if available.
Sebastian Harl
sh at tokkee.org
Tue Feb 19 12:24:53 CET 2008
Some Linux versions don't seem to provide the major numbers 8 thru 15.
Signed-off-by: Sebastian Harl <sh at tokkee.org>
---
src/hddtemp.c | 2 ++
1 files changed, 2 insertions(+), 0 deletions(-)
diff --git a/src/hddtemp.c b/src/hddtemp.c
index 8c4bc4a..651de29 100644
--- a/src/hddtemp.c
+++ b/src/hddtemp.c
@@ -314,6 +314,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:
@@ -322,6 +323,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)
--
1.5.3.8
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
Url : http://mailman.verplant.org/pipermail/collectd/attachments/20080219/bac377e4/attachment.pgp
More information about the collectd
mailing list