Module Name:    src
Committed By:   mrg
Date:           Wed Apr 11 07:14:23 UTC 2018

Modified Files:
        src/sbin/gpt: map.c

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


To generate a diff of this commit:
cvs rdiff -u -r1.13 -r1.14 src/sbin/gpt/map.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sbin/gpt/map.c
diff -u src/sbin/gpt/map.c:1.13 src/sbin/gpt/map.c:1.14
--- src/sbin/gpt/map.c:1.13	Thu Dec  3 21:30:54 2015
+++ src/sbin/gpt/map.c	Wed Apr 11 07:14:23 2018
@@ -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 @@ map_add(gpt_t gpt, off_t start, off_t si
 
 	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;
 	}
 

Reply via email to