Deleted Added
full compact
193,194c193,194
< return (gettext("\tget [-rHp] [-o field[,...]] "
< "[-s source[,...]]\n"
---
> return (gettext("\tget [-rHp] [-d max] "
> "[-o field[,...]] [-s source[,...]]\n"
208,209c208,209
< return (gettext("\tlist [-rH] [-o property[,...]] "
< "[-t type[,...]] [-s property] ...\n"
---
> return (gettext("\tlist [-rH][-d max] "
> "[-o property[,...]] [-t type[,...]] [-s property] ...\n"
434a435,455
> static int
> parse_depth(char *opt, int *flags)
> {
> char *tmp;
> int depth;
>
> depth = (int)strtol(opt, &tmp, 0);
> if (*tmp) {
> (void) fprintf(stderr,
> gettext("%s is not an integer\n"), optarg);
> usage(B_FALSE);
> }
> if (depth < 0) {
> (void) fprintf(stderr,
> gettext("Depth can not be negative.\n"));
> usage(B_FALSE);
> }
> *flags |= (ZFS_ITER_DEPTH_LIMIT|ZFS_ITER_RECURSE);
> return (depth);
> }
>
1121a1143
> int limit = 0;
1135c1157
< while ((c = getopt(argc, argv, ":o:s:rHp")) != -1) {
---
> while ((c = getopt(argc, argv, ":d:o:s:rHp")) != -1) {
1139a1162,1164
> case 'd':
> limit = parse_depth(optarg, &flags);
> break;
1270c1295
< &cb.cb_proplist, get_callback, &cb);
---
> &cb.cb_proplist, limit, get_callback, &cb);
1383c1408
< NULL, NULL, inherit_recurse_cb, propname);
---
> NULL, NULL, 0, inherit_recurse_cb, propname);
1386c1411
< NULL, NULL, inherit_cb, propname);
---
> NULL, NULL, 0, inherit_cb, propname);
1581c1606
< NULL, NULL, upgrade_set_callback, &cb);
---
> NULL, NULL, 0, upgrade_set_callback, &cb);
1599c1624
< NULL, NULL, upgrade_list_callback, &cb);
---
> NULL, NULL, 0, upgrade_list_callback, &cb);
1606c1631
< NULL, NULL, upgrade_list_callback, &cb);
---
> NULL, NULL, 0, upgrade_list_callback, &cb);
1618c1643
< * list [-rH] [-o property[,property]...] [-t type[,type]...]
---
> * list [-r][-d max] [-H] [-o property[,property]...] [-t type[,type]...]
1622a1648
> * -d Limit recursion by depth.
1771a1798
> int limit = 0;
1777c1804
< while ((c = getopt(argc, argv, ":o:rt:Hs:S:")) != -1) {
---
> while ((c = getopt(argc, argv, ":d:o:rt:Hs:S:")) != -1) {
1781a1809,1811
> case 'd':
> limit = parse_depth(optarg, &flags);
> break;
1872c1902
< list_callback, &cb);
---
> limit, list_callback, &cb);
2255c2285
< ZFS_TYPE_DATASET, NULL, NULL, set_callback, &cb);
---
> ZFS_TYPE_DATASET, NULL, NULL, 0, set_callback, &cb);
2889c2919
< NULL, unallow_callback, (void *)zperms);
---
> NULL, 0, unallow_callback, (void *)zperms);