search for: cmd_pattern

Displaying 4 results from an estimated 4 matches for "cmd_pattern".

2015 Oct 27
1
[PATCHv3] Added btrfs support to vfs_minimum_size.
...ince v4.2 + * We could check whether 'btrfs' supports + * 'min-dev-size' command by checking the output of + * 'btrfs --help' command. + */ +static int +test_btrfs_min_dev_size (void) +{ + CLEANUP_FREE char *err = NULL, *out = NULL; + static int result = -1; + const char *cmd_pattern = "btrfs inspect-internal min-dev-size"; + int r; + + if (result != -1) + return result; + + r = commandr (&out, &err, str_btrfs, "--help", NULL); + + if (r == -1) { + reply_with_error ("btrfs: %s", err); + return -1; + } + + if (strstr (out, cmd...
2015 Oct 22
2
[PATCH] Added btrfs support for vfs_min_size.
...trfs' supports + * 'min-dev-size' command by checking the output of + * 'btrfs --help' command. + */ +static int +test_btrfs_min_dev_size (void) +{ + CLEANUP_FREE char *err = NULL, *out = NULL; + static int result = -1; + if (result != -1) + return result; + + const char *cmd_pattern = "btrfs inspect-internal min-dev-size"; + + int r = commandr (&out, &err, str_btrfs, "--help", NULL); + + if (r == -1) { + reply_with_error ("btrfs: %s", err); + return -1; + } + + if (strstr (out, cmd_pattern) == NULL) + result = 0; + else +...
2015 Oct 23
0
Re: [PATCH] Added btrfs support for vfs_min_size.
...y checking the output of > + * 'btrfs --help' command. > + */ > +static int > +test_btrfs_min_dev_size (void) > +{ > + CLEANUP_FREE char *err = NULL, *out = NULL; > + static int result = -1; > + if (result != -1) > + return result; > + > + const char *cmd_pattern = "btrfs inspect-internal min-dev-size"; > + > + int r = commandr (&out, &err, str_btrfs, "--help", NULL); Let's move variable decls to the top of the function, and add a newline between variable decls and the rest of the code. > + if (r == -1) { > +...
2015 Oct 23
1
[PATCHv2] Added btrfs support for vfs_min_size.
...ince v4.2 + * We could check whether 'btrfs' supports + * 'min-dev-size' command by checking the output of + * 'btrfs --help' command. + */ +static int +test_btrfs_min_dev_size (void) +{ + CLEANUP_FREE char *err = NULL, *out = NULL; + static int result = -1; + const char *cmd_pattern = "btrfs inspect-internal min-dev-size"; + int r; + + if (result != -1) + return result; + + r = commandr (&out, &err, str_btrfs, "--help", NULL); + + if (r == -1) { + reply_with_error ("btrfs: %s", err); + return -1; + } + + if (strstr (out, cmd...