|
@@ -33,18 +33,7 @@
|
|
#include <linux/drbd.h>
|
|
#include <linux/drbd.h>
|
|
#include "drbd_int.h"
|
|
#include "drbd_int.h"
|
|
|
|
|
|
-static int drbd_proc_open(struct inode *inode, struct file *file);
|
|
|
|
-static int drbd_proc_release(struct inode *inode, struct file *file);
|
|
|
|
-
|
|
|
|
-
|
|
|
|
struct proc_dir_entry *drbd_proc;
|
|
struct proc_dir_entry *drbd_proc;
|
|
-const struct file_operations drbd_proc_fops = {
|
|
|
|
- .owner = THIS_MODULE,
|
|
|
|
- .open = drbd_proc_open,
|
|
|
|
- .read = seq_read,
|
|
|
|
- .llseek = seq_lseek,
|
|
|
|
- .release = drbd_proc_release,
|
|
|
|
-};
|
|
|
|
|
|
|
|
static void seq_printf_with_thousands_grouping(struct seq_file *seq, long v)
|
|
static void seq_printf_with_thousands_grouping(struct seq_file *seq, long v)
|
|
{
|
|
{
|
|
@@ -235,7 +224,7 @@ static void drbd_syncer_progress(struct drbd_device *device, struct seq_file *se
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
|
|
-static int drbd_seq_show(struct seq_file *seq, void *v)
|
|
|
|
|
|
+int drbd_seq_show(struct seq_file *seq, void *v)
|
|
{
|
|
{
|
|
int i, prev_i = -1;
|
|
int i, prev_i = -1;
|
|
const char *sn;
|
|
const char *sn;
|
|
@@ -345,24 +334,3 @@ static int drbd_seq_show(struct seq_file *seq, void *v)
|
|
|
|
|
|
return 0;
|
|
return 0;
|
|
}
|
|
}
|
|
-
|
|
|
|
-static int drbd_proc_open(struct inode *inode, struct file *file)
|
|
|
|
-{
|
|
|
|
- int err;
|
|
|
|
-
|
|
|
|
- if (try_module_get(THIS_MODULE)) {
|
|
|
|
- err = single_open(file, drbd_seq_show, NULL);
|
|
|
|
- if (err)
|
|
|
|
- module_put(THIS_MODULE);
|
|
|
|
- return err;
|
|
|
|
- }
|
|
|
|
- return -ENODEV;
|
|
|
|
-}
|
|
|
|
-
|
|
|
|
-static int drbd_proc_release(struct inode *inode, struct file *file)
|
|
|
|
-{
|
|
|
|
- module_put(THIS_MODULE);
|
|
|
|
- return single_release(inode, file);
|
|
|
|
-}
|
|
|
|
-
|
|
|
|
-/* PROC FS stuff end */
|
|
|