trim(8): candelete() returns wrong results because fd is opened O_WRONLY
This was discovered while using trim(8) to test bhyve trim Reviewed by: asomers Differential Revision: https://reviews.freebsd.org/D24371
This commit is contained in:
parent
22769bbe30
commit
9d433cb875
@ -220,7 +220,7 @@ trim(const char *path, off_t offset, off_t length, bool dryrun, bool verbose)
|
||||
return (0);
|
||||
}
|
||||
|
||||
fd = opendev(path, O_WRONLY | O_DIRECT);
|
||||
fd = opendev(path, O_RDWR | O_DIRECT);
|
||||
arg[0] = offset;
|
||||
arg[1] = length;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user