Date: Wed, 3 Dec 2008 23:00:57 +0000 (UTC) From: Max Laier <mlaier@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r185594 - head/sbin/newfs_msdos Message-ID: <200812032300.mB3N0vZW003970@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: mlaier Date: Wed Dec 3 23:00:57 2008 New Revision: 185594 URL: http://svn.freebsd.org/changeset/base/185594 Log: Fix build - cast off_t to (intmax_t) for printing. Modified: head/sbin/newfs_msdos/newfs_msdos.c Modified: head/sbin/newfs_msdos/newfs_msdos.c ============================================================================== --- head/sbin/newfs_msdos/newfs_msdos.c Wed Dec 3 23:00:00 2008 (r185593) +++ head/sbin/newfs_msdos/newfs_msdos.c Wed Dec 3 23:00:57 2008 (r185594) @@ -42,6 +42,7 @@ static const char rcsid[] = #include <err.h> #include <errno.h> #include <fcntl.h> +#include <inttypes.h> #include <paths.h> #include <stdio.h> #include <stdlib.h> @@ -364,7 +365,7 @@ main(int argc, char *argv[]) errx(1, "failed to create %s", fname); pos = lseek(fd, opt_create - 1, SEEK_SET); if (write(fd, "\0", 1) != 1) - errx(1, "failed to initialize %lld bytes", opt_create); + errx(1, "failed to initialize %jd bytes", (intmax_t)opt_create); pos = lseek(fd, 0, SEEK_SET); } else if ((fd = open(fname, opt_N ? O_RDONLY : O_RDWR)) == -1 || fstat(fd, &sb)) @@ -374,7 +375,7 @@ main(int argc, char *argv[]) if (!S_ISCHR(sb.st_mode)) warnx("warning, %s is not a character device", fname); if (opt_ofs && opt_ofs != lseek(fd, opt_ofs, SEEK_SET)) - errx(1, "cannot seek to %lld", opt_ofs); + errx(1, "cannot seek to %jd", (intmax_t)opt_ofs); memset(&bpb, 0, sizeof(bpb)); if (opt_f) { getstdfmt(opt_f, &bpb);
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200812032300.mB3N0vZW003970>