aboutsummaryrefslogtreecommitdiff
path: root/src/lssattr.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/lssattr.c')
-rw-r--r--src/lssattr.c14
1 files changed, 1 insertions, 13 deletions
diff --git a/src/lssattr.c b/src/lssattr.c
index 3a7f87a..ec7532e 100644
--- a/src/lssattr.c
+++ b/src/lssattr.c
@@ -22,18 +22,6 @@ static char *attrs[] = {
NULL
};
-static char *
-canonattrname(const char *arg)
-{
- int i;
-
- for (i = 0; attrs[i]; i++) {
- if (strcasecmp(arg, attrs[i]) == 0)
- return attrs[i];
- }
- return NULL;
-}
-
int
eclat_describe_snapshot_attribute(eclat_command_env_t *env,
int argc, char **argv)
@@ -55,7 +43,7 @@ eclat_describe_snapshot_attribute(eclat_command_env_t *env,
default:
die(EX_USAGE, "wrong number of arguments");
case 2:
- attrname = canonattrname(argv[1]);
+ attrname = canonattrname(attrs, argv[1], NULL, NULL);
if (!attrname)
die(EX_USAGE, "unrecognized attribute name");
break;

Return to:

Send suggestions and report system problems to the System administrator.