Displaying 4 results from an estimated 4 matches for "scni32".
Did you mean:
scnd32
2014 Nov 21
2
Re: [PATCH 5/6] New API: btrfs_subvolume_get_default
...herwise, print it only when "debug" is
enabled (if (debug) ...).
> + if (r == -1) {
> + reply_with_error ("%s: %s", fs, err);
> + return -1;
> + }
> + r = -1;
Most probably it is not needed to manually reset r.
> + if (sscanf (out, "ID %" SCNi32, &r) != 1) {
It would be simplier to just use xstrtol to parse the output.
> + reply_with_error ("%s: expected output, but got nothing",
argv[0]);
More than "nothing", "not a number". I'd also append the whole output
here.
> diff --git a/generator...
2014 Nov 21
0
[PATCH 5/6] New API: btrfs_subvolume_get_default
...ault");
+ ADD_ARG (argv, i, fs_buf);
+ ADD_ARG (argv, i, NULL);
+
+ r = commandv (&out, &err, argv);
+ fprintf(stderr, "%s\n", out);
+ if (r == -1) {
+ reply_with_error ("%s: %s", fs, err);
+ return -1;
+ }
+ r = -1;
+ if (sscanf (out, "ID %" SCNi32, &r) != 1) {
+ reply_with_error ("%s: expected output, but got nothing", argv[0]);
+ return -1;
+ }
+
+ return r;
+}
+
+int
do_btrfs_filesystem_sync (const char *fs)
{
const size_t MAX_ARGS = 64;
diff --git a/generator/actions.ml b/generator/actions.ml
index 1c1fcff..cf96...
2014 Nov 24
0
Re: [PATCH 5/6] New API: btrfs_subvolume_get_default
...l just remove the line.
>
> > + if (r == -1) {
> > + reply_with_error ("%s: %s", fs, err);
> > + return -1;
> > + }
> > + r = -1;
>
> Most probably it is not needed to manually reset r.
>
> > + if (sscanf (out, "ID %" SCNi32, &r) != 1) {
>
> It would be simplier to just use xstrtol to parse the output.
Then we should skip "ID " firstly.
>
> > + reply_with_error ("%s: expected output, but got nothing",
> argv[0]);
>
> More than "nothing", "not a num...
2014 Nov 21
13
[PATCH 0/6] btrfs support part1: subvolume commands
Hi,
This is the part1 of improving btrfs support. This series adds missing
parameters to btrfs_subvolume_snapshot and btrfs_subvolume_create, and
adds two new API btrfs_subvolume_get_default and btrfs_subvolume_show.
Other parts will follow.
Regards,
Hu
Hu Tao (6):
btrfs: correct words about subvolume and snapshot
btrfs: add optional parameter `ro' to btrfs_subvolume_snapshot
btrfs: