search for: ranges_count

Displaying 5 results from an estimated 5 matches for "ranges_count".

Did you mean: rangecount
2020 May 22
0
[PATCH nbdkit] DDRESCUE: MISC FIXES
...ue.c @@ -43,6 +43,7 @@ #include <nbdkit-filter.h> #include "cleanup.h" +#include "vector.h" struct range { int64_t start; @@ -50,13 +51,14 @@ struct range { int64_t size; char status; }; +DEFINE_VECTOR_TYPE(ranges, struct range); struct mapfile { int ranges_count; - struct range *ranges; + ranges ranges; }; -static struct mapfile map = { 0, NULL }; +static struct mapfile map = { 0, empty_vector }; static int parse_mapfile (const char *filename) @@ -75,8 +77,6 @@ parse_mapfile (const char *filename) } while ((len = getline (&line, &l...
2020 May 22
3
[PATCH nbdkit] ddrescue: Miscellaneous fixes.
A few fixes and a possible enhancement to the ddrescue filter. If you think these are all OK, I will squash it into your patch and push it. Rich.
2020 May 01
1
[PATCH] WIP: ddrescue mapfile filter
...+#include <stdint.h> +#include <inttypes.h> +#include <string.h> + +#include <pthread.h> + +#include <nbdkit-filter.h> + +#include "cleanup.h" + +struct range { + int64_t start; + int64_t end; + int64_t size; + char status; +}; + +struct mapfile { + int ranges_count; + struct range *ranges; +}; + +static struct mapfile map = { 0, NULL }; + +static int +parse_mapfile (const char *filename) +{ + FILE *fp = NULL; + CLEANUP_FREE char *line = NULL; + size_t linelen = 0; + ssize_t len; + int ret = -1; + int status_seen = 0; + + fp = fopen (filename, "r&...
2020 May 22
0
[PATCH] [v3] ddrescue mapfile filter
...+#include <stdint.h> +#include <inttypes.h> +#include <string.h> + +#include <pthread.h> + +#include <nbdkit-filter.h> + +#include "cleanup.h" + +struct range { + int64_t start; + int64_t end; + int64_t size; + char status; +}; + +struct mapfile { + int ranges_count; + struct range *ranges; +}; + +static struct mapfile map = { 0, NULL }; + +static int +parse_mapfile (const char *filename) +{ + FILE *fp = NULL; + CLEANUP_FREE char *line = NULL; + size_t linelen = 0; + ssize_t len; + int ret = -1; + int status_seen = 0; + + fp = fopen (filename, "r&...
2020 May 01
4
[PATCH] [v2] WIP: ddrescue mapfile filter
...+#include <stdint.h> +#include <inttypes.h> +#include <string.h> + +#include <pthread.h> + +#include <nbdkit-filter.h> + +#include "cleanup.h" + +struct range { + int64_t start; + int64_t end; + int64_t size; + char status; +}; + +struct mapfile { + int ranges_count; + struct range *ranges; +}; + +static struct mapfile map = { 0, NULL }; + +static int +parse_mapfile (const char *filename) +{ + FILE *fp = NULL; + CLEANUP_FREE char *line = NULL; + size_t linelen = 0; + ssize_t len; + int ret = -1; + int status_seen = 0; + + fp = fopen (filename, "r&...