diff options
author | mlaier <mlaier@FreeBSD.org> | 2008-12-03 23:00:57 +0000 |
---|---|---|
committer | mlaier <mlaier@FreeBSD.org> | 2008-12-03 23:00:57 +0000 |
commit | 97597606a6bffc7738c740cf9651ca5540888eab (patch) | |
tree | a96b75eab435cb8310be681634406cbad26f89b1 /sbin/newfs_msdos | |
parent | fe1ef47ea0b7a242dcb804e8f3a6bff035879f3b (diff) | |
download | FreeBSD-src-97597606a6bffc7738c740cf9651ca5540888eab.zip FreeBSD-src-97597606a6bffc7738c740cf9651ca5540888eab.tar.gz |
Fix build - cast off_t to (intmax_t) for printing.
Diffstat (limited to 'sbin/newfs_msdos')
-rw-r--r-- | sbin/newfs_msdos/newfs_msdos.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/sbin/newfs_msdos/newfs_msdos.c b/sbin/newfs_msdos/newfs_msdos.c index b95b6e4..9c021c0 100644 --- a/sbin/newfs_msdos/newfs_msdos.c +++ b/sbin/newfs_msdos/newfs_msdos.c @@ -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); |