Signed-off-by: Karel Zak <kzak@redhat.com>
warnx(_("The device properties (sector size and geometry) should"
" be used with one specified device only."));
+ colors_init(colormode);
+
switch (act) {
case ACT_LIST:
fdisk_context_enable_listonly(cxt, 1);
+
if (argc > optind) {
int k;
for (k = optind; k < argc; k++)
if (argc-optind != 1)
usage(stderr);
- colors_init(colormode);
-
if (fdisk_context_assign_device(cxt, argv[optind], 0) != 0)
err(EXIT_FAILURE, _("cannot open %s"), argv[optind]);
assert(ask);
assert(cxt);
- DBG(ASK, dbgprint("asking for '%s'", ask->query));
+ DBG(ASK, dbgprint("do_ask for '%s'",
+ ask->query ? ask->query :
+ ask->type == FDISK_ASKTYPE_INFO ? "info" :
+ ask->type == FDISK_ASKTYPE_WARNX ? "warnx" :
+ ask->type == FDISK_ASKTYPE_WARN ? "warn" :
+ "?nothing?"));
if (!cxt->ask_cb) {
DBG(ASK, dbgprint("no ask callback specified!"));