Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/bin/dd a bit more cosmetic changes.
details: https://anonhg.NetBSD.org/src/rev/45ffe7a27f83
branches: trunk
changeset: 518184:45ffe7a27f83
user: enami <enami%NetBSD.org@localhost>
date: Mon Nov 26 00:56:33 2001 +0000
description:
a bit more cosmetic changes.
diffstat:
bin/dd/args.c | 10 +++++-----
bin/dd/dd.c | 10 ++++++----
bin/dd/misc.c | 12 ++++++------
bin/dd/position.c | 8 ++++----
4 files changed, 21 insertions(+), 19 deletions(-)
diffs (149 lines):
diff -r 163a0334cfa8 -r 45ffe7a27f83 bin/dd/args.c
--- a/bin/dd/args.c Mon Nov 26 00:41:24 2001 +0000
+++ b/bin/dd/args.c Mon Nov 26 00:56:33 2001 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: args.c,v 1.19 2001/11/25 10:50:06 lukem Exp $ */
+/* $NetBSD: args.c,v 1.20 2001/11/26 00:56:33 enami Exp $ */
/*-
* Copyright (c) 1991, 1993, 1994
@@ -42,7 +42,7 @@
#if 0
static char sccsid[] = "@(#)args.c 8.3 (Berkeley) 4/2/94";
#else
-__RCSID("$NetBSD: args.c,v 1.19 2001/11/25 10:50:06 lukem Exp $");
+__RCSID("$NetBSD: args.c,v 1.20 2001/11/26 00:56:33 enami Exp $");
#endif
#endif /* not lint */
@@ -83,7 +83,7 @@
u_int set, noset;
} args[] = {
/* the array needs to be sorted by the first column so
- bsearch() can be used to find commands quickly */
+ bsearch() can be used to find commands quickly */
{ "bs", f_bs, C_BS, C_BS|C_IBS|C_OBS|C_OSYNC },
{ "cbs", f_cbs, C_CBS, C_CBS },
{ "conv", f_conv, 0, 0 },
@@ -167,10 +167,10 @@
} else
cfunc = def;
- /* Read, write and seek calls take off_t as arguments.
+ /* Read, write and seek calls take off_t as arguments.
*
* The following check is not done because an off_t is a quad
- * for current NetBSD implementations.
+ * for current NetBSD implementations.
*
* if (in.offset > INT_MAX/in.dbsz || out.offset > INT_MAX/out.dbsz)
* errx(1, "seek offsets cannot be larger than %d", INT_MAX);
diff -r 163a0334cfa8 -r 45ffe7a27f83 bin/dd/dd.c
--- a/bin/dd/dd.c Mon Nov 26 00:41:24 2001 +0000
+++ b/bin/dd/dd.c Mon Nov 26 00:56:33 2001 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: dd.c,v 1.24 2001/11/26 00:13:24 lukem Exp $ */
+/* $NetBSD: dd.c,v 1.25 2001/11/26 00:56:33 enami Exp $ */
/*-
* Copyright (c) 1991, 1993, 1994
@@ -47,7 +47,7 @@
#if 0
static char sccsid[] = "@(#)dd.c 8.5 (Berkeley) 4/2/94";
#else
-__RCSID("$NetBSD: dd.c,v 1.24 2001/11/26 00:13:24 lukem Exp $");
+__RCSID("$NetBSD: dd.c,v 1.25 2001/11/26 00:56:33 enami Exp $");
#endif
#endif /* not lint */
@@ -124,6 +124,7 @@
static void
setup(void)
{
+
if (in.name == NULL) {
in.name = "stdin";
in.fd = STDIN_FILENO;
@@ -413,7 +414,8 @@
out.name);
}
if (out.flags & ISTAPE)
- errx(1, "%s: short write on tape device", out.name);
+ errx(1, "%s: short write on tape device",
+ out.name);
}
if ((out.dbcnt -= n) < out.dbsz)
break;
@@ -443,5 +445,5 @@
oerrno = errno;
(void)sigprocmask(SIG_SETMASK, &oset, NULL);
errno = oerrno;
- return rv;
+ return (rv);
}
diff -r 163a0334cfa8 -r 45ffe7a27f83 bin/dd/misc.c
--- a/bin/dd/misc.c Mon Nov 26 00:41:24 2001 +0000
+++ b/bin/dd/misc.c Mon Nov 26 00:56:33 2001 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: misc.c,v 1.13 2001/11/25 10:50:06 lukem Exp $ */
+/* $NetBSD: misc.c,v 1.14 2001/11/26 00:56:33 enami Exp $ */
/*-
* Copyright (c) 1991, 1993, 1994
@@ -42,7 +42,7 @@
#if 0
static char sccsid[] = "@(#)misc.c 8.3 (Berkeley) 4/2/94";
#else
-__RCSID("$NetBSD: misc.c,v 1.13 2001/11/25 10:50:06 lukem Exp $");
+__RCSID("$NetBSD: misc.c,v 1.14 2001/11/26 00:56:33 enami Exp $");
#endif
#endif /* not lint */
@@ -83,14 +83,14 @@
(void)write(STDERR_FILENO, buf, strlen(buf));
if (st.swab) {
(void)snprintf(buf, sizeof(buf), "%llu odd length swab %s\n",
- (unsigned long long)st.swab,
- (st.swab == 1) ? "block" : "blocks");
+ (unsigned long long)st.swab,
+ (st.swab == 1) ? "block" : "blocks");
(void)write(STDERR_FILENO, buf, strlen(buf));
}
if (st.trunc) {
(void)snprintf(buf, sizeof(buf), "%llu truncated %s\n",
- (unsigned long long)st.trunc,
- (st.trunc == 1) ? "block" : "blocks");
+ (unsigned long long)st.trunc,
+ (st.trunc == 1) ? "block" : "blocks");
(void)write(STDERR_FILENO, buf, strlen(buf));
}
(void)snprintf(buf, sizeof(buf),
diff -r 163a0334cfa8 -r 45ffe7a27f83 bin/dd/position.c
--- a/bin/dd/position.c Mon Nov 26 00:41:24 2001 +0000
+++ b/bin/dd/position.c Mon Nov 26 00:56:33 2001 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: position.c,v 1.11 2001/11/25 06:53:48 lukem Exp $ */
+/* $NetBSD: position.c,v 1.12 2001/11/26 00:56:33 enami Exp $ */
/*-
* Copyright (c) 1991, 1993, 1994
@@ -42,7 +42,7 @@
#if 0
static char sccsid[] = "@(#)position.c 8.3 (Berkeley) 4/2/94";
#else
-__RCSID("$NetBSD: position.c,v 1.11 2001/11/25 06:53:48 lukem Exp $");
+__RCSID("$NetBSD: position.c,v 1.12 2001/11/26 00:56:33 enami Exp $");
#endif
#endif /* not lint */
@@ -73,8 +73,8 @@
/* If not a pipe or tape device, try to seek on it. */
if (!(in.flags & (ISPIPE|ISTAPE))) {
- if (lseek(in.fd, (off_t)in.offset * (off_t)in.dbsz, SEEK_CUR)
- == -1)
+ if (lseek(in.fd,
+ (off_t)in.offset * (off_t)in.dbsz, SEEK_CUR) == -1)
err(1, "%s", in.name);
return;
}
Home |
Main Index |
Thread Index |
Old Index