Displaying 5 results from an estimated 5 matches for "ddrescue_pread".
2020 May 01
1
[PATCH] WIP: ddrescue mapfile filter
...ic int
+ddrescue_can_write (struct nbdkit_next_ops *next_ops, void *nxdata,
+ void *handle)
+{
+ return 0;
+}
+
+static int
+ddrescue_can_cache (struct nbdkit_next_ops *next_ops, void *nxdata,
+ void *handle)
+{
+ return 0;
+}
+
+/* Read data. */
+static int
+ddrescue_pread (struct nbdkit_next_ops *next_ops, void *nxdata,
+ void *handle, void *buf, uint32_t count, uint64_t offset,
+ uint32_t flags, int *err)
+{
+ int i;
+
+ for (i = 0; i < map.ranges_count; i++) {
+ if (map.ranges[i].status != '+')
+ continue;
+ if...
2020 May 22
0
[PATCH] [v3] ddrescue mapfile filter
...ic int
+ddrescue_can_write (struct nbdkit_next_ops *next_ops, void *nxdata,
+ void *handle)
+{
+ return 0;
+}
+
+static int
+ddrescue_can_cache (struct nbdkit_next_ops *next_ops, void *nxdata,
+ void *handle)
+{
+ return 0;
+}
+
+/* Read data. */
+static int
+ddrescue_pread (struct nbdkit_next_ops *next_ops, void *nxdata,
+ void *handle, void *buf, uint32_t count, uint64_t offset,
+ uint32_t flags, int *err)
+{
+ int i;
+
+ for (i = 0; i < map.ranges_count; i++) {
+ if (map.ranges[i].status != '+')
+ continue;
+ if...
2020 May 22
0
[PATCH nbdkit] DDRESCUE: MISC FIXES
...filename, offset, length, status);
}
}
@@ -133,9 +132,7 @@ parse_mapfile (const char *filename)
static void
ddrescue_unload (void)
{
- free (map.ranges);
- map.ranges = NULL;
- map.ranges_count = 0;
+ free (map.ranges.ptr);
}
static int
@@ -180,20 +177,21 @@ ddrescue_pread (struct nbdkit_next_ops *next_ops, void *nxdata,
void *handle, void *buf, uint32_t count, uint64_t offset,
uint32_t flags, int *err)
{
- int i;
+ size_t i;
- for (i = 0; i < map.ranges_count; i++) {
- if (map.ranges[i].status != '+')
+ for (i =...
2020 May 01
4
[PATCH] [v2] WIP: ddrescue mapfile filter
...ic int
+ddrescue_can_write (struct nbdkit_next_ops *next_ops, void *nxdata,
+ void *handle)
+{
+ return 0;
+}
+
+static int
+ddrescue_can_cache (struct nbdkit_next_ops *next_ops, void *nxdata,
+ void *handle)
+{
+ return 0;
+}
+
+/* Read data. */
+static int
+ddrescue_pread (struct nbdkit_next_ops *next_ops, void *nxdata,
+ void *handle, void *buf, uint32_t count, uint64_t offset,
+ uint32_t flags, int *err)
+{
+ int i;
+
+ for (i = 0; i < map.ranges_count; i++) {
+ if (map.ranges[i].status != '+')
+ continue;
+ if...
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.