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 improve error messages.
details: https://anonhg.NetBSD.org/src/rev/af01b0e7de96
branches: trunk
changeset: 1008529:af01b0e7de96
user: christos <christos%NetBSD.org@localhost>
date: Wed Mar 25 20:17:48 2020 +0000
description:
improve error messages.
diffstat:
usr.sbin/makefs/ffs/mkfs.c | 16 ++++++++--------
1 files changed, 8 insertions(+), 8 deletions(-)
diffs (40 lines):
diff -r af8f5ad875f3 -r af01b0e7de96 usr.sbin/makefs/ffs/mkfs.c
--- a/usr.sbin/makefs/ffs/mkfs.c Wed Mar 25 19:03:44 2020 +0000
+++ b/usr.sbin/makefs/ffs/mkfs.c Wed Mar 25 20:17:48 2020 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: mkfs.c,v 1.37 2017/02/09 04:42:53 kre Exp $ */
+/* $NetBSD: mkfs.c,v 1.38 2020/03/25 20:17:48 christos 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.37 2017/02/09 04:42:53 kre Exp $");
+__RCSID("$NetBSD: mkfs.c,v 1.38 2020/03/25 20:17:48 christos Exp $");
#endif
#endif
#endif /* not lint */
@@ -821,15 +821,15 @@
offset = bno * fsopts->sectorsize + fsopts->offset;
if (lseek(fsopts->fd, offset, SEEK_SET) == -1)
- err(EXIT_FAILURE, "%s: seek error for sector %lld", __func__,
- (long long)bno);
+ err(EXIT_FAILURE, "%s: seek error @%td for sector %jd",
+ __func__, offset, (intmax_t)bno);
n = write(fsopts->fd, bf, size);
if (n == -1)
- err(EXIT_FAILURE, "%s: write error for sector %lld", __func__,
- (long long)bno);
+ err(EXIT_FAILURE, "%s: write error for sector %jd", __func__,
+ (intmax_t)bno);
else if (n != size)
- errx(EXIT_FAILURE, "%s: short write error for sector %lld",
- __func__, (long long)bno);
+ errx(EXIT_FAILURE, "%s: short write error for sector %jd",
+ __func__, (intmax_t)bno);
}
Home |
Main Index |
Thread Index |
Old Index