search for: scnd64

Displaying 14 results from an estimated 14 matches for "scnd64".

Did you mean: end64
2015 Oct 19
5
[PATCHv2 0/2] Introduce vfs_min_size API to get minimum filesystem size.
Tried to make it in accordance with your comments. Difference to v1: Added reply_with_error where necessary. Changed name get_min_size -> vfs_min_size. Maxim Perevedentsev (2): New API: vfs_min_size Include resize2fs_P into vfs_min_size. daemon/Makefile.am | 1 + daemon/daemon.h | 2 ++ daemon/ext2.c | 45 ++++++++++++++++++++++++++----- daemon/fs-min-size.c | 49
2015 Oct 19
5
Re: [PATCH 1/2] New API: vfs_min_size
...{ > + reply_with_error("Cannot parse cluster size"); > + return -1; > + } > + } > + else if ((p = strstr (lines[i], volume_size_pattern))) { > + if (sscanf (p + strlen(volume_size_pattern), > + "%" SCNd64, &volume_size) != 1) { > + reply_with_error("Cannot parse volume size"); > + return -1; > + } It sounds like these scans of the lines could be done using the analyze_line helper in btrfs.c (which would need to be moved as common code in guestfd.c). T...
2015 Oct 19
0
[PATCH 2/2] Include resize2fs_P into vfs_min_size.
...2fs_P (const char *device) 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), "%" SCNd64, &ret) != 1) + if (sscanf (p + strlen(pattern), "%" SCNd64, &ret) != 1) { + reply_with_error("Cannot parse min size"); + return -1; + } + if ((block_size = get_block_size (device)) == -1) return -1; - return ret; + if (verb...
2015 Oct 19
1
Re: [PATCH 2/2] Include resize2fs_P into vfs_min_size.
...; 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))) { STRPREFIX here. > - if (sscanf (p + strlen(pattern), "%" SCNd64, &ret) != 1) > + if (sscanf (p + strlen(pattern), "%" SCNd64, &ret) != 1) { Ditto (xstrtoul). > + reply_with_error("Cannot parse min size"); > + return -1; > + } > + if ((block_size = get_block_size (device)) == -1) >...
2015 Oct 20
0
Re: [PATCH 1/2] New API: vfs_min_size
...with_error("Cannot parse cluster size"); >> + return -1; >> + } >> + } >> + else if ((p = strstr (lines[i], volume_size_pattern))) { >> + if (sscanf (p + strlen(volume_size_pattern), >> + "%" SCNd64, &volume_size) != 1) { >> + reply_with_error("Cannot parse volume size"); >> + return -1; >> + } > It sounds like these scans of the lines could be done using the > analyze_line helper in btrfs.c (which would need to be moved as common...
2015 Oct 16
4
[PATCH 0/2] Introduce get_min_size API to get minimum filesystem size.
Tried to make it in accordance with your comments. Maybe you can suggest a better name for API? Maxim Perevedentsev (2): New API: get_min_size Include resize2fs_P into get_min_size. daemon/Makefile.am | 1 + daemon/daemon.h | 2 ++ daemon/ext2.c | 37 ++++++++++++++++++++++++---- daemon/fs-min-size.c | 49 +++++++++++++++++++++++++++++++++++++ daemon/ntfs.c | 68
2015 Oct 16
0
[PATCH 2/2] Include resize2fs_P into get_min_size.
...2fs_P (const char *device) 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), "%" SCNd64, &ret) != 1) return -1; - return ret; + if ((block_size = get_block_size (device)) == -1) + return -1; + if (verbose) { + fprintf(stderr, "Minimum size in blocks: %" SCNd64 \ + "\nBlock count: %" SCNd32 "\n&qu...
2015 Oct 20
0
[PATCHv3 2/2] Include resize2fs_P into vfs_min_size.
...f (verbose) - fprintf (stderr, "resize2fs_P: lines[%zu] = \"%s\"\n", i, lines[i]); +#if __WORDSIZE == 64 +#define XSTRTOD64 xstrtol +#else +#define XSTRTOD64 xstrtoll +#endif - if ((p = strstr (lines[i], pattern))) { - if (sscanf (p + strlen(pattern), "%" SCNd64, &ret) != 1) + for (i = 0; lines[i] != NULL; ++i) { + if (STRPREFIX (lines[i], pattern)) { + if (XSTRTOD64 (lines[i] + strlen (pattern), + NULL, 20, &ret, NULL) != LONGINT_OK) { + reply_with_error ("Cannot parse minimum size"); + return -...
2015 Oct 14
1
[PATCH v2] 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), "%" SCNd64, &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..78de100 100644 --- a/generator/actions.ml +...
2015 Oct 16
2
[PATCH] New API: ntfsresize_info
...sscanf (p + strlen(cluster_size_pattern), + "%*[ ]:%" SCNd32, &cluster_size) != 1) + return -1; + } + else if ((p = strstr (lines[i], volume_size_pattern))) { + if (sscanf (p + strlen(volume_size_pattern), + "%" SCNd64, &volume_size) != 1) + return -1; + } + } + if (is_full) { + /* Ceil to cluster size */ + if (cluster_size == 0) { + reply_with_error("%s", "Bad cluster size"); + return -1; + } + return (volume_size + cluster_size - 1) /...
2015 Oct 16
0
[PATCH 1/2] New API: get_min_size
...sscanf (p + strlen(cluster_size_pattern), + "%*[ ]:%" SCNd32, &cluster_size) != 1) + return -1; + } + else if ((p = strstr (lines[i], volume_size_pattern))) { + if (sscanf (p + strlen(volume_size_pattern), + "%" SCNd64, &volume_size) != 1) + return -1; + } + } + if (is_full) { + /* Ceil to cluster size */ + if (cluster_size == 0) { + reply_with_error("%s", "Bad cluster size"); + return -1; + } + return (volume_size + cluster_size - 1) /...
2015 Oct 19
0
[PATCH 1/2] New API: vfs_min_size
...; SCNd32, &cluster_size) != 1) { + reply_with_error("Cannot parse cluster size"); + return -1; + } + } + else if ((p = strstr (lines[i], volume_size_pattern))) { + if (sscanf (p + strlen(volume_size_pattern), + "%" SCNd64, &volume_size) != 1) { + reply_with_error("Cannot parse volume size"); + return -1; + } + } + } + if (is_full) { + /* Ceil to cluster size */ + if (cluster_size == 0) { + reply_with_error("Bad cluster size"); + retu...
2015 Oct 20
4
[PATCHv3 0/2] Introduce vfs_min_size API to get minimum filesystem size.
Tried to make it in accordance with your comments. Difference to v1: Added reply_with_error where necessary. Changed name get_min_size -> vfs_min_size. Difference to v2: Changed name to vfs_minimum_size. Changed parsing to xstrtol + STR* macros where possible. Maxim Perevedentsev (2): New API: vfs_min_size Include resize2fs_P into vfs_min_size. daemon/Makefile.am | 1 +
2015 Oct 20
8
[PATCHv4 0/2] Introduce vfs_minimum_size API to get minimum filesystem size.
Tried to make it in accordance with your comments. Difference to v1: Added reply_with_error where necessary. Changed name get_min_size -> vfs_min_size. Difference to v2: Changed name to vfs_minimum_size. Changed parsing to xstrtol + STR* macros where possible. Difference to v3: Decapitalize error messages. Maxim Perevedentsev (2): New API: vfs_minimum_size Include resize2fs_P into