diff options
author | Ron Yorston <rmy@pobox.com> | 2021-09-10 14:47:27 +0100 |
---|---|---|
committer | Ron Yorston <rmy@pobox.com> | 2021-09-10 14:47:27 +0100 |
commit | 3eb1d088e09db204f456ad7b76eced21e429f001 (patch) | |
tree | a81b5bb422db5ee97475a8f1a4b5236442ed6f14 /util-linux | |
parent | 12bc40da28f85cbe97673671f315f847f1dbbabf (diff) | |
parent | 40f2dd7dd2e50c9d81dda4d72bf9c85c4c479a89 (diff) | |
download | busybox-w32-3eb1d088e09db204f456ad7b76eced21e429f001.tar.gz busybox-w32-3eb1d088e09db204f456ad7b76eced21e429f001.tar.bz2 busybox-w32-3eb1d088e09db204f456ad7b76eced21e429f001.zip |
Merge branch 'busybox' into merge
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 ff2101ed0..7ac8045f9 100644 --- a/util-linux/blkdiscard.c +++ b/util-linux/blkdiscard.c | |||
@@ -18,10 +18,12 @@ | |||
18 | //usage:#define blkdiscard_trivial_usage | 18 | //usage:#define blkdiscard_trivial_usage |
19 | //usage: "[-o OFS] [-l LEN] [-s] DEVICE" | 19 | //usage: "[-o OFS] [-l LEN] [-s] DEVICE" |
20 | //usage:#define blkdiscard_full_usage "\n\n" | 20 | //usage:#define blkdiscard_full_usage "\n\n" |
21 | //usage: "Discard sectors on DEVICE\n" | 21 | //usage: "Discard sectors on DEVICE\n" |
22 | //usage: "\n -o OFS Byte offset into device" | 22 | //usage: "\n -o OFS Byte offset into device" |
23 | //usage: "\n -l LEN Number of bytes to discard" | 23 | //usage: "\n -l LEN Number of bytes to discard" |
24 | //usage: "\n -s Perform a secure discard" | 24 | //usage: "\n -s Perform a secure discard" |
25 | ///////: "\n -f Disable check for mounted filesystem" | ||
26 | //////////////// -f: accepted but is a nop (we do no check anyway) | ||
25 | //usage: | 27 | //usage: |
26 | //usage:#define blkdiscard_example_usage | 28 | //usage:#define blkdiscard_example_usage |
27 | //usage: "$ blkdiscard -o 0 -l 1G /dev/sdb" | 29 | //usage: "$ blkdiscard -o 0 -l 1G /dev/sdb" |
@@ -51,9 +53,10 @@ int blkdiscard_main(int argc UNUSED_PARAM, char **argv) | |||
51 | OPT_OFFSET = (1 << 0), | 53 | OPT_OFFSET = (1 << 0), |
52 | OPT_LENGTH = (1 << 1), | 54 | OPT_LENGTH = (1 << 1), |
53 | OPT_SECURE = (1 << 2), | 55 | OPT_SECURE = (1 << 2), |
56 | OPT_FORCE = (1 << 3), //nop | ||
54 | }; | 57 | }; |
55 | 58 | ||
56 | opts = getopt32(argv, "^" "o:l:s" "\0" "=1", &offset_str, &length_str); | 59 | opts = getopt32(argv, "^" "o:l:sf" "\0" "=1", &offset_str, &length_str); |
57 | argv += optind; | 60 | argv += optind; |
58 | 61 | ||
59 | fd = xopen(argv[0], O_RDWR|O_EXCL); | 62 | fd = xopen(argv[0], O_RDWR|O_EXCL); |