From 5fa3142cdbb67cbb8287b2ec4fc35ee6532b3c6d Mon Sep 17 00:00:00 2001 From: Kiyoshi Aman Date: Thu, 16 May 2019 11:47:54 -0500 Subject: bin/dd: make buildable with libbsd --- bin/dd/dd.c | 24 +++++------------------- 1 file changed, 5 insertions(+), 19 deletions(-) (limited to 'bin/dd/dd.c') diff --git a/bin/dd/dd.c b/bin/dd/dd.c index c4fb1e8..aa2897d 100644 --- a/bin/dd/dd.c +++ b/bin/dd/dd.c @@ -33,20 +33,6 @@ * SUCH DAMAGE. */ -#include -#ifndef lint -__COPYRIGHT("@(#) Copyright (c) 1991, 1993, 1994\ - The Regents of the University of California. All rights reserved."); -#endif /* not lint */ - -#ifndef lint -#if 0 -static char sccsid[] = "@(#)dd.c 8.5 (Berkeley) 4/2/94"; -#else -__RCSID("$NetBSD: dd.c,v 1.51 2016/09/05 01:00:07 sevan Exp $"); -#endif -#endif /* not lint */ - #include #include #include @@ -61,6 +47,7 @@ __RCSID("$NetBSD: dd.c,v 1.51 2016/09/05 01:00:07 sevan Exp $"); #include #include #include +#include #include #include @@ -135,10 +122,10 @@ main(int argc, char *argv[]) #endif setup(); - (void)signal(SIGINFO, summaryx); + (void)signal(SIGHUP, summaryx); (void)signal(SIGINT, terminate); (void)sigemptyset(&infoset); - (void)sigaddset(&infoset, SIGINFO); + (void)sigaddset(&infoset, SIGHUP); (void)atexit(summary); @@ -203,15 +190,14 @@ setup(void) #endif /* NO_IOFLAG */ #define OFLAGS \ (oflag | (ddflags & (C_SEEK | C_NOTRUNC) ? 0 : O_TRUNC)) - out.fd = ddop_open(out, out.name, O_RDWR | OFLAGS, DEFFILEMODE); + out.fd = ddop_open(out, out.name, O_RDWR | OFLAGS); /* * May not have read access, so try again with write only. * Without read we may have a problem if output also does * not support seeks. */ if (out.fd < 0) { - out.fd = ddop_open(out, out.name, O_WRONLY | OFLAGS, - DEFFILEMODE); + out.fd = ddop_open(out, out.name, O_WRONLY | OFLAGS); out.flags |= NOREAD; } if (out.fd < 0) { -- cgit v1.2.3-70-g09d2