Changeset View
Changeset View
Standalone View
Standalone View
head/sbin/bectl/bectl_list.c
Show First 20 Lines • Show All 176 Lines • ▼ Show 20 Lines | |||||
{ | { | ||||
#define BUFSZ 64 | #define BUFSZ 64 | ||||
char buf[BUFSZ]; | char buf[BUFSZ]; | ||||
unsigned long long ctimenum, space; | unsigned long long ctimenum, space; | ||||
nvlist_t *originprops; | nvlist_t *originprops; | ||||
const char *oname; | const char *oname; | ||||
char *dsname, *propstr; | char *dsname, *propstr; | ||||
int active_colsz; | int active_colsz; | ||||
boolean_t active_now, active_reboot; | boolean_t active_now, active_reboot, bootonce; | ||||
dsname = NULL; | dsname = NULL; | ||||
originprops = NULL; | originprops = NULL; | ||||
printf("%*s%s", pc->current_indent, "", name); | printf("%*s%s", pc->current_indent, "", name); | ||||
nvlist_lookup_string(dsprops, "dataset", &dsname); | nvlist_lookup_string(dsprops, "dataset", &dsname); | ||||
/* Recurse at the base level if we're breaking info down */ | /* Recurse at the base level if we're breaking info down */ | ||||
if (pc->current_indent == 0 && (pc->show_all_datasets || | if (pc->current_indent == 0 && (pc->show_all_datasets || | ||||
Show All 29 Lines | #define BUFSZ 64 | ||||
if (nvlist_lookup_boolean_value(dsprops, "active", | if (nvlist_lookup_boolean_value(dsprops, "active", | ||||
&active_now) == 0 && active_now) { | &active_now) == 0 && active_now) { | ||||
printf("N"); | printf("N"); | ||||
active_colsz--; | active_colsz--; | ||||
} | } | ||||
if (nvlist_lookup_boolean_value(dsprops, "nextboot", | if (nvlist_lookup_boolean_value(dsprops, "nextboot", | ||||
&active_reboot) == 0 && active_reboot) { | &active_reboot) == 0 && active_reboot) { | ||||
printf("R"); | printf("R"); | ||||
active_colsz--; | |||||
} | |||||
if (nvlist_lookup_boolean_value(dsprops, "bootonce", | |||||
&bootonce) == 0 && bootonce) { | |||||
printf("T"); | |||||
active_colsz--; | active_colsz--; | ||||
} | } | ||||
if (active_colsz == pc->active_colsz_def) { | if (active_colsz == pc->active_colsz_def) { | ||||
printf("-"); | printf("-"); | ||||
active_colsz--; | active_colsz--; | ||||
} | } | ||||
print_padding(NULL, active_colsz, pc); | print_padding(NULL, active_colsz, pc); | ||||
if (nvlist_lookup_string(dsprops, "mounted", &propstr) == 0) { | if (nvlist_lookup_string(dsprops, "mounted", &propstr) == 0) { | ||||
▲ Show 20 Lines • Show All 261 Lines • Show Last 20 Lines |