diff options
author | David Teigland <teigland@redhat.com> | 2006-09-06 18:01:40 -0400 |
---|---|---|
committer | Steven Whitehouse <swhiteho@redhat.com> | 2006-09-07 09:44:01 -0400 |
commit | a1d144c71ddc11d3e9d9f29e92cf037da382a541 (patch) | |
tree | 629825078b912ee4a24b85ba18c16ff340026071 /fs | |
parent | 3204a6c05588788f7686bc45585185a9a4788430 (diff) |
[DLM] use snprintf in sysfs show
Use snprintf(buf, PAGE_SIZE, ...) instead of sprintf in sysfs show
methods.
Signed-off-by: David Teigland <teigland@redhat.com>
Signed-off-by: Steven Whitehouse <swhiteho@redhat.com>
Diffstat (limited to 'fs')
-rw-r--r-- | fs/dlm/lockspace.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/fs/dlm/lockspace.c b/fs/dlm/lockspace.c index ff83f80e43eb..109333c8ecb9 100644 --- a/fs/dlm/lockspace.c +++ b/fs/dlm/lockspace.c | |||
@@ -66,7 +66,7 @@ static ssize_t dlm_event_store(struct dlm_ls *ls, const char *buf, size_t len) | |||
66 | 66 | ||
67 | static ssize_t dlm_id_show(struct dlm_ls *ls, char *buf) | 67 | static ssize_t dlm_id_show(struct dlm_ls *ls, char *buf) |
68 | { | 68 | { |
69 | return sprintf(buf, "%u\n", ls->ls_global_id); | 69 | return snprintf(buf, PAGE_SIZE, "%u\n", ls->ls_global_id); |
70 | } | 70 | } |
71 | 71 | ||
72 | static ssize_t dlm_id_store(struct dlm_ls *ls, const char *buf, size_t len) | 72 | static ssize_t dlm_id_store(struct dlm_ls *ls, const char *buf, size_t len) |
@@ -78,12 +78,12 @@ static ssize_t dlm_id_store(struct dlm_ls *ls, const char *buf, size_t len) | |||
78 | static ssize_t dlm_recover_status_show(struct dlm_ls *ls, char *buf) | 78 | static ssize_t dlm_recover_status_show(struct dlm_ls *ls, char *buf) |
79 | { | 79 | { |
80 | uint32_t status = dlm_recover_status(ls); | 80 | uint32_t status = dlm_recover_status(ls); |
81 | return sprintf(buf, "%x\n", status); | 81 | return snprintf(buf, PAGE_SIZE, "%x\n", status); |
82 | } | 82 | } |
83 | 83 | ||
84 | static ssize_t dlm_recover_nodeid_show(struct dlm_ls *ls, char *buf) | 84 | static ssize_t dlm_recover_nodeid_show(struct dlm_ls *ls, char *buf) |
85 | { | 85 | { |
86 | return sprintf(buf, "%d\n", ls->ls_recover_nodeid); | 86 | return snprintf(buf, PAGE_SIZE, "%d\n", ls->ls_recover_nodeid); |
87 | } | 87 | } |
88 | 88 | ||
89 | struct dlm_attr { | 89 | struct dlm_attr { |