diff options
author | ahrens <none@none> | 2007-08-02 21:23:46 -0700 |
---|---|---|
committer | ahrens <none@none> | 2007-08-02 21:23:46 -0700 |
commit | 91ebeef555ce7f899b6270a3c2df47b51f7ad59a (patch) | |
tree | 7c2ea33b8ecbb85fdd82366244cb0850dbba3287 /usr/src/cmd/zfs | |
parent | 03509b53a806cb39ca94c9a1c00f1c6405321554 (diff) | |
download | illumos-joyent-91ebeef555ce7f899b6270a3c2df47b51f7ad59a.tar.gz |
6393351 unique_* could be improved
6553348 assertion failed: ab->b_flags & (1 << 3) at line 2572 of arc.c
6582408 ::arc should accept -k/-m/-g to print in kilo/mega/giga-bytes
6582438 should have generic reader-priority rwlock for spa_config locks
6582441 zfs_cmd_t should only be used to pass arguments to/from userland
6582456 property code is overdue for some spring cleaning
6588564 zpl unmount lock should use regular rwlock
Diffstat (limited to 'usr/src/cmd/zfs')
-rw-r--r-- | usr/src/cmd/zfs/zfs_main.c | 52 |
1 files changed, 6 insertions, 46 deletions
diff --git a/usr/src/cmd/zfs/zfs_main.c b/usr/src/cmd/zfs/zfs_main.c index 044c52e650..438c0bbf74 100644 --- a/usr/src/cmd/zfs/zfs_main.c +++ b/usr/src/cmd/zfs/zfs_main.c @@ -380,7 +380,7 @@ usage(boolean_t requested) "PROPERTY", "EDIT", "INHERIT", "VALUES"); /* Iterate over all properties */ - (void) zfs_prop_iter_ordered(usage_prop_cb, fp, B_FALSE); + (void) zfs_prop_iter_ordered(usage_prop_cb, fp); (void) fprintf(fp, gettext("\nSizes are specified in bytes " "with standard units such as K, M, G, etc.\n")); @@ -3829,17 +3829,6 @@ find_command_idx(char *command, int *idx) return (1); } -zfs_prop_t -propset_cb(zfs_prop_t prop, void *data) -{ - char *cmdname = (char *)data; - - if (strcmp(cmdname, zfs_prop_to_name(prop)) == 0) - return (prop); - - return (ZFS_PROP_CONT); -} - int main(int argc, char **argv) { @@ -3847,8 +3836,6 @@ main(int argc, char **argv) int i; char *progname; char *cmdname; - char *str; - boolean_t found = B_FALSE; (void) setlocale(LC_ALL, ""); (void) textdomain(TEXT_DOMAIN); @@ -3927,38 +3914,11 @@ main(int argc, char **argv) if (find_command_idx(cmdname, &i) == 0) { current_command = &command_table[i]; ret = command_table[i].func(argc - 1, argv + 1); - found = B_TRUE; - } - - /* - * Check and see if they are doing property=value - */ - if (found == B_FALSE && - ((str = strchr(cmdname, '=')) != NULL)) { - *str = '\0'; - if (zfs_prop_iter(propset_cb, cmdname, - B_FALSE) != ZFS_PROP_INVAL) - found = B_TRUE; - - if (found == B_FALSE && zfs_prop_user(cmdname)) - found = B_TRUE; - - if (found == B_TRUE && - find_command_idx("set", &i) == 0) { - *str = '='; - current_command = &command_table[i]; - ret = command_table[i].func(argc, argv); - } else { - (void) fprintf(stderr, - gettext("invalid property '%s'\n"), - cmdname); - found = B_TRUE; - ret = 1; - } - - } - - if (found == B_FALSE) { + } else if (strchr(cmdname, '=') != NULL) { + verify(find_command_idx("set", &i) == 0); + current_command = &command_table[i]; + ret = command_table[i].func(argc, argv); + } else { (void) fprintf(stderr, gettext("unrecognized " "command '%s'\n"), cmdname); usage(B_FALSE); |