summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMark Wielaard <mjw@redhat.com>2009-12-29 16:34:54 +0100
committerMark Wielaard <mjw@redhat.com>2009-12-29 16:34:54 +0100
commita4f724239087c21a34ca1352f02a548eb1b16a34 (patch)
treee253adf91a7733c4486c5e4d6cbbe882172e6412
parentebe6d4ebd25b50589b263b6ca2a02d53ae68b6fa (diff)
downloadsystemtap-steved-a4f724239087c21a34ca1352f02a548eb1b16a34.tar.gz
systemtap-steved-a4f724239087c21a34ca1352f02a548eb1b16a34.tar.xz
systemtap-steved-a4f724239087c21a34ca1352f02a548eb1b16a34.zip
Guard SDEV_BLOCK and SDEV_CREATED_BLOCK in tapset/scsi.stp with #ifdef.
Older kernels didn't define these constants, which are only used in the tapset/scsi.stp describe_device_state() function.
-rw-r--r--tapset/scsi.stp4
1 files changed, 4 insertions, 0 deletions
diff --git a/tapset/scsi.stp b/tapset/scsi.stp
index 0b2d94a0..ba2ac771 100644
--- a/tapset/scsi.stp
+++ b/tapset/scsi.stp
@@ -37,8 +37,12 @@ function describe_device_state:string(state:long)
case SDEV_DEL: strlcpy(THIS->__retvalue, "DEL", MAXSTRINGLEN); break;
case SDEV_QUIESCE: strlcpy(THIS->__retvalue, "QUIESCE", MAXSTRINGLEN); break;
case SDEV_OFFLINE: strlcpy(THIS->__retvalue, "OFFLINE", MAXSTRINGLEN); break;
+#ifdef SDEV_BLOCK
case SDEV_BLOCK: strlcpy(THIS->__retvalue, "BLOCK", MAXSTRINGLEN); break;
+#endif
+#ifdef SDEV_CREATED_BLOCK
case SDEV_CREATED_BLOCK: strlcpy(THIS->__retvalue, "CREATED_BLOCK", MAXSTRINGLEN); break;
+#endif
default: strlcpy(THIS->__retvalue, "[INVALID]", MAXSTRINGLEN);
}
%}