Author: delphij Date: Wed Jul 9 08:20:08 2014 New Revision: 268454 URL: http://svnweb.freebsd.org/changeset/base/268454
Log: 4966 zpool list iterator does not update output Reviewed by: Matthew Ahrens <mahr...@delphix.com> Reviewed by: Christopher Siden <christopher.si...@delphix.com> Reviewed by: Dan McDonald <dan...@omniti.com> Approved by: Garrett D'Amore <garr...@damore.org> illumos/illumos-gate@cd67d23d32df7b247d00e5b82257a2220b1e0c13 Modified: vendor/illumos/dist/cmd/zpool/zpool_main.c Modified: vendor/illumos/dist/cmd/zpool/zpool_main.c ============================================================================== --- vendor/illumos/dist/cmd/zpool/zpool_main.c Wed Jul 9 08:17:09 2014 (r268453) +++ vendor/illumos/dist/cmd/zpool/zpool_main.c Wed Jul 9 08:20:08 2014 (r268454) @@ -2930,17 +2930,10 @@ zpool_do_list(int argc, char **argv) if (zprop_get_list(g_zfs, props, &cb.cb_proplist, ZFS_TYPE_POOL) != 0) usage(B_FALSE); - if ((list = pool_list_get(argc, argv, &cb.cb_proplist, &ret)) == NULL) - return (1); - - if (argc == 0 && !cb.cb_scripted && pool_list_count(list) == 0) { - (void) printf(gettext("no pools available\n")); - zprop_free_list(cb.cb_proplist); - return (0); - } - for (;;) { - pool_list_update(list); + if ((list = pool_list_get(argc, argv, &cb.cb_proplist, + &ret)) == NULL) + return (1); if (pool_list_count(list) == 0) break; @@ -2963,9 +2956,16 @@ zpool_do_list(int argc, char **argv) if (count != 0 && --count == 0) break; + pool_list_free(list); (void) sleep(interval); } + if (argc == 0 && !cb.cb_scripted && pool_list_count(list) == 0) { + (void) printf(gettext("no pools available\n")); + ret = 0; + } + + pool_list_free(list); zprop_free_list(cb.cb_proplist); return (ret); } _______________________________________________ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"