diff options
author | Kinglong Mee <kinglongmee@gmail.com> | 2014-05-23 14:00:19 +0200 |
---|---|---|
committer | J. Bruce Fields <bfields@redhat.com> | 2014-05-30 23:32:19 +0200 |
commit | 94eb36892d727145794b80dceffc435d1d68edbb (patch) | |
tree | 7df717686ed4888d645c62663c4ddc7e2fe21ff9 /fs/nfsd/export.c | |
parent | NFSD: Helper function for parsing uuid (diff) | |
download | linux-94eb36892d727145794b80dceffc435d1d68edbb.tar.xz linux-94eb36892d727145794b80dceffc435d1d68edbb.zip |
NFSD: Adds macro EX_UUID_LEN for exports uuid's length
Signed-off-by: Kinglong Mee <kinglongmee@gmail.com>
Signed-off-by: J. Bruce Fields <bfields@redhat.com>
Diffstat (limited to 'fs/nfsd/export.c')
-rw-r--r-- | fs/nfsd/export.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/fs/nfsd/export.c b/fs/nfsd/export.c index 8771f417efa6..90d37b6ef163 100644 --- a/fs/nfsd/export.c +++ b/fs/nfsd/export.c @@ -487,10 +487,10 @@ uuid_parse(char **mesg, char *buf, unsigned char **puuid) /* expect a 16 byte uuid encoded as \xXXXX... */ len = qword_get(mesg, buf, PAGE_SIZE); - if (len != 16) + if (len != EX_UUID_LEN) return -EINVAL; - *puuid = kmemdup(buf, 16, GFP_KERNEL); + *puuid = kmemdup(buf, EX_UUID_LEN, GFP_KERNEL); if (*puuid == NULL) return -ENOMEM; @@ -663,7 +663,7 @@ static int svc_export_show(struct seq_file *m, if (exp->ex_uuid) { int i; seq_puts(m, ",uuid="); - for (i=0; i<16; i++) { + for (i = 0; i < EX_UUID_LEN; i++) { if ((i&3) == 0 && i) seq_putc(m, ':'); seq_printf(m, "%02x", exp->ex_uuid[i]); |