#define DEBUG_SUBSYSTEM S_CLASS
-#ifdef __KERNEL__
#include <linux/module.h>
#include <linux/errno.h>
#include <linux/kernel.h>
#include <asm/uaccess.h>
#include <linux/miscdevice.h>
#include <linux/seq_file.h>
-#else
-# include <liblustre.h>
-#endif
#include <libcfs/libcfs.h>
#include <obd_support.h>
#include <lustre_ioctl.h>
#include <lustre_ver.h>
#include <lustre/lustre_build_version.h>
-#ifdef __KERNEL__
int proc_version;
.fops = &obd_psdev_fops,
};
-#endif
#ifdef LPROCFS
static int obd_proc_version_seq_show(struct seq_file *m, void *v)
#define lprocfs_base NULL
#endif /* LPROCFS */
-#ifdef __KERNEL__
static void *obd_device_list_seq_start(struct seq_file *p, loff_t *pos)
{
if (*pos >= class_devno_max())
.llseek = seq_lseek,
.release = seq_release,
};
-#endif
int class_procfs_init(void)
{
-#ifdef __KERNEL__
int rc;
ENTRY;
&obd_device_list_fops, NULL);
if (rc)
CERROR("error adding /proc/fs/lustre/devices file\n");
-#else
- ENTRY;
-#endif
RETURN(0);
}
-#ifdef __KERNEL__
int class_procfs_clean(void)
{
ENTRY;
}
RETURN(0);
}
-#endif