search for: lzma_ret

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

2013 Mar 15
0
[PATCH 4.1] Add DomU xz kernel decompression
...eloader.c @@ -187,11 +187,10 @@ static int xc_try_bzip2_decode( #include <lzma.h> -static int xc_try_lzma_decode( - struct xc_dom_image *dom, void **blob, size_t *size) +static int _xc_try_lzma_decode( + struct xc_dom_image *dom, void **blob, size_t *size, + lzma_stream *stream, lzma_ret ret, const char *what) { - lzma_stream stream = LZMA_STREAM_INIT; - lzma_ret ret; lzma_action action = LZMA_RUN; unsigned char *out_buf; unsigned char *tmp_buf; @@ -201,14 +200,13 @@ static int xc_try_lzma_decode( if ( dom->kernel_size == 0) { - DOMPRINTF...
2016 Feb 17
0
[PATCH supermin v2 1/4] init: Uncompress modules before adding them to the mini initrd.
...acity); - int tmpsize = 8 * 1024; - char tmp[tmpsize]; - int num; - - errno = 0; - size = 0; - - if (!buf) { - perror("malloc"); - exit (EXIT_FAILURE); - } - -#ifdef HAVE_LZMA_STATIC - if (ends_with(filename, ".xz")) { - lzma_stream strm = LZMA_STREAM_INIT; - lzma_ret ret = lzma_stream_decoder(&strm, UINT64_MAX, - LZMA_CONCATENATED); - if (verbose) - fprintf (stderr, "supermin: running xz\n"); - FILE *fd = fopen (filename, "r"); - if (!fd) { - perror("popen failed"); - exit (EXIT_FAILURE); - }...
2016 Feb 17
2
[PATCH supermin 0/2] Allow an alternate libc to be used for init.
Allow an alternate libc, such as dietlibc, to be used for the init binary in the supermin appliance. Rich.
2013 Aug 19
5
[PATCH v2 0/3 supermin] URPMI & xz support.
Joseph, Please try my modified versions of these patches. These are compile-tested on Fedora and they don't break any existing functionality, but I don't have either urpmi nor a statically-linked xz so I cannot fully test them. I have also fixed detection of zlib (2/3). Rich.
2018 Nov 21
3
[PATCH nbdkit v2 0/3] Rewrite xz plugin as a filter.
v2: - Fixes a number of bugs in corner cases. - Uses a 1M block size to fetch from the underlying plugin. This improves performance considerably. I also tested this much more thoroughly and can't find any more bugs. Rich.
2018 Nov 21
5
[PATCH nbdkit 0/2] Rewrite xz plugin as a filter.
Matt asked if xz should really be a filter rather than a plugin. The answer is yes, of course it should be! That's been something in the todo file for a while. The commit converts the xz plugin code into a filter (leaving the plugin around, but deprecating it). plugin: nbdkit xz file.xz filter: nbdkit --filter=xz file file.xz plugin: # can't be done filter: nbdkit
2016 Feb 17
8
[PATCH supermin 0/2] Allow an alternate libc to be used for init.
v1 -> v2: - If we split out the init program into a separate init/ directory, that makes it much easier to build against an alternate libc. I tried to build against uClibc, but uClibc requires an entire build chain, which looked like it was going to be a massive ballache. Rich.
2015 Jul 02
0
[PATCH] Fix various -Wformat problems.
...ed on Linux. The safe way to print these is to cast them to uintmax_t and then print then using the %ju modifier (see http://stackoverflow.com/a/1401581). - Using %d to print an enum. Since enums may be either char or int, I fixed this by casting the enum to int. - strtol_error & lzma_ret are both unsigned types. --- builder/pxzcat-c.c | 24 ++++++++++++------------ cat/filesystems.c | 2 +- cat/ls.c | 5 +++-- daemon/ext2.c | 7 ++++++- daemon/file.c | 2 +- daemon/guestfsd.c | 3 ++- daemon/parted.c | 5 +++-- daemon/prot...
2015 Jul 02
0
[PATCH v2] Fix various -Wformat problems.
...ed on Linux. The safe way to print these is to cast them to uintmax_t and then print them using the %ju modifier (see http://stackoverflow.com/a/1401581). - Using %d to print an enum. Since enums may be either char or int, I fixed this by casting the enum to int. - strtol_error & lzma_ret are both unsigned types. --- builder/pxzcat-c.c | 24 ++++++++++++------------ cat/filesystems.c | 2 +- cat/ls.c | 5 +++-- daemon/ext2.c | 7 ++++++- daemon/file.c | 2 +- daemon/guestfsd.c | 3 ++- daemon/parted.c | 5 +++-- daemon/prot...
2016 Mar 06
8
[PATCH 0/5] Use less stack.
Various changes/fixes to use smaller stack frames. Rich.
2016 Mar 07
2
[PATCH v2] Use less stack.
...n void yyerror (YYLTYPE * yylloc, yyscan_t scanner, struct parse_context *context, const char *msg); diff --git a/builder/pxzcat-c.c b/builder/pxzcat-c.c index 4b49e74..1f5ceeb 100644 --- a/builder/pxzcat-c.c +++ b/builder/pxzcat-c.c @@ -250,8 +250,8 @@ parse_indexes (value filenamev, int fd) { lzma_ret r; off_t pos, index_size; - uint8_t footer[LZMA_STREAM_HEADER_SIZE]; - uint8_t header[LZMA_STREAM_HEADER_SIZE]; + CLEANUP_FREE uint8_t *footer = NULL; + CLEANUP_FREE uint8_t *header = NULL; lzma_stream_flags footer_flags; lzma_stream_flags header_flags; lzma_stream strm = LZMA_STREA...
2014 Feb 25
2
[PATCH supermin v4] Supermin 5 rewrite.
...f HAVE_ZLIB_STATIC - int capacity = 64*1024; - char *buf = (char *) malloc (capacity); - int tmpsize = 8 * 1024; - char tmp[tmpsize]; - int num; - - errno = 0; - size = 0; - -#ifdef HAVE_LZMA_STATIC - if (ends_with(filename, ".xz")) { - lzma_stream strm = LZMA_STREAM_INIT; - lzma_ret ret = lzma_stream_decoder(&strm, UINT64_MAX, - LZMA_CONCATENATED); - if (verbose) - fprintf (stderr, "supermin: running xz\n"); - FILE *fd = fopen (filename, "r"); - if (!fd) { - perror("popen failed"); - exit (EXIT_FAILURE); - }...