Source-Changes-HG archive

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

[src/trunk]: src/usr.sbin/makefs/ffs Fix the build, use %jd and (intmax_t) ca...



details:   https://anonhg.NetBSD.org/src/rev/0ed0d62b2539
branches:  trunk
changeset: 1008542:0ed0d62b2539
user:      kre <kre%NetBSD.org@localhost>
date:      Thu Mar 26 04:25:28 2020 +0000

description:
Fix the build, use %jd and (intmax_t) cast for big numbers, off_t
and ptrdiff_t aren't always the same size.

diffstat:

 usr.sbin/makefs/ffs/mkfs.c |  8 ++++----
 1 files changed, 4 insertions(+), 4 deletions(-)

diffs (29 lines):

diff -r 9c32b8b0d7cf -r 0ed0d62b2539 usr.sbin/makefs/ffs/mkfs.c
--- a/usr.sbin/makefs/ffs/mkfs.c        Thu Mar 26 01:05:26 2020 +0000
+++ b/usr.sbin/makefs/ffs/mkfs.c        Thu Mar 26 04:25:28 2020 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: mkfs.c,v 1.38 2020/03/25 20:17:48 christos Exp $       */
+/*     $NetBSD: mkfs.c,v 1.39 2020/03/26 04:25:28 kre Exp $    */
 
 /*
  * Copyright (c) 2002 Networks Associates Technology, Inc.
@@ -48,7 +48,7 @@
 static char sccsid[] = "@(#)mkfs.c     8.11 (Berkeley) 5/3/95";
 #else
 #ifdef __RCSID
-__RCSID("$NetBSD: mkfs.c,v 1.38 2020/03/25 20:17:48 christos Exp $");
+__RCSID("$NetBSD: mkfs.c,v 1.39 2020/03/26 04:25:28 kre Exp $");
 #endif
 #endif
 #endif /* not lint */
@@ -821,8 +821,8 @@
 
        offset = bno * fsopts->sectorsize + fsopts->offset;
        if (lseek(fsopts->fd, offset, SEEK_SET) == -1)
-               err(EXIT_FAILURE, "%s: seek error @%td for sector %jd",
-                   __func__, offset, (intmax_t)bno);
+               err(EXIT_FAILURE, "%s: seek error @%jd for sector %jd",
+                   __func__, (intmax_t)offset, (intmax_t)bno);
        n = write(fsopts->fd, bf, size);
        if (n == -1)
                err(EXIT_FAILURE, "%s: write error for sector %jd", __func__,



Home | Main Index | Thread Index | Old Index