From: nikita Date: Wed, 23 Aug 2006 22:48:29 +0000 (+0000) Subject: libiam: exterminate SET_DEFAULT X-Git-Tag: v1_8_0_110~486^2~1106 X-Git-Url: https://git.whamcloud.com/?a=commitdiff_plain;h=d7163734702bbbc018c2364697f67db3cc1d8acd;p=fs%2Flustre-release.git libiam: exterminate SET_DEFAULT --- diff --git a/lustre/include/lustre/libiam.h b/lustre/include/lustre/libiam.h index 06c82b8..5196388 100644 --- a/lustre/include/lustre/libiam.h +++ b/lustre/include/lustre/libiam.h @@ -36,7 +36,6 @@ #define __IAM_ULIB_H__ -#define SET_DEFAULT -1 #define DX_FMT_NAME_LEN 16 enum iam_fmt_t { diff --git a/lustre/utils/libiam.c b/lustre/utils/libiam.c index fc7c773..37f95d6 100644 --- a/lustre/utils/libiam.c +++ b/lustre/utils/libiam.c @@ -391,35 +391,27 @@ int iam_creat(char *filename, enum iam_fmt_t fmt, return -1; } - if (blocksize == SET_DEFAULT) { - blocksize = 4096; - } else if (blocksize <= 100) { + if (blocksize <= 100) { errno = EINVAL; return -1; } - if (keysize == SET_DEFAULT) { - keysize = 8; - } else if (keysize < 1) { + if (keysize < 1) { errno = EINVAL; return -1; } - if (recsize == SET_DEFAULT) { - recsize = 8; - } else if (recsize < 0) { + if (recsize < 0) { errno = EINVAL; return -1; } - if (ptrsize == SET_DEFAULT) { - ptrsize = 4; - } else if ((ptrsize != 4) && (ptrsize != 8)) { + if (ptrsize != 4 && ptrsize != 8) { errno = EINVAL; return -1; } - if ((keysize + recsize + sizeof(struct iam_leaf_head)) > (blocksize / 3)) { + if (keysize + recsize + sizeof(struct iam_leaf_head) > blocksize / 3) { errno = EINVAL; return -1; }