Source-Changes-HG archive

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

[src/trunk]: src/usr.sbin/mdsetimage cast to intmax_t for machine-independent...



details:   https://anonhg.NetBSD.org/src/rev/feb5a469923f
branches:  trunk
changeset: 347914:feb5a469923f
user:      mlelstv <mlelstv%NetBSD.org@localhost>
date:      Thu Sep 22 08:43:26 2016 +0000

description:
cast to intmax_t for machine-independent printing.

diffstat:

 usr.sbin/mdsetimage/mdsetimage.c |  13 +++++++------
 1 files changed, 7 insertions(+), 6 deletions(-)

diffs (41 lines):

diff -r 495b547c4d0c -r feb5a469923f usr.sbin/mdsetimage/mdsetimage.c
--- a/usr.sbin/mdsetimage/mdsetimage.c  Thu Sep 22 08:09:40 2016 +0000
+++ b/usr.sbin/mdsetimage/mdsetimage.c  Thu Sep 22 08:43:26 2016 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: mdsetimage.c,v 1.22 2016/09/21 16:29:48 christos Exp $ */
+/*     $NetBSD: mdsetimage.c,v 1.23 2016/09/22 08:43:26 mlelstv 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.22 2016/09/21 16:29:48 christos Exp $");
+__RCSID("$NetBSD: mdsetimage.c,v 1.23 2016/09/22 08:43:26 mlelstv Exp $");
 #endif /* not lint */
 
 #include <sys/types.h>
@@ -167,8 +167,9 @@
                if ((uintmax_t)fssb.st_size != (size_t)fssb.st_size)
                        errx(1, "fs image is too big");
                if (fssb.st_size > md_root_size_value)
-                       errx(1, "fs image (%td bytes) too big for buffer"
-                           " (%u bytes)", fssb.st_size, md_root_size_value);
+                       errx(1, "fs image (%jd bytes) too big for buffer"
+                           " (%u bytes)", (intmax_t) fssb.st_size,
+                           md_root_size_value);
                left_to_copy = fssb.st_size;
        }
 
@@ -219,8 +220,8 @@
                char buf[sizeof(uint32_t)];
 
                if (verbose)
-                       fprintf(stderr, "setting md_root_size to %llu\n",
-                           (unsigned long long) fssb.st_size);
+                       fprintf(stderr, "setting md_root_size to %jd\n",
+                           (intmax_t) fssb.st_size);
                if (lseek(kfd, md_root_size_offset, SEEK_SET) !=
                    (off_t)md_root_size_offset)
                        err(1, "seek %s", kfile);



Home | Main Index | Thread Index | Old Index