Introduction
Introduction Statistics Contact Development Disclaimer Help
dd: always create of= even if seek= is used - ubase - suckless linux base utils
git clone git://git.suckless.org/ubase
Log
Files
Refs
README
LICENSE
---
commit 05a69d9d0decf9e8d5037bd8d20bb20c235b2017
parent 0e7ab0ca9e1769d9c5e004378f14c9a7daf4e343
Author: Eivind Uggedal <[email protected]>
Date: Tue, 15 Mar 2016 16:02:33 +0000
dd: always create of= even if seek= is used
Diffstat:
M dd.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/dd.c b/dd.c
@@ -42,7 +42,7 @@ static int
prepare_copy(struct dd_config *ddc, int *ifd, int *ofd)
{
struct stat st;
- int fli = O_RDONLY|O_LARGEFILE|O_NOCTTY, flo = O_WRONLY|O_LARGEFILE|O_…
+ int fli = O_RDONLY|O_LARGEFILE|O_NOCTTY, flo = O_WRONLY|O_LARGEFILE|O_…
uid_t euid = 0;
long pagesize;
@@ -106,7 +106,7 @@ prepare_copy(struct dd_config *ddc, int *ifd, int *ofd)
}
if (!ddc->seek)
- flo |= O_CREAT|O_TRUNC;
+ flo |= O_TRUNC;
if (!ddc->out) *ofd = 1;
else if ((*ofd = open(ddc->out, flo, st.st_mode)) < 0) {
You are viewing proxied material from suckless.org. The copyright of proxied material belongs to its original authors. Any comments or complaints in relation to proxied material should be directed to the original authors of the content concerned. Please see the disclaimer for more details.