"\tupgrade -v\n"
"\tupgrade [-V version] <-a | pool ...>\n"));
case HELP_EVENTS:
- return (gettext("\tevents [-vfc]\n"));
+ return (gettext("\tevents [-vHfc]\n"));
case HELP_GET:
return (gettext("\tget <\"all\" | property[,...]> "
"<pool> ...\n"));
typedef struct ev_opts {
int verbose;
+ int scripted;
int follow;
int clear;
} ev_opts_t;
printf(gettext("(embedded nvlist)\n"));
(void) nvpair_value_nvlist(nvp, &cnv);
zpool_do_events_nvprint(cnv, depth + 8);
- printf(gettext("%*s(end %s)\n"), depth, "", name);
+ printf(gettext("%*s(end %s)"), depth, "", name);
break;
case DATA_TYPE_NVLIST_ARRAY: {
cleanup_fd = open(ZFS_DEV, O_RDWR);
VERIFY(cleanup_fd >= 0);
- (void) printf(gettext("%-30s %s\n"), "TIME", "CLASS");
+ if (!opts->scripted)
+ (void) printf(gettext("%-30s %s\n"), "TIME", "CLASS");
while (1) {
ret = zpool_events_next(g_zfs, &nvl, &dropped,
int c;
/* check options */
- while ((c = getopt(argc, argv, "vfc")) != -1) {
+ while ((c = getopt(argc, argv, "vHfc")) != -1) {
switch (c) {
case 'v':
opts.verbose = 1;
break;
+ case 'H':
+ opts.scripted = 1;
+ break;
case 'f':
opts.follow = 1;
break;