Displaying 2 results from an estimated 2 matches for "offset_initialized".
2020 Jul 07
0
[PATCH nbdkit] New filter: tar.
...tic const char *entry; /* File within tar (tar-entry=...) */
+
+/* Offset and size within tarball.
+ *
+ * These are calculated once in the first connection that calls
+ * tar_prepare. They are protected by the lock.
+ */
+static pthread_mutex_t lock = PTHREAD_MUTEX_INITIALIZER;
+static bool offset_initialized = false;
+static uint64_t offset, size;
+
+static int
+tar_config (nbdkit_next_config *next, void *nxdata,
+ const char *key, const char *value)
+{
+ if (strcmp (key, "tar-entry") == 0) {
+ if (entry) {
+ nbdkit_error ("only one tar-entry parameter can be given&qu...
2020 Jul 07
3
[PATCH nbdkit] tar as a filter.
For review only, this needs some clean up and more tests.
My eyes are going cross-eyed looking at the calculate_offset_of_entry
function, so time to take a break ...
Rich.