search for: gzdopen

Displaying 13 results from an estimated 13 matches for "gzdopen".

2007 Apr 18
2
[Patch]: Drive/Partition and extensible filesystem support for syslinux
...amp;dfd); fd = fs->ops.open(fs, "MYFILE CFG", O_RDONLY); // This will give you a open descriptor // Now on, you can read files just like any other *nix file...! :) read(fd, mybuf, 128); // read 128 bytes from file.. OR you can use zlib funtionality of syslinux with: gzFile gzf = gzdopen(fd, "r"); gzread(gzf, mybuffer, 128); etc... //After you are done, you can close the descriptor with close(fd); // FS can be closed with libfat_close(fs); One thing which is missing is the way you specify file names for open. It is the short name format of DOS. Would appreciate if so...
2005 Feb 19
0
[PATCH] check read/write return values
...(fd, &_sz, 4) != 4 ) + return 0; sz = _sz; } lseek(fd, 0, SEEK_SET); @@ -304,6 +306,12 @@ *size = xc_get_filesz(kernel_fd); + if ( *size == 0 ) + { + PERROR("Could not read kernel image"); + goto out; + } + if ( (kernel_gfd = gzdopen(kernel_fd, "rb")) == NULL ) { PERROR("Could not allocate decompression state for state file"); --- xen-unstable/tools/xentrace/xentrace.c.warn 2005-02-19 12:31:19.994379665 -0500 +++ xen-unstable/tools/xentrace/xentrace.c 2005-02-19 12:37:11.425091593 -0500 @@ -7...
2002 Jan 30
1
Patch: update zlib/* to 1.1.3
...in contrib/delphi (Bob Dellaca) +- add support for C++Builder 3 and Delphi 3 in contrib/delphi2 (Davide Moretti) +- do not exit prematurely in untgz if 0 at start of block (Magnus Holmgren) +- use macro EXTERN instead of extern to support DLL for BeOS (Sander Stoks) +- added a FAQ file + +- Support gzdopen on Mac with Metrowerks (Jason Linhart) +- Do not redefine Byte on Mac (Brad Pettit & Jason Linhart) +- define SEEK_END too if SEEK_SET is not defined (Albert Chin-A-Young) +- avoid some warnings with Borland C (Tom Tanner) +- fix a problem in contrib/minizip/zip.c for 16-bit MSDOS (Gilles Volla...
2007 May 04
1
[PATCH 1/3] Documentation and example updates
...NET_PEERNUM 1 #define BRIDGE_PFX "bridge:" +#ifndef SIOCBRADDIF +#define SIOCBRADDIF 0x89a2 /* add interface to bridge */ +#endif static bool verbose; #define verbose(args...) \ @@ -166,8 +169,6 @@ static unsigned long unpack_bzimage(int void *img = (void *)0x100000; f = gzdopen(fd, "rb"); - if (gzdirect(f)) - errx(1, "did not find correct gzip header"); while ((ret = gzread(f, img + len, 65536)) > 0) len += ret; if (ret < 0) @@ -820,6 +821,7 @@ static void setup_tun_net(const char *ar strcpy(ifr.ifr_name, "tap%d"); if (ioctl...
2007 May 04
1
[PATCH 1/3] Documentation and example updates
...NET_PEERNUM 1 #define BRIDGE_PFX "bridge:" +#ifndef SIOCBRADDIF +#define SIOCBRADDIF 0x89a2 /* add interface to bridge */ +#endif static bool verbose; #define verbose(args...) \ @@ -166,8 +169,6 @@ static unsigned long unpack_bzimage(int void *img = (void *)0x100000; f = gzdopen(fd, "rb"); - if (gzdirect(f)) - errx(1, "did not find correct gzip header"); while ((ret = gzread(f, img + len, 65536)) > 0) len += ret; if (ret < 0) @@ -820,6 +821,7 @@ static void setup_tun_net(const char *ar strcpy(ifr.ifr_name, "tap%d"); if (ioctl...
2020 Apr 03
4
Segfault after compiling wget with dfsan
...:SSL*=uninstrumented fun:ssl*=uninstrumented fun:RAND*=uninstrumented fun:DES*=uninstrumented fun:ERR*=uninstrumented fun:MD5*=uninstrumented fun:MD4*=uninstrumented fun:*X509*=uninstrumented fun:OPENSSL*=uninstrumented fun:CRYPTO*=uninstrumented fun:TLS*=uninstrumented fun:BIO_*=uninstrumented fun:gzdopen=uninstrumented fun:gzclose=uninstrumented fun:gzwrite=uninstrumented fun:a2i_IPADDRESS=uninstrumented fun:ENGINE_load_builtin_engines=uninstrumented fun:inflateInit2_=uninstrumented fun:inflate=uninstrumented fun:inflateEnd=uninstrumented fun:inflateInit2_=uninstrumented fun:ASN1_*=uninstrumented f...
2005 Jun 15
6
Compressed maildir
Greetings, I noticed a while back someone posted a patch/plugin that allowed Dovecot to use compressed mbox files. I'm now wondering how far that would put us from having compressed maildir? I have a server with more CPU than disk space, and while I can buy more HDD space, my backup solution doesn't make that practical. It seems to me that when looking for a message file, if it
2007 Apr 18
0
[RFC/PATCH LGUEST X86_64 07/13] lguest64 loader
...could not determine page offset"); +} + +static u32 bzimage(int fd, unsigned long mem, unsigned long *pgdir_addr, + const char *initrd, unsigned long *ird_size, + unsigned long *page_offset) +{ + gzFile f; + int ret, len = 0; + void *img = (void *)0x100000; + + map_memory(mem); + + f = gzdopen(fd, "rb"); + if (gzdirect(f)) + errx(1, "did not find correct gzip header"); + while ((ret = gzread(f, img + len, 65536)) > 0) + len += ret; + if (ret < 0) + err(1, "reading image from bzImage"); + + verbose("Unpacked size %i addr %p\n", len, img); +...
2007 Apr 18
0
[RFC/PATCH LGUEST X86_64 07/13] lguest64 loader
...could not determine page offset"); +} + +static u32 bzimage(int fd, unsigned long mem, unsigned long *pgdir_addr, + const char *initrd, unsigned long *ird_size, + unsigned long *page_offset) +{ + gzFile f; + int ret, len = 0; + void *img = (void *)0x100000; + + map_memory(mem); + + f = gzdopen(fd, "rb"); + if (gzdirect(f)) + errx(1, "did not find correct gzip header"); + while ((ret = gzread(f, img + len, 65536)) > 0) + len += ret; + if (ret < 0) + err(1, "reading image from bzImage"); + + verbose("Unpacked size %i addr %p\n", len, img); +...
2007 May 09
0
[patch 9/9] lguest: the documentation, example launcher
...amp; ++possibilities[img[i+4]] > 3) + return (unsigned long)img[i+4] << 24; + } + errx(1, "could not determine page offset"); +} + +static unsigned long unpack_bzimage(int fd, unsigned long *page_offset) +{ + gzFile f; + int ret, len = 0; + void *img = (void *)0x100000; + + f = gzdopen(fd, "rb"); + while ((ret = gzread(f, img + len, 65536)) > 0) + len += ret; + if (ret < 0) + err(1, "reading image from bzImage"); + + verbose("Unpacked size %i addr %p\n", len, img); + *page_offset = intuit_page_offset(img, len); + + return entry_point(img, img...
2007 May 09
0
[patch 9/9] lguest: the documentation, example launcher
...amp; ++possibilities[img[i+4]] > 3) + return (unsigned long)img[i+4] << 24; + } + errx(1, "could not determine page offset"); +} + +static unsigned long unpack_bzimage(int fd, unsigned long *page_offset) +{ + gzFile f; + int ret, len = 0; + void *img = (void *)0x100000; + + f = gzdopen(fd, "rb"); + while ((ret = gzread(f, img + len, 65536)) > 0) + len += ret; + if (ret < 0) + err(1, "reading image from bzImage"); + + verbose("Unpacked size %i addr %p\n", len, img); + *page_offset = intuit_page_offset(img, len); + + return entry_point(img, img...
2007 Sep 25
50
[patch 00/43] lguest: Patches for 2.6.24 (and patchbomb test)
Hi all, These are the patches I'm planning to submit for 2.6.24. Comments gratefully accepted. Along with the usual cleanups and improvements are Jes' de-i386-ification patches, and a new "virtio" mechanism designed to be shared with KVM (and hopefully other hypervisors). Cheers, Rusty. Documentation/lguest/Makefile | 30 Documentation/lguest/lguest.c
2007 Sep 25
50
[patch 00/43] lguest: Patches for 2.6.24 (and patchbomb test)
Hi all, These are the patches I'm planning to submit for 2.6.24. Comments gratefully accepted. Along with the usual cleanups and improvements are Jes' de-i386-ification patches, and a new "virtio" mechanism designed to be shared with KVM (and hopefully other hypervisors). Cheers, Rusty. Documentation/lguest/Makefile | 30 Documentation/lguest/lguest.c