Whamcloud - gitweb
add ioctl for audit syslog interface
authorniu <niu>
Tue, 5 Jul 2005 09:18:16 +0000 (09:18 +0000)
committerniu <niu>
Tue, 5 Jul 2005 09:18:16 +0000 (09:18 +0000)
lnet/include/libcfs/kp30.h
lnet/libcfs/module.c

index 4c3f225..f4652b9 100644 (file)
@@ -405,7 +405,8 @@ extern int portal_ioctl_getdata(char *buf, char *end, void *arg);
 #define IOC_PORTAL_LWT_SNAPSHOT            _IOWR('e', 40, IOCTL_PORTAL_TYPE)
 #define IOC_PORTAL_LWT_LOOKUP_STRING       _IOWR('e', 41, IOCTL_PORTAL_TYPE)
 #define IOC_PORTAL_MEMHOG                  _IOWR('e', 42, IOCTL_PORTAL_TYPE)
-#define IOC_PORTAL_MAX_NR                             42
+#define IOC_PORTAL_DMSG                    _IOWR('e', 43, IOCTL_PORTAL_TYPE)
+#define IOC_PORTAL_MAX_NR                             43
 
 enum {
         QSWNAL    = 1,
index 76a4503..7da61f4 100644 (file)
@@ -360,6 +360,12 @@ static int libcfs_ioctl(struct cfs_psdev_file *pfile, unsigned long cmd, void *a
                         RETURN(-EINVAL);
                 portals_debug_mark_buffer(data->ioc_inlbuf1);
                 RETURN(0);
+        case IOC_PORTAL_DMSG:
+                if (data->ioc_inlbuf1 == NULL ||
+                    data->ioc_inlbuf1[data->ioc_inllen1 - 1] != '\0')
+                        RETURN(-EINVAL);
+                printk("%s", data->ioc_inlbuf1);
+                RETURN(0);
 #if LWT_SUPPORT
         case IOC_PORTAL_LWT_CONTROL:
                 err = lwt_control (data->ioc_flags, data->ioc_misc);