Source-Changes-HG archive

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

[src/trunk]: src/usr.sbin/mdsetimage Explicitly print a fs image filename on ...



details:   https://anonhg.NetBSD.org/src/rev/894c41f79fab
branches:  trunk
changeset: 934595:894c41f79fab
user:      tsutsui <tsutsui%NetBSD.org@localhost>
date:      Sun Jun 14 18:24:21 2020 +0000

description:
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@.

diffstat:

 usr.sbin/mdsetimage/mdsetimage.c |  10 +++++-----
 1 files changed, 5 insertions(+), 5 deletions(-)

diffs (32 lines):

diff -r f7915b3dac57 -r 894c41f79fab usr.sbin/mdsetimage/mdsetimage.c
--- a/usr.sbin/mdsetimage/mdsetimage.c  Sun Jun 14 16:29:47 2020 +0000
+++ b/usr.sbin/mdsetimage/mdsetimage.c  Sun Jun 14 18:24:21 2020 +0000
@@ -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 @@
                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;
        }



Home | Main Index | Thread Index | Old Index