mirror of
https://git.proxmox.com/git/mirror_zfs.git
synced 2026-05-22 02:27:36 +03:00
Enable zhack to work properly with 4k sector size disks
Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov> Signed-off-by: Paul Dagnelie <paul.dagnelie@klarasystems.com> Closes #17576
This commit is contained in:
committed by
Tony Hutter
parent
411249498e
commit
a1d839eddd
+7
-2
@@ -70,7 +70,8 @@ static __attribute__((noreturn)) void
|
||||
usage(void)
|
||||
{
|
||||
(void) fprintf(stderr,
|
||||
"Usage: zhack [-c cachefile] [-d dir] <subcommand> <args> ...\n"
|
||||
"Usage: zhack [-o tunable] [-c cachefile] [-d dir] <subcommand> "
|
||||
"<args> ...\n"
|
||||
"where <subcommand> <args> is one of the following:\n"
|
||||
"\n");
|
||||
|
||||
@@ -1169,7 +1170,7 @@ main(int argc, char **argv)
|
||||
dprintf_setup(&argc, argv);
|
||||
zfs_prop_init();
|
||||
|
||||
while ((c = getopt(argc, argv, "+c:d:")) != -1) {
|
||||
while ((c = getopt(argc, argv, "+c:d:o:")) != -1) {
|
||||
switch (c) {
|
||||
case 'c':
|
||||
g_importargs.cachefile = optarg;
|
||||
@@ -1178,6 +1179,10 @@ main(int argc, char **argv)
|
||||
assert(g_importargs.paths < MAX_NUM_PATHS);
|
||||
g_importargs.path[g_importargs.paths++] = optarg;
|
||||
break;
|
||||
case 'o':
|
||||
if (set_global_var(optarg) != 0)
|
||||
exit(1);
|
||||
break;
|
||||
default:
|
||||
usage();
|
||||
break;
|
||||
|
||||
Reference in New Issue
Block a user