diff options
-rw-r--r-- | fdisks/fdisk-ask.c | 20 | ||||
-rw-r--r-- | fdisks/fdisk-menu.c | 4 | ||||
-rw-r--r-- | fdisks/fdisk.c | 5 |
3 files changed, 14 insertions, 15 deletions
diff --git a/fdisks/fdisk-ask.c b/fdisks/fdisk-ask.c index f3dffcb87..7de40b435 100644 --- a/fdisks/fdisk-ask.c +++ b/fdisks/fdisk-ask.c @@ -66,7 +66,7 @@ static int ask_number(struct fdisk_context *cxt, assert(q); DBG(ASK, dbgprint("asking for number " - "['%s', <%jd,%jd>, default=%jd, range: %s]", + "['%s', <%ju,%ju>, default=%ju, range: %s]", q, low, high, dflt, range)); if (range && dflt >= low && dflt <= high) { @@ -74,7 +74,7 @@ static int ask_number(struct fdisk_context *cxt, snprintf(prompt, sizeof(prompt), _("%s (%s, default %c): "), q, range, tochar(dflt)); else - snprintf(prompt, sizeof(prompt), _("%s (%s, default %jd): "), + snprintf(prompt, sizeof(prompt), _("%s (%s, default %ju): "), q, range, dflt); } else if (dflt >= low && dflt <= high) { @@ -82,13 +82,13 @@ static int ask_number(struct fdisk_context *cxt, snprintf(prompt, sizeof(prompt), _("%s (%c-%c, default %c): "), q, tochar(low), tochar(high), tochar(dflt)); else - snprintf(prompt, sizeof(prompt), _("%s (%jd-%jd, default %jd): "), + snprintf(prompt, sizeof(prompt), _("%s (%ju-%ju, default %ju): "), q, low, high, dflt); } else if (inchar) snprintf(prompt, sizeof(prompt), _("%s (%c-%c): "), q, tochar(low), tochar(high)); else - snprintf(prompt, sizeof(prompt), _("%s (%jd-%jd): "), + snprintf(prompt, sizeof(prompt), _("%s (%ju-%ju): "), q, low, high); do { @@ -136,15 +136,15 @@ static int ask_offset(struct fdisk_context *cxt, assert(q); - DBG(ASK, dbgprint("asking for offset ['%s', <%jd,%jd>, base=%jd, default=%jd, range: %s]", + DBG(ASK, dbgprint("asking for offset ['%s', <%ju,%ju>, base=%ju, default=%ju, range: %s]", q, low, high, base, dflt, range)); if (range && dflt >= low && dflt <= high) - snprintf(prompt, sizeof(prompt), _("%s (%s, default %jd): "), q, range, dflt); + snprintf(prompt, sizeof(prompt), _("%s (%s, default %ju): "), q, range, dflt); else if (dflt >= low && dflt <= high) - snprintf(prompt, sizeof(prompt), _("%s (%jd-%jd, default %jd): "), q, low, high, dflt); + snprintf(prompt, sizeof(prompt), _("%s (%ju-%ju, default %ju): "), q, low, high, dflt); else - snprintf(prompt, sizeof(prompt), _("%s (%jd-%jd): "), q, low, high); + snprintf(prompt, sizeof(prompt), _("%s (%ju-%ju): "), q, low, high); do { uint64_t num = 0; @@ -166,7 +166,7 @@ static int ask_offset(struct fdisk_context *cxt, rc = parse_size(p, &num, &pwr); if (rc) continue; - DBG(ASK, dbgprint("parsed size: %jd", num)); + DBG(ASK, dbgprint("parsed size: %ju", num)); if (sig && pwr) { /* +{size}{K,M,...} specified, the "num" is in bytes */ uint64_t unit = fdisk_ask_number_get_unit(ask); @@ -178,7 +178,7 @@ static int ask_offset(struct fdisk_context *cxt, else if (sig == '-') num = base - num; - DBG(ASK, dbgprint("final offset: %jd [sig: %c, power: %d, %s]", + DBG(ASK, dbgprint("final offset: %ju [sig: %c, power: %d, %s]", num, sig, pwr, sig ? "relative" : "absolute")); if (num >= low && num <= high) { diff --git a/fdisks/fdisk-menu.c b/fdisks/fdisk-menu.c index 0186e1285..daa47d1e3 100644 --- a/fdisks/fdisk-menu.c +++ b/fdisks/fdisk-menu.c @@ -484,9 +484,9 @@ static int generic_menu_cb(struct fdisk_context **cxt0, if (!rc) rc = fdisk_delete_partition(cxt, n); if (rc) - fdisk_warnx(cxt, _("Could not delete partition %d"), (int) n + 1); + fdisk_warnx(cxt, _("Could not delete partition %zu"), n + 1); else - fdisk_info(cxt, _("Partition %d has been deleted."), (int) n + 1); + fdisk_info(cxt, _("Partition %zu has been deleted."), n + 1); break; case 'l': list_partition_types(cxt); diff --git a/fdisks/fdisk.c b/fdisks/fdisk.c index 01e8149ab..1b96424cc 100644 --- a/fdisks/fdisk.c +++ b/fdisks/fdisk.c @@ -199,10 +199,9 @@ void list_disk_geometry(struct fdisk_context *cxt) char *strsz = size_to_human_string(SIZE_SUFFIX_SPACE | SIZE_SUFFIX_3LETTER, bytes); - fdisk_colon(cxt, _("Disk %s: %s, %llu bytes, %llu sectors"), + fdisk_colon(cxt, _("Disk %s: %s, %ju bytes, %ju sectors"), cxt->dev_path, strsz, - (unsigned long long) bytes, - (unsigned long long) cxt->total_sectors); + bytes, (uintmax_t) cxt->total_sectors); free(strsz); if (fdisk_require_geometry(cxt) || fdisk_context_use_cylinders(cxt)) |