summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authortsutsui <tsutsui@NetBSD.org>2020-06-14 18:24:21 +0000
committertsutsui <tsutsui@NetBSD.org>2020-06-14 18:24:21 +0000
commitcfb048e9347697b38805ba89341dfc6aa92ee677 (patch)
treebe533559665f289b5f484d8955df071e09f3ef74
parent5170c8cfb97d7aa37da5b5b1ee0127b311814c17 (diff)
Explicitly print a fs image filename on "fs image is too big" errors.
This will help future analysis of build errors caused by bloated embedded ramdisk images and possible but unexpected other binaries. Proposed on port-mips@ in discusson about ews4800mips daily build errors: https://mail-index.netbsd.org/port-mips/2020/06/14/msg000950.html and "Yes please!" from martin@.
-rw-r--r--usr.sbin/mdsetimage/mdsetimage.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/usr.sbin/mdsetimage/mdsetimage.c b/usr.sbin/mdsetimage/mdsetimage.c
index 580dcf0bbe1..bd22bc9eb3f 100644
--- a/usr.sbin/mdsetimage/mdsetimage.c
+++ b/usr.sbin/mdsetimage/mdsetimage.c
@@ -1,4 +1,4 @@
-/* $NetBSD: mdsetimage.c,v 1.24 2016/12/18 18:32:24 riastradh Exp $ */
+/* $NetBSD: mdsetimage.c,v 1.25 2020/06/14 18:24:21 tsutsui Exp $ */
/*
* Copyright (c) 1996, 2002 Christopher G. Demetriou
@@ -37,7 +37,7 @@
#if !defined(lint)
__COPYRIGHT("@(#) Copyright (c) 1996\
Christopher G. Demetriou. All rights reserved.");
-__RCSID("$NetBSD: mdsetimage.c,v 1.24 2016/12/18 18:32:24 riastradh Exp $");
+__RCSID("$NetBSD: mdsetimage.c,v 1.25 2020/06/14 18:24:21 tsutsui Exp $");
#endif /* not lint */
#include <sys/types.h>
@@ -166,10 +166,10 @@ main(int argc, char *argv[])
if (fstat(fsfd, &fssb) == -1)
err(1, "fstat %s", fsfile);
if ((uintmax_t)fssb.st_size != (size_t)fssb.st_size)
- errx(1, "fs image is too big");
+ errx(1, "fs image %s is too big", fsfile);
if (fssb.st_size > md_root_size_value)
- errx(1, "fs image (%jd bytes) too big for buffer"
- " (%u bytes)", (intmax_t) fssb.st_size,
+ errx(1, "fs image %s (%jd bytes) too big for buffer"
+ " (%u bytes)", fsfile, (intmax_t) fssb.st_size,
md_root_size_value);
left_to_copy = fssb.st_size;
}