Whamcloud - gitweb
LU-1346 libcfs: replace CFS_CAP_XXX with kernel definition
[fs/lustre-release.git] / libcfs / libcfs / winnt / winnt-module.c
index 3a3b3f9..72edda0 100644 (file)
@@ -49,7 +49,7 @@ int libcfs_ioctl_getdata(char *buf, char *end, void *arg)
         hdr = (struct libcfs_ioctl_hdr *)buf;
         data = (struct libcfs_ioctl_data *)buf;
 
-        err = cfs_copy_from_user(buf, (void *)arg, sizeof(*hdr));
+       err = copy_from_user(buf, (void *)arg, sizeof(*hdr));
         if (err)
                 RETURN(err);
 
@@ -68,7 +68,7 @@ int libcfs_ioctl_getdata(char *buf, char *end, void *arg)
                 RETURN(-EINVAL);
         }
 
-        err = cfs_copy_from_user(buf, (void *)arg, hdr->ioc_len);
+       err = copy_from_user(buf, (void *)arg, hdr->ioc_len);
         if (err)
                 RETURN(err);
 
@@ -89,7 +89,7 @@ int libcfs_ioctl_getdata(char *buf, char *end, void *arg)
 
 int libcfs_ioctl_popdata(void *arg, void *data, int size)
 {
-       if (cfs_copy_to_user((char *)arg, data, size))
+       if (copy_to_user((char *)arg, data, size))
                return -EFAULT;
        return 0;
 }
@@ -142,7 +142,7 @@ libcfs_ioctl(struct file *file, unsigned int cmd, ulong_ptr_t arg)
        /* Handle platform-dependent IOC requests */
        switch (cmd) { 
        case IOC_LIBCFS_PANIC: 
-               if (!cfs_capable(CFS_CAP_SYS_BOOT)) 
+               if (!cfs_capable(CAP_SYS_BOOT))
                        return (-EPERM); 
                CERROR("debugctl-invoked panic");
                KeBugCheckEx('LUFS', (ULONG_PTR)libcfs_ioctl, (ULONG_PTR)NULL, (ULONG_PTR)NULL, (ULONG_PTR)NULL);
@@ -150,7 +150,7 @@ libcfs_ioctl(struct file *file, unsigned int cmd, ulong_ptr_t arg)
                return (0);
        case IOC_LIBCFS_MEMHOG:
 
-               if (!cfs_capable(CFS_CAP_SYS_ADMIN)) 
+               if (!cfs_capable(CAP_SYS_ADMIN))
                        return -EPERM;
         break;
        }
@@ -174,7 +174,7 @@ static struct file_operations libcfs_fops = {
     /* release:*/ libcfs_psdev_release
 };
 
-cfs_psdev_t libcfs_dev = { 
+struct miscdevice libcfs_dev = {
        LIBCFS_MINOR, 
        "lnet", 
        &libcfs_fops