diff options
Diffstat (limited to 'coreutils')
-rw-r--r-- | coreutils/dd.c | 19 |
1 files changed, 2 insertions, 17 deletions
diff --git a/coreutils/dd.c b/coreutils/dd.c index cba90857f..ce8bcc6a5 100644 --- a/coreutils/dd.c +++ b/coreutils/dd.c | |||
@@ -5,20 +5,7 @@ | |||
5 | * | 5 | * |
6 | * Copyright (C) 2000,2001 Matt Kraai | 6 | * Copyright (C) 2000,2001 Matt Kraai |
7 | * | 7 | * |
8 | * This program is free software; you can redistribute it and/or modify | 8 | * Licensed under GPLv2 or later, see file LICENSE in this tarball for details. |
9 | * it under the terms of the GNU General Public License as published by | ||
10 | * the Free Software Foundation; either version 2 of the License, or | ||
11 | * (at your option) any later version. | ||
12 | * | ||
13 | * This program is distributed in the hope that it will be useful, | ||
14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | ||
16 | * General Public License for more details. | ||
17 | * | ||
18 | * You should have received a copy of the GNU General Public License | ||
19 | * along with this program; if not, write to the Free Software | ||
20 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | ||
21 | * | ||
22 | */ | 9 | */ |
23 | 10 | ||
24 | #include <sys/types.h> | 11 | #include <sys/types.h> |
@@ -119,9 +106,7 @@ int dd_main(int argc, char **argv) | |||
119 | oflag |= O_TRUNC; | 106 | oflag |= O_TRUNC; |
120 | } | 107 | } |
121 | 108 | ||
122 | if ((ofd = open(outfile, oflag, 0666)) < 0) { | 109 | ofd = bb_xopen3(outfile, oflag, 0666); |
123 | bb_perror_msg_and_die("%s", outfile); | ||
124 | } | ||
125 | 110 | ||
126 | if (seek && trunc_flag) { | 111 | if (seek && trunc_flag) { |
127 | if (ftruncate(ofd, seek * bs) < 0) { | 112 | if (ftruncate(ofd, seek * bs) < 0) { |