Displaying 20 results from an estimated 64 matches for "scnu64".
Did you mean:
scni64
2015 Feb 02
5
[PATCH 1/2] New API: btrfs_balance_status
...STREQ (lines[0] + ovector[2], "paused"))
+ ret->btrfsbalance_status = strdup("paused");
+ else {
+ reply_with_error ("unexpected output from 'btrfs balance status' command: %s", lines[0]);
+ goto error;
+ }
+
+ if (sscanf (lines[1], "%" SCNu64 " out of about %" SCNu64
+ " chunks balanced (%" SCNu64 " considered), %" SCNu64 "%% left",
+ &ret->btrfsbalance_balanced, &ret->btrfsbalance_total,
+ &ret->btrfsbalance_considered, &ret->btrf...
2015 Feb 02
0
[PATCH 2/2] New API: btfs_scrub_status.
...+ *
+ * or:
+ *
+ * strub status for 346121d1-1847-40f8-9b7b-2bf3d539c68f
+ * no stats available
+ */
+ line = lines[1];
+ if (STREQ (line, "\tno stats available"))
+ return ret;
+
+ line = lines[2];
+ if (sscanf (line, "\tdata_extents_scrubbed: %" SCNu64,
+ &ret->btrfsscrub_data_extents_scrubbed) != 1)
+ goto error;
+ line = lines[3];
+ if (sscanf (line, "\ttree_extents_scrubbed: %" SCNu64,
+ &ret->btrfsscrub_tree_extents_scrubbed) != 1)
+ goto error;
+ line = lines[4];
+ if (sscanf (line,...
2015 Feb 11
0
[PATCH v3 2/2] New API: btfs_scrub_status
...847-40f8-9b7b-2bf3d539c68f
+ * no stats available
+ */
+ for (i = 1; lines[i] != NULL; ++i) {
+ if ((i == 1) && STREQ (lines[i], "\tno stats available"))
+ return ret;
+ else if ((i == 2) && sscanf (lines[i], "\tdata_extents_scrubbed: %" SCNu64,
+ &ret->btrfsscrub_data_extents_scrubbed) != 1)
+ goto error;
+ else if ((i == 3) && sscanf (lines[i], "\ttree_extents_scrubbed: %" SCNu64,
+ &ret->btrfsscrub_tree_extents_scrubbed) != 1)
+...
2015 Jun 17
1
Re: [PATCH v4 1/3] do_btrfs_qgroup_show: fix a bad return value
...> for (i = 0; i < nr_qgroups; ++i) {
> char *line = lines[i + 2];
> struct guestfs_int_btrfsqgroup *this =
> &ret->guestfs_int_btrfsqgroup_list_val[i];
> - uint64_t dummy1, dummy2;
> - char *p;
>
> - if (sscanf (line, "%" SCNu64 "/%" SCNu64 " %" SCNu64 " %" SCNu64,
> - &dummy1, &dummy2, &this->btrfsqgroup_rfer,
> - &this->btrfsqgroup_excl) != 4) {
> + if (sscanf (line, "%m[0-9/] %" SCNu64 " %" SCNu64,
> +...
2015 Feb 03
2
[PATCH v2 0/2] add btrfs_balance_status and btrfs_scrub_status
changes in v2:
- add check for the length of lines[]
- the code parsing 'btrfs scrub -R status' output is changed into a loop
Hu Tao (2):
New API: btrfs_balance_status
New API: btfs_scrub_status.
daemon/btrfs.c | 263 +++++++++++++++++++++++++++++++
generator/actions.ml | 26 +++
generator/structs.ml | 34 ++++
2015 Feb 11
4
[PATCH v3 0/2] add btrfs_balance_status and btrfs_scrub_status
v3:
- rebase on upstream
- fix some comments
v2:
- add check for the length of lines[]
- the code parsing 'btrfs scrub -R status' output is changed into a loop
Hu Tao (2):
New API: btrfs_balance_status
New API: btfs_scrub_status
daemon/btrfs.c | 263 +++++++++++++++++++++++++++++++
generator/actions.ml | 26 +++
2015 Feb 15
4
[PATCH v5 0/2] add btrfs_balance_status and btrfs_scrub_status
v5:
- fix tests failure
v4:
- add reply_with_error when nlines < 1
- remove `i == X' tests.
v3:
- rebase on upstream
- fix some comments
v2:
- add check for the length of lines[]
- the code parsing 'btrfs scrub -R status' output is changed into a loop
Hu Tao (2):
New API: btrfs_balance_status
New API: btfs_scrub_status
daemon/btrfs.c
2015 Feb 13
3
[PATCH v4 0/2] add btrfs_balance_status and btrfs_scrub_status
v4:
- add reply_with_error when nlines < 1
- remove `i == X' tests.
v3:
- rebase on upstream
- fix some comments
v2:
- add check for the length of lines[]
- the code parsing 'btrfs scrub -R status' output is changed into a loop
Hu Tao (2):
New API: btrfs_balance_status
New API: btfs_scrub_status
daemon/btrfs.c | 268
2015 Jun 17
6
[PATCH v4 0/3] btrfs: use CLEANUP_FREE_STRING_LIST for list free
As Pino's comment, we should take advantage of
macro CLEANUP_FREE_STRING_LIST
v4: remove some redundant strdup
v3: fix test case failure
v2: properly initialize lines
Chen Hanxiao (3):
do_btrfs_qgroup_show: fix a bad return value
do_btrfs_subvolume_list: fix a bad return value
btrfs: use CLEANUP_FREE_STRING_LIST for list free
daemon/btrfs.c | 70
2015 Jun 17
0
[PATCH v4 1/3] do_btrfs_qgroup_show: fix a bad return value
...+ free (ret);
+ return NULL;
}
for (i = 0; i < nr_qgroups; ++i) {
char *line = lines[i + 2];
struct guestfs_int_btrfsqgroup *this =
&ret->guestfs_int_btrfsqgroup_list_val[i];
- uint64_t dummy1, dummy2;
- char *p;
- if (sscanf (line, "%" SCNu64 "/%" SCNu64 " %" SCNu64 " %" SCNu64,
- &dummy1, &dummy2, &this->btrfsqgroup_rfer,
- &this->btrfsqgroup_excl) != 4) {
+ if (sscanf (line, "%m[0-9/] %" SCNu64 " %" SCNu64,
+ &th...
2015 Jun 18
2
[PATCH v5 1/2] do_btrfs_qgroup_show: fix a bad return value
..._len = nr_qgroups;
@@ -1300,31 +1302,23 @@ do_btrfs_qgroup_show (const char *path)
char *line = lines[i + 2];
struct guestfs_int_btrfsqgroup *this =
&ret->guestfs_int_btrfsqgroup_list_val[i];
- uint64_t dummy1, dummy2;
- char *p;
- if (sscanf (line, "%" SCNu64 "/%" SCNu64 " %" SCNu64 " %" SCNu64,
- &dummy1, &dummy2, &this->btrfsqgroup_rfer,
- &this->btrfsqgroup_excl) != 4) {
+ if (sscanf (line, "%m[0-9/] %" SCNu64 " %" SCNu64,
+ &th...
2015 Feb 02
0
Re: [PATCH 1/2] New API: btrfs_balance_status
...;paused"))
> + ret->btrfsbalance_status = strdup("paused");
> + else {
> + reply_with_error ("unexpected output from 'btrfs balance status' command: %s", lines[0]);
> + goto error;
> + }
> +
> + if (sscanf (lines[1], "%" SCNu64 " out of about %" SCNu64
> + " chunks balanced (%" SCNu64 " considered), %" SCNu64 "%% left",
> + &ret->btrfsbalance_balanced, &ret->btrfsbalance_total,
> + &ret->btrfsbalance_considered, &a...
2015 Jun 15
7
[PATCH v3 0/3] btrfs: use CLEANUP_FREE_STRING_LIST for list free
As Pino's comment, we should take advantage of
macro CLEANUP_FREE_STRING_LIST
v3: fix test case failure
v2: properly initialize lines
Chen Hanxiao (3):
do_btrfs_qgroup_show: fix a bad return value
do_btrfs_subvolume_list: fix a bad return value
btrfs: use CLEANUP_FREE_STRING_LIST for list free
daemon/btrfs.c | 20 ++++++++++----------
1 file changed, 10 insertions(+), 10 deletions(-)
2015 Feb 11
1
Re: [PATCH v3 2/2] New API: btfs_scrub_status
...; + * no stats available
> + */
> + for (i = 1; lines[i] != NULL; ++i) {
> + if ((i == 1) && STREQ (lines[i], "\tno stats available"))
> + return ret;
> + else if ((i == 2) && sscanf (lines[i], "\tdata_extents_scrubbed: %" SCNu64,
> + &ret->btrfsscrub_data_extents_scrubbed) != 1)
> + goto error;
> + else if ((i == 3) && sscanf (lines[i], "\ttree_extents_scrubbed: %" SCNu64,
> + &ret->btrfsscrub_tree_extents_sc...
2012 Sep 21
8
PATCH [base vtpm and libxl patches 4/6] add iomem support to libxl
...buf = xlu_cfg_get_listitem (iomem, i);
+ if (!buf) {
+ fprintf(stderr,
+ "xl: Unable to get element %d in iomem list\n", i);
+ exit(1);
+ }
+ if(sscanf(buf, "%" SCNx64",%" SCNu64,
&b_info->iomem[i].start, &b_info->iomem[i].number) != 2) {
+ fprintf(stderr,
+ "xl: Invalid argument parsing iomem: %s\n", buf);
+ exit(1);
+ }
+ }
+ }
+
+
+
if (!xlu_cfg_get_list (config, "dis...
2015 Oct 13
4
[PATCH] New API: resize2fs_P
...ut);
+ if (lines == NULL)
+ return -1;
+
+ for (i = 0; lines[i] != NULL; ++i) {
+ if (verbose)
+ fprintf (stderr, "resize2fs-P: lines[%zu] = \"%s\"\n", i, lines[i]);
+
+ if ((p = strstr (lines[i], pattern))) {
+ if (sscanf (p + strlen(pattern), "%" SCNu64, &ret) != 1)
+ return -1;
+ return ret;
+ }
+ }
+
+ return -1;
+}
+
/* Takes optional arguments, consult optargs_bitmask. */
int
do_e2fsck (const char *device,
diff --git a/generator/actions.ml b/generator/actions.ml
index a76b466..7e2bfac 100644
--- a/generator/actions.ml
+...
2014 Dec 05
0
[PATCH 09/11] New API: btrfs_qgroup_show
...ot;malloc");
+ goto error;
+ }
+
+ for (i = 0; i < nr_qgroups; ++i) {
+ char *line = lines[i + 2];
+ struct guestfs_int_btrfsqgroup *this =
+ &ret->guestfs_int_btrfsqgroup_list_val[i];
+ uint64_t dummy1, dummy2;
+ char *p;
+
+ if (sscanf (line, "%" SCNu64 "/%" SCNu64 " %" SCNu64 " %" SCNu64,
+ &dummy1, &dummy2, &this->btrfsqgroup_rfer,
+ &this->btrfsqgroup_excl) != 4) {
+ reply_with_perror ("sscanf");
+ goto error;
+ }
+ p = strchr(line, '...
2015 Feb 11
0
[PATCH v3 1/2] New API: btrfs_balance_status
...("unexpected output from 'btrfs balance status' command: %s", lines[0]);
+ goto error;
+ }
+
+ if (nlines < 2) {
+ reply_with_error ("truncated output from 'btrfs balance status' command");
+ goto error;
+ }
+
+ if (sscanf (lines[1], "%" SCNu64 " out of about %" SCNu64
+ " chunks balanced (%" SCNu64 " considered), %" SCNu64 "%% left",
+ &ret->btrfsbalance_balanced, &ret->btrfsbalance_total,
+ &ret->btrfsbalance_considered, &ret->btrf...
2015 Feb 13
0
[PATCH v4 1/2] New API: btrfs_balance_status
...("unexpected output from 'btrfs balance status' command: %s", lines[0]);
+ goto error;
+ }
+
+ if (nlines < 2) {
+ reply_with_error ("truncated output from 'btrfs balance status' command");
+ goto error;
+ }
+
+ if (sscanf (lines[1], "%" SCNu64 " out of about %" SCNu64
+ " chunks balanced (%" SCNu64 " considered), %" SCNu64 "%% left",
+ &ret->btrfsbalance_balanced, &ret->btrfsbalance_total,
+ &ret->btrfsbalance_considered, &ret->btrf...
2015 Feb 13
1
Re: [PATCH v4 1/2] New API: btrfs_balance_status
...nce status' command: %s", lines[0]);
> + goto error;
> + }
> +
> + if (nlines < 2) {
> + reply_with_error ("truncated output from 'btrfs balance status' command");
> + goto error;
> + }
> +
> + if (sscanf (lines[1], "%" SCNu64 " out of about %" SCNu64
> + " chunks balanced (%" SCNu64 " considered), %" SCNu64 "%% left",
> + &ret->btrfsbalance_balanced, &ret->btrfsbalance_total,
> + &ret->btrfsbalance_considered, &a...