diff options
author | David Teigland <teigland@redhat.com> | 2010-07-30 16:35:21 -0500 |
---|---|---|
committer | David Teigland <teigland@redhat.com> | 2010-07-30 16:35:21 -0500 |
commit | 93323777c768dc194660a1b901e9c5da2c0424a0 (patch) | |
tree | 9b53eb083ac4ccb6b87f6dfcfdd07e7bd366c070 | |
parent | 7c28d3c824e37de3f4833e3a09648d5a86f42866 (diff) | |
download | dct-stuff-93323777c768dc194660a1b901e9c5da2c0424a0.tar.gz dct-stuff-93323777c768dc194660a1b901e9c5da2c0424a0.tar.xz dct-stuff-93323777c768dc194660a1b901e9c5da2c0424a0.zip |
dlm_klock: misc
Signed-off-by: David Teigland <teigland@redhat.com>
-rwxr-xr-x[-rw-r--r--] | dlm/dlm_klock/build.sh | 0 | ||||
-rw-r--r-- | dlm/dlm_klock/dlm_klock.c | 21 |
2 files changed, 5 insertions, 16 deletions
diff --git a/dlm/dlm_klock/build.sh b/dlm/dlm_klock/build.sh index 1639c75..1639c75 100644..100755 --- a/dlm/dlm_klock/build.sh +++ b/dlm/dlm_klock/build.sh diff --git a/dlm/dlm_klock/dlm_klock.c b/dlm/dlm_klock/dlm_klock.c index a7b533f..da819f9 100644 --- a/dlm/dlm_klock/dlm_klock.c +++ b/dlm/dlm_klock/dlm_klock.c @@ -12,11 +12,14 @@ #include <linux/delay.h> #include <linux/proc_fs.h> #include <linux/jiffies.h> +#include <linux/errno.h> +#include <linux/ctype.h> +#include <linux/kernel.h> +#include <linux/sched.h> #include <linux/dlm.h> static struct proc_dir_entry *proc_dir = NULL; -static char ls_name[32]; static dlm_lockspace_t *ls; static struct dlm_lksb lksb; static wait_queue_head_t wq; @@ -212,25 +215,11 @@ static int unlock_write(struct file *file, const char *buffer, static int join_write(struct file *file, const char *buffer, unsigned long count, void *data) { - int rv, i; + int rv; if (ls) return -EBUSY; - /* - if (copy_from_user(ls_name, buffer, count)) - return -EFAULT; - - memset(ls_name, 0, sizeof(ls_name)); - - for (i = 0; i < strlen(ls_name); i++) { - if (ls_name[i] == '\n') { - ls_name[i] = '\0'; - break; - } - } - */ - #ifdef RHEL4 rv = dlm_new_lockspace("klock", 5, &ls, DLM_LSF_NOTIMERS); #else |