]> git.ipfire.org Git - thirdparty/util-linux.git/commitdiff
libfdisk: (dos) index partition from zero for DBG()
authorKarel Zak <kzak@redhat.com>
Mon, 2 Aug 2021 13:49:10 +0000 (15:49 +0200)
committerKarel Zak <kzak@redhat.com>
Mon, 2 Aug 2021 13:49:10 +0000 (15:49 +0200)
References: https://github.com/karelzak/util-linux/pull/1394
Signed-off-by: Karel Zak <kzak@redhat.com>
libfdisk/src/dos.c

index 1eb3ec53bc77848e7deab4036048ec4091745fb3..6c7a655a767a4b2c66ebf3eae55cf53840a0c226 100644 (file)
@@ -329,7 +329,7 @@ static void dos_init(struct fdisk_context *cxt)
                pe->changed = 0;
 
                DBG(LABEL, ul_debug("DOS: initialize: #%zu start=%u size=%u sysid=%02x",
-                                       i + 1,
+                                       i,
                                        dos_partition_get_start(pe->pt_entry),
                                        dos_partition_get_size(pe->pt_entry),
                                        pe->pt_entry->sys_ind));
@@ -2645,7 +2645,7 @@ int fdisk_dos_fix_chs(struct fdisk_context *cxt)
                        DBG(LABEL, ul_debug("DOS: changing %zu partition CHS "
                                "from (%d, %d, %d)-(%d, %d, %d) "
                                "to (%d, %d, %d)-(%d, %d, %d)",
-                               i+1, obc, obh, obs, oec, oeh, oes,
+                               i, obc, obh, obs, oec, oeh, oes,
                                nbc, nbh, nbs, nec, neh, nes));
                        p->bc = nbc & 0xff;
                        p->bh = nbh;