Changeset View
Changeset View
Standalone View
Standalone View
head/lib/geom/part/geom_part.c
Show First 20 Lines • Show All 66 Lines • ▼ Show 20 Lines | |||||
volatile sig_atomic_t undo_restore; | volatile sig_atomic_t undo_restore; | ||||
#define GPART_AUTOFILL "*" | #define GPART_AUTOFILL "*" | ||||
#define GPART_FLAGS "C" | #define GPART_FLAGS "C" | ||||
#define GPART_PARAM_BOOTCODE "bootcode" | #define GPART_PARAM_BOOTCODE "bootcode" | ||||
#define GPART_PARAM_INDEX "index" | #define GPART_PARAM_INDEX "index" | ||||
#define GPART_PARAM_PARTCODE "partcode" | #define GPART_PARAM_PARTCODE "partcode" | ||||
#define GPART_PARAM_SKIP_DSN "skip_dsn" | |||||
static struct gclass *find_class(struct gmesh *, const char *); | static struct gclass *find_class(struct gmesh *, const char *); | ||||
static struct ggeom * find_geom(struct gclass *, const char *); | static struct ggeom * find_geom(struct gclass *, const char *); | ||||
static int geom_is_withered(struct ggeom *); | static int geom_is_withered(struct ggeom *); | ||||
static const char *find_geomcfg(struct ggeom *, const char *); | static const char *find_geomcfg(struct ggeom *, const char *); | ||||
static const char *find_provcfg(struct gprovider *, const char *); | static const char *find_provcfg(struct gprovider *, const char *); | ||||
static struct gprovider *find_provider(struct ggeom *, off_t); | static struct gprovider *find_provider(struct ggeom *, off_t); | ||||
static const char *fmtsize(int64_t); | static const char *fmtsize(int64_t); | ||||
Show All 27 Lines | struct g_command PUBSYM(class_commands)[] = { | ||||
{ "backup", 0, gpart_backup, G_NULL_OPTS, | { "backup", 0, gpart_backup, G_NULL_OPTS, | ||||
"geom" | "geom" | ||||
}, | }, | ||||
{ "bootcode", 0, gpart_bootcode, { | { "bootcode", 0, gpart_bootcode, { | ||||
{ 'b', GPART_PARAM_BOOTCODE, G_VAL_OPTIONAL, G_TYPE_STRING }, | { 'b', GPART_PARAM_BOOTCODE, G_VAL_OPTIONAL, G_TYPE_STRING }, | ||||
{ 'p', GPART_PARAM_PARTCODE, G_VAL_OPTIONAL, G_TYPE_STRING }, | { 'p', GPART_PARAM_PARTCODE, G_VAL_OPTIONAL, G_TYPE_STRING }, | ||||
{ 'i', GPART_PARAM_INDEX, G_VAL_OPTIONAL, G_TYPE_NUMBER }, | { 'i', GPART_PARAM_INDEX, G_VAL_OPTIONAL, G_TYPE_NUMBER }, | ||||
{ 'f', "flags", GPART_FLAGS, G_TYPE_STRING }, | { 'f', "flags", GPART_FLAGS, G_TYPE_STRING }, | ||||
{ 'N', GPART_PARAM_SKIP_DSN, NULL, G_TYPE_BOOL }, | |||||
G_OPT_SENTINEL }, | G_OPT_SENTINEL }, | ||||
"[-b bootcode] [-p partcode -i index] [-f flags] geom" | "[-N] [-b bootcode] [-p partcode -i index] [-f flags] geom" | ||||
}, | }, | ||||
{ "commit", 0, gpart_issue, G_NULL_OPTS, | { "commit", 0, gpart_issue, G_NULL_OPTS, | ||||
"geom" | "geom" | ||||
}, | }, | ||||
{ "create", 0, gpart_issue, { | { "create", 0, gpart_issue, { | ||||
{ 's', "scheme", NULL, G_TYPE_STRING }, | { 's', "scheme", NULL, G_TYPE_STRING }, | ||||
{ 'n', "entries", G_VAL_OPTIONAL, G_TYPE_NUMBER }, | { 'n', "entries", G_VAL_OPTIONAL, G_TYPE_NUMBER }, | ||||
{ 'f', "flags", GPART_FLAGS, G_TYPE_STRING }, | { 'f', "flags", GPART_FLAGS, G_TYPE_STRING }, | ||||
▲ Show 20 Lines • Show All 1,217 Lines • Show Last 20 Lines |