search for: tar_config_complete

Displaying 12 results from an estimated 12 matches for "tar_config_complete".

2020 Aug 27
0
[nbdkit PATCH 1/2] filters: Add .export_description wrappers
...ops, void *nxdata, @@ -395,22 +410,23 @@ tar_cache (struct nbdkit_next_ops *next_ops, void *nxdata, } static struct nbdkit_filter filter = { - .name = "tar", - .longname = "nbdkit tar filter", - .config = tar_config, - .config_complete = tar_config_complete, - .config_help = tar_config_help, - .thread_model = tar_thread_model, - .open = tar_open, - .close = tar_close, - .prepare = tar_prepare, - .get_size = tar_get_size, - .pread = tar_pread, - .pwrite = tar_pwrite,...
2023 Jun 13
3
[PATCH nbdkit 0/3] tar: Implement tar-limit
This patch series cleans up some issues with nbdkit-tar-filter and (in patch 3) implements a new tar-limit feature which limits how much of the tar file we will read to find the entry within the tar file that we will serve. This protects against the case where a tar file is presented that contains much content at the front that we must iterate over (and download) before we get to the entry we are
2020 Jul 06
2
Re: [PATCH nbdkit 2/2] tar: Rewrite the tar plugin (again), this time in C.
...@ -1,5 +1,5 @@ > # nbdkit > -# Copyright (C) 2013-2020 Red Hat Inc. > +# Copyright (C) 2018-2020 Red Hat Inc. Interesting change in dates. > +++ b/plugins/tar/tar.c > @@ -0,0 +1,286 @@ > +/* nbdkit > + * Copyright (C) 2018-2020 Red Hat Inc. > + * > +static int > +tar_config_complete (void) > +{ > + if (tarfile == NULL || file == NULL) { > + nbdkit_error ("you must supply the tar=<TARFILE> and file=<FILENAME> " > + "parameters"); > + return -1; > + } > + > + return 0; > +} > + > +#define...
2020 Sep 01
1
Re: [nbdkit PATCH 1/2] filters: Add .export_description wrappers
...23 @@ tar_cache (struct nbdkit_next_ops *next_ops, void *nxdata, > } > > static struct nbdkit_filter filter = { > - .name = "tar", > - .longname = "nbdkit tar filter", > - .config = tar_config, > - .config_complete = tar_config_complete, > - .config_help = tar_config_help, > - .thread_model = tar_thread_model, > - .open = tar_open, > - .close = tar_close, > - .prepare = tar_prepare, > - .get_size = tar_get_size, > - .pread = tar_pread, &...
2020 Aug 27
4
[nbdkit PATCH 0/2] ext2 export list tweaks
Applies on top of my pending series for the exportname filter, addressing one of the todo's in that cover letter. Eric Blake (2): filters: Add .export_description wrappers ext2: Supply .list_exports and .default_export filters/ext2/nbdkit-ext2-filter.pod | 3 +- tests/Makefile.am | 16 +++- filters/ext2/ext2.c | 125 +++++++++++++++++++---------
2020 Jun 28
5
[PATCH nbdkit 0/2] tar: Rewrite the tar plugin (again), this time in C.
For context see these threads: https://lists.gnu.org/archive/html/qemu-discuss/2020-06/threads.html#00053 https://lists.gnu.org/archive/html/qemu-block/2020-06/threads.html#01496 Rich.
2020 Jul 06
0
Re: [PATCH nbdkit 2/2] tar: Rewrite the tar plugin (again), this time in C.
...13-2020 Red Hat Inc. > >+# Copyright (C) 2018-2020 Red Hat Inc. > > Interesting change in dates. I think that was a copy/paste error effectively. I copied the Makefile from an existing C plugin, rather than attempting to rewrite the old Perl-based one. > >+static int > >+tar_config_complete (void) > >+{ > >+ if (tarfile == NULL || file == NULL) { > >+ nbdkit_error ("you must supply the tar=<TARFILE> and file=<FILENAME> " > >+ "parameters"); > >+ return -1; > >+ } > >+ > >+ return...
2020 Jun 28
0
[PATCH nbdkit 2/2] tar: Rewrite the tar plugin (again), this time in C.
...y, "file") == 0) { + if (file) { + nbdkit_error ("only one file parameter can be given"); + return -1; + } + file = value; + } + else { + nbdkit_error ("unknown parameter '%s'", key); + return -1; + } + + return 0; +} + +static int +tar_config_complete (void) +{ + if (tarfile == NULL || file == NULL) { + nbdkit_error ("you must supply the tar=<TARFILE> and file=<FILENAME> " + "parameters"); + return -1; + } + + return 0; +} + +#define tar_config_help \ + "[tar=]<TARBALL> (r...
2020 Jul 07
0
[PATCH nbdkit] New filter: tar.
...har *key, const char *value) +{ + if (strcmp (key, "tar-entry") == 0) { + if (entry) { + nbdkit_error ("only one tar-entry parameter can be given"); + return -1; + } + entry = value; + return 0; + } + + return next (nxdata, key, value); +} + +static int +tar_config_complete (nbdkit_next_config_complete *next, void *nxdata) +{ + if (entry == NULL) { + nbdkit_error ("you must supply the tar-entry=<FILENAME> parameter"); + return -1; + } + + return next (nxdata); +} + +#define tar_config_help \ + "tar-entry=<FILENAME> (required) The p...
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.
2020 Jun 28
2
Re: [PATCH nbdkit 2/2] tar: Rewrite the tar plugin (again), this time in C.
...atic struct nbdkit_plugin plugin = { > + .name = "tar", > + .longname = "nbdkit tar plugin", > + .version = PACKAGE_VERSION, > + .unload = tar_unload, > + .config = tar_config, > + .config_complete = tar_config_complete, > + .config_help = tar_config_help, > + .magic_config_key = "tar", > + .get_ready = tar_get_ready, > + .open = tar_open, > + .get_size = tar_get_size, > + .can_multi_conn = tar_can_multi_conn, > + .can_cache = ta...
2020 Sep 21
18
[nbdkit PATCH v3 00/14] exportname filter
It's been several weeks since I posted v2 (I got distracted by improving libnbd to better test things, which in turn surfaced some major memory leak problems in nbdsh that are now fixed). Many of the patches are minor rebases from v2, with the biggest changes being fallout from: - patch 2: rename nbdkit_add_default_export to nbdkit_use_default_export - overall: this missed 1.22, so update