mirror of
https://github.com/kdave/btrfs-progs
synced 2025-01-11 16:29:42 +00:00
Btrfs-progs: move crc32c optimization init
Don't call crc32c_optimization_init() until we know that a command is actually going to be invoked. Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
This commit is contained in:
parent
5956f752c6
commit
2f4e4e448f
4
btrfs.c
4
btrfs.c
@ -263,8 +263,6 @@ int main(int argc, char **argv)
|
|||||||
{
|
{
|
||||||
const struct cmd_struct *cmd;
|
const struct cmd_struct *cmd;
|
||||||
|
|
||||||
crc32c_optimization_init();
|
|
||||||
|
|
||||||
argc--;
|
argc--;
|
||||||
argv++;
|
argv++;
|
||||||
handle_options(&argc, &argv);
|
handle_options(&argc, &argv);
|
||||||
@ -280,6 +278,8 @@ int main(int argc, char **argv)
|
|||||||
|
|
||||||
handle_help_options_next_level(cmd, argc, argv);
|
handle_help_options_next_level(cmd, argc, argv);
|
||||||
|
|
||||||
|
crc32c_optimization_init();
|
||||||
|
|
||||||
fixup_argv0(argv, cmd->token);
|
fixup_argv0(argv, cmd->token);
|
||||||
exit(cmd->fn(argc, argv));
|
exit(cmd->fn(argc, argv));
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user