search for: cpio_header_len

Displaying 4 results from an estimated 4 matches for "cpio_header_len".

2010 Mar 11
2
[PATCH FOR DISCUSSION ONLY] Rewrite libguestfs-supermin-helper in C.
...+{ + struct stat statbuf; + + if (lstat (filename, &statbuf) == -1) { + perror ("lstat"); + exit (EXIT_FAILURE); + } + cpio_append_stat (filename, &statbuf); +} + +/* Append the file to the cpio output. */ +#define PADDING(len) ((((len) + 3) & ~3) - (len)) + +#define CPIO_HEADER_LEN (6 + 13*8) + +static void +cpio_append_stat (const char *filename, struct stat *statbuf) +{ + const char *orig_filename = filename; + + if (*filename == '/') + filename++; + if (*filename == '\0') + filename = "."; + + if (verbose >= 2) + fprintf (stderr, &...
2015 Jul 01
2
Bug#785187: [PATCH] xen: earlycpio: Pull in latest linux earlycpio.[ch]
...pass the absolute path of the filename in the cpio and make sure + * the match returned an empty filename string. */ struct cpio_data __init find_cpio_data(const char *path, void *data, - size_t len, long *offset) + size_t len, long *nextoff) { const size_t cpio_header_len = 8*C_NFIELDS - 2; - struct cpio_data cd = { NULL, 0 }; + struct cpio_data cd = { NULL, 0, "" }; const char *p, *dptr, *nptr; unsigned int ch[C_NFIELDS], *chp, v; unsigned char c, x; @@ -129,17 +130,17 @@ struct cpio_data __init find_cpio_data(const char *path, void *data, if ((c...
2015 May 19
3
Bug#785187: Bug#785187: xen-hypervisor-4.5-amd64: Option ucode=scan is not working
On Tue, 2015-05-19 at 13:31 +0200, Stephan Seitz wrote: > On Fri, May 15, 2015 at 08:26:42AM +0100, Ian Campbell wrote: > >Here's an idea. First extract the real initrd from the back half of the > >initrd: > > ijc at dagon:tmp$ cat /boot/initrd.img | ( cpio -t >&2 ; cat ) > initrd.real > > kernel > > kernel/x86 > >
2014 Feb 25
2
[PATCH supermin v4] Supermin 5 rewrite.
...{ - struct stat statbuf; - - if (lstat (filename, &statbuf) == -1) - error (EXIT_FAILURE, errno, "lstat: %s", filename); - cpio_append_stat (filename, &statbuf); -} - -/* Append the file to the cpio output. */ -#define PADDING(len) ((((len) + 3) & ~3) - (len)) - -#define CPIO_HEADER_LEN (6 + 13*8) - -static void -cpio_append_stat (const char *filename, const struct stat *statbuf) -{ - const char *orig_filename = filename; - - if (*filename == '/') - filename++; - if (*filename == '\0') - filename = "."; - - if (verbose >= 2) - fprintf (std...