Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sbin/gpt if a new map entry doesn't fit, be more verbose abo...



details:   https://anonhg.NetBSD.org/src/rev/ee928dfb1301
branches:  trunk
changeset: 361059:ee928dfb1301
user:      mrg <mrg%NetBSD.org@localhost>
date:      Wed Apr 11 07:14:23 2018 +0000

description:
if a new map entry doesn't fit, be more verbose about the sizes.

diffstat:

 sbin/gpt/map.c |  7 +++++--
 1 files changed, 5 insertions(+), 2 deletions(-)

diffs (24 lines):

diff -r a30bb601ab71 -r ee928dfb1301 sbin/gpt/map.c
--- a/sbin/gpt/map.c    Wed Apr 11 07:13:18 2018 +0000
+++ b/sbin/gpt/map.c    Wed Apr 11 07:14:23 2018 +0000
@@ -33,7 +33,7 @@
 __FBSDID("$FreeBSD: src/sbin/gpt/map.c,v 1.6 2005/08/31 01:47:19 marcel Exp $");
 #endif
 #ifdef __RCSID
-__RCSID("$NetBSD: map.c,v 1.13 2015/12/03 21:30:54 christos Exp $");
+__RCSID("$NetBSD: map.c,v 1.14 2018/04/11 07:14:23 mrg Exp $");
 #endif
 
 #include <sys/types.h>
@@ -117,7 +117,10 @@
 
        if (n->map_start + n->map_size < start + size) {
                if (!(gpt->flags & GPT_QUIET))
-                       gpt_warnx(gpt, "map entry doesn't fit media");
+                       gpt_warnx(gpt, "map entry doesn't fit media: "
+                           "new start + new size < start + size\n"
+                           "(%jx + %jx < %jx + %jx)",
+                           n->map_start, n->map_size, start, size);
                return NULL;
        }
 



Home | Main Index | Thread Index | Old Index