From 93323777c768dc194660a1b901e9c5da2c0424a0 Mon Sep 17 00:00:00 2001 From: David Teigland Date: Fri, 30 Jul 2010 16:35:21 -0500 Subject: dlm_klock: misc Signed-off-by: David Teigland --- dlm/dlm_klock/build.sh | 0 dlm/dlm_klock/dlm_klock.c | 21 +++++---------------- 2 files changed, 5 insertions(+), 16 deletions(-) mode change 100644 => 100755 dlm/dlm_klock/build.sh diff --git a/dlm/dlm_klock/build.sh b/dlm/dlm_klock/build.sh old mode 100644 new mode 100755 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 #include #include +#include +#include +#include +#include #include 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 -- cgit