destination device must be opened O_RDWR because device_size_get() might need to read()
(Logical change 1.363)edge.strict_endians
parent
c7f948d554
commit
443662a5d6
|
@ -1046,7 +1046,8 @@ int main(int argc, char **argv)
|
|||
if ((fd_out = fileno(stdout)) == -1)
|
||||
perr_exit("fileno for stdout failed");
|
||||
} else {
|
||||
int flags = O_WRONLY;
|
||||
/* device_size_get() might need to read() */
|
||||
int flags = O_RDWR;
|
||||
|
||||
if (!opt.blkdev_out) {
|
||||
flags |= O_CREAT | O_TRUNC;
|
||||
|
|
Loading…
Reference in New Issue