diff options
author | Denys Vlasenko | 2021-09-10 00:20:05 +0200 |
---|---|---|
committer | Denys Vlasenko | 2021-09-10 00:20:05 +0200 |
commit | c421388dcaa6adba9f2f7cda3be4537daa466355 (patch) | |
tree | 2ba7debd2b4129cbf37ec0459669aa13360c0bc6 /util-linux | |
parent | 0599e0f87bcaa4b9f91652fa53bc29a3bdacfa13 (diff) | |
download | busybox-c421388dcaa6adba9f2f7cda3be4537daa466355.zip busybox-c421388dcaa6adba9f2f7cda3be4537daa466355.tar.gz |
blkdiscard: accept -f (force) as no-op
function old new delta
.rodata 104250 104251 +1
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
Diffstat (limited to 'util-linux')
-rw-r--r-- | util-linux/blkdiscard.c | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/util-linux/blkdiscard.c b/util-linux/blkdiscard.c index ff2101e..7ac8045 100644 --- a/util-linux/blkdiscard.c +++ b/util-linux/blkdiscard.c @@ -18,10 +18,12 @@ //usage:#define blkdiscard_trivial_usage //usage: "[-o OFS] [-l LEN] [-s] DEVICE" //usage:#define blkdiscard_full_usage "\n\n" -//usage: "Discard sectors on DEVICE\n" -//usage: "\n -o OFS Byte offset into device" -//usage: "\n -l LEN Number of bytes to discard" -//usage: "\n -s Perform a secure discard" +//usage: "Discard sectors on DEVICE\n" +//usage: "\n -o OFS Byte offset into device" +//usage: "\n -l LEN Number of bytes to discard" +//usage: "\n -s Perform a secure discard" +///////: "\n -f Disable check for mounted filesystem" +//////////////// -f: accepted but is a nop (we do no check anyway) //usage: //usage:#define blkdiscard_example_usage //usage: "$ blkdiscard -o 0 -l 1G /dev/sdb" @@ -51,9 +53,10 @@ int blkdiscard_main(int argc UNUSED_PARAM, char **argv) OPT_OFFSET = (1 << 0), OPT_LENGTH = (1 << 1), OPT_SECURE = (1 << 2), + OPT_FORCE = (1 << 3), //nop }; - opts = getopt32(argv, "^" "o:l:s" "\0" "=1", &offset_str, &length_str); + opts = getopt32(argv, "^" "o:l:sf" "\0" "=1", &offset_str, &length_str); argv += optind; fd = xopen(argv[0], O_RDWR|O_EXCL); |