Module Name:    src
Committed By:   kre
Date:           Thu Mar 26 04:25:28 UTC 2020

Modified Files:
        src/usr.sbin/makefs/ffs: mkfs.c

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


To generate a diff of this commit:
cvs rdiff -u -r1.38 -r1.39 src/usr.sbin/makefs/ffs/mkfs.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/makefs/ffs/mkfs.c
diff -u src/usr.sbin/makefs/ffs/mkfs.c:1.38 src/usr.sbin/makefs/ffs/mkfs.c:1.39
--- src/usr.sbin/makefs/ffs/mkfs.c:1.38	Wed Mar 25 20:17:48 2020
+++ src/usr.sbin/makefs/ffs/mkfs.c	Thu Mar 26 04:25:28 2020
@@ -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 @@ ffs_wtfs(daddr_t bno, int size, void *bf
 
 	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__,

Reply via email to