Module Name:    src
Committed By:   mlelstv
Date:           Thu Sep 22 08:43:26 UTC 2016

Modified Files:
        src/usr.sbin/mdsetimage: mdsetimage.c

Log Message:
cast to intmax_t for machine-independent printing.


To generate a diff of this commit:
cvs rdiff -u -r1.22 -r1.23 src/usr.sbin/mdsetimage/mdsetimage.c

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

Modified files:

Index: src/usr.sbin/mdsetimage/mdsetimage.c
diff -u src/usr.sbin/mdsetimage/mdsetimage.c:1.22 src/usr.sbin/mdsetimage/mdsetimage.c:1.23
--- src/usr.sbin/mdsetimage/mdsetimage.c:1.22	Wed Sep 21 16:29:48 2016
+++ src/usr.sbin/mdsetimage/mdsetimage.c	Thu Sep 22 08:43:26 2016
@@ -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 @@ main(int argc, char *argv[])
 		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 @@ main(int argc, char *argv[])
 		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);

Reply via email to