-/* -*- mode: c; c-basic-offset: 8; indent-tabs-mode: nil; -*-
- * vim:expandtab:shiftwidth=8:tabstop=8:
- *
+/*
* GPL HEADER START
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* GPL HEADER END
*/
/*
- * Copyright 2008 Sun Microsystems, Inc. All rights reserved
+ * Copyright (c) 2008, 2010, Oracle and/or its affiliates. All rights reserved.
* Use is subject to license terms.
*/
/*
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);
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);
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;
}
-
-extern struct cfs_psdev_ops libcfs_psdev_ops;
-static int
-libcfs_psdev_open(struct inode *in, cfs_file_t * file)
-{
+extern struct cfs_psdev_ops libcfs_psdev_ops;
+
+static int
+libcfs_psdev_open(struct inode *in, struct file *file)
+{
struct libcfs_device_userstate **pdu = NULL;
int rc = 0;
}
/* called when closing /dev/device */
-static int
-libcfs_psdev_release(struct inode *in, cfs_file_t * file)
+static int
+libcfs_psdev_release(struct inode *in, struct file *file)
{
struct libcfss_device_userstate *pdu;
int rc = 0;
return rc;
}
-static int
-libcfs_ioctl(cfs_file_t * file, unsigned int cmd, ulong_ptr_t arg)
-{
+static int
+libcfs_ioctl(struct file *file, unsigned int cmd, ulong_ptr_t arg)
+{
struct cfs_psdev_file pfile;
int rc = 0;
/* 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);
return (0);
case IOC_LIBCFS_MEMHOG:
- if (!cfs_capable(CFS_CAP_SYS_ADMIN))
+ if (!cfs_capable(CAP_SYS_ADMIN))
return -EPERM;
break;
}
/* release:*/ libcfs_psdev_release
};
-cfs_psdev_t libcfs_dev = {
+struct miscdevice libcfs_dev = {
LIBCFS_MINOR,
"lnet",
&libcfs_fops