search for: scanned_ok

Displaying 7 results from an estimated 7 matches for "scanned_ok".

2020 Jul 06
2
Re: [PATCH nbdkit 2/2] tar: Rewrite the tar plugin (again), this time in C.
...to server." Should '(required)' be listed on both lines? (Not necessarily on the second, if we go with the exportname=on option) > + > +static int > +tar_get_ready (void) > +{ > + FILE *fp; > + CLEANUP_FREE char *cmd = NULL; > + size_t len = 0; > + bool scanned_ok; > + char s[256]; > + > + /* Construct the tar command to examine the tar file. */ > + fp = open_memstream (&cmd, &len); > + if (fp == NULL) { > + nbdkit_error ("open_memstream: %m"); > + return -1; > + } > + fprintf (fp, "LANG=C tar --n...
2020 Jul 06
0
Re: [PATCH nbdkit 2/2] tar: Rewrite the tar plugin (again), this time in C.
...if we go with the exportname=on option) Yes, that's a bug (until exportname is implemented) - will fix soon. > >+ > >+static int > >+tar_get_ready (void) > >+{ > >+ FILE *fp; > >+ CLEANUP_FREE char *cmd = NULL; > >+ size_t len = 0; > >+ bool scanned_ok; > >+ char s[256]; > >+ > >+ /* Construct the tar command to examine the tar file. */ > >+ fp = open_memstream (&cmd, &len); > >+ if (fp == NULL) { > >+ nbdkit_error ("open_memstream: %m"); > >+ return -1; > >+ } > >...
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 Jun 28
2
Re: [PATCH nbdkit 2/2] tar: Rewrite the tar plugin (again), this time in C.
On Sun, Jun 28, 2020 at 4:03 PM Richard W.M. Jones <rjones@redhat.com> wrote: ... > + > +static int > +tar_get_ready (void) > +{ > + FILE *fp; > + CLEANUP_FREE char *cmd = NULL; > + size_t len = 0; > + bool scanned_ok; > + char s[256]; > + > + /* Construct the tar command to examine the tar file. */ > + fp = open_memstream (&cmd, &len); > + if (fp == NULL) { > + nbdkit_error ("open_memstream: %m"); > + return -1; > + } > + fprintf (fp, "LANG=C tar --n...
2020 Jun 28
0
[PATCH nbdkit 2/2] tar: Rewrite the tar plugin (again), this time in C.
...onfig_help \ + "[tar=]<TARBALL> (required) The name of the tar file.\n" \ + "file=<FILENAME> The path inside the tar file to server." + +static int +tar_get_ready (void) +{ + FILE *fp; + CLEANUP_FREE char *cmd = NULL; + size_t len = 0; + bool scanned_ok; + char s[256]; + + /* Construct the tar command to examine the tar file. */ + fp = open_memstream (&cmd, &len); + if (fp == NULL) { + nbdkit_error ("open_memstream: %m"); + return -1; + } + fprintf (fp, "LANG=C tar --no-auto-compress -tRvf "); + shell_quote...
2020 Jul 07
0
[PATCH nbdkit] New filter: tar.
...ulate_offset_of_entry (struct nbdkit_next_ops *next_ops, void *nxdata) +{ + const size_t bufsize = 65536; + char output[] = "/tmp/tarXXXXXX"; + int fd; + FILE *fp; + CLEANUP_FREE char *cmd = NULL; + size_t cmdlen = 0; + CLEANUP_FREE char *buf = NULL; + int64_t i, copysize; + bool scanned_ok = false; + + assert (entry); + + /* Temporary file to capture the output from the tar command. */ + fd = mkstemp (output); + if (fd == -1) { + nbdkit_error ("mkstemp: %m"); + return -1; + } + close (fd); + + /* Construct the tar command to examine the tar file. */ + fp = ope...
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.