search for: full_writ

Displaying 20 results from an estimated 20 matches for "full_writ".

Did you mean: full_write
2010 Nov 26
2
Hivex licensing question
On Fri, Nov 26, 2010 at 10:03:05AM -0800, Yandell, Henri wrote: > We?re looking into using Hivex and came across something odd. While > the license of hivex.c is LGPL 2.1, it appears to require the GPL > 3.0 licensed gnulib package for a few minor functions ( full_read, > full_write and c_toupper ). There are also a few GPL 3.0 build > files. It has always been our intention to allow hivex to be used from both proprietary and free software, and so the library should be LGPLv2+. The standalone programs are GPLv2+, but this should not be a problem because you wouldn't...
2017 Sep 12
2
Re: [PATCH v2 2/5] lib: qemu: Factor out common code for reading and writing cache files.
On Tuesday, 12 September 2017 14:29:13 CEST Richard W.M. Jones wrote: > +/** > + * Generic functions for reading and writing the cache files, used > + * where we are just reading and writing plain text strings. > + */ > +static int > +generic_read_cache (guestfs_h *g, const char *filename, char **strp) > +{ > + if (access (filename, R_OK) == -1 && errno == ENOENT)
2017 Sep 12
0
Re: [PATCH v2 2/5] lib: qemu: Factor out common code for reading and writing cache files.
...would make more sense > to use open/write directly (since we have a buffer already, it will be > faster than using sprintf); there are snippets that call write() in a > loop until the whole buffer is written in different parts of the > library, so factorizing them could help. OK (using full_write). Rich. -- Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones Read my programming and virtualization blog: http://rwmj.wordpress.com virt-top is 'top' for virtual machines. Tiny program with many powerful monitoring features, net stats, disk stats, logging, e...
2010 Apr 03
1
hivex: Exported foreign symbols in libhivex.so.0.0.0
...digit at Base 1.2.1 c_isgraph at Base 1.2.1 c_islower at Base 1.2.1 c_isprint at Base 1.2.1 c_ispunct at Base 1.2.1 c_isspace at Base 1.2.1 c_isupper at Base 1.2.1 c_isxdigit at Base 1.2.1 c_tolower at Base 1.2.1 c_toupper at Base 1.2.1 exit_failure at Base 1.2.1 full_read at Base 1.2.1 full_write at Base 1.2.1 printf_fetchargs at Base 1.2.1 printf_parse at Base 1.2.1 program_name at Base 1.2.1 safe_read at Base 1.2.1 safe_write at Base 1.2.1 set_program_name at Base 1.2.1 vasnprintf at Base 1.2.1 xstrtol at Base 1.2.1 xstrtol_fatal at Base 1.2.1 xstrtoll at Base 1.2.1 xstrtoul a...
2013 Oct 24
0
patch for combining detect-renamed and fileflags patches (fwd)
...char **cmd); - int set_modtime(const char *fname, time_t modtime, uint32 mod_nsec, mode_t mode); + int set_modtime(const char *fname, time_t modtime, uint32 mod_nsec, mode_t mode, uint32 fileflags); -int make_path(char *fname, int flags); +int make_path(char *fname, mode_t mode, int flags); int full_write(int desc, const char *ptr, size_t len); int copy_file(const char *source, const char *dest, int ofd, mode_t mode); int robust_unlink(const char *fname); -@@ -373,6 +374,8 @@ char *sanitize_path(char *dest, const ch +@@ -376,6 +377,8 @@ int flags); int change_dir(const char *dir, int...
2020 Jun 01
1
[PATCH] erlang: Port to libei for Erlang 23
...= erl_term_len (term); - - buf = malloc (size); - if (buf == NULL) - error (EXIT_FAILURE, errno, "malloc"); - - erl_encode (term, buf); sbuf[0] = (size >> 24) & 0xff; sbuf[1] = (size >> 16) & 0xff; @@ -151,171 +132,228 @@ write_reply (ETERM *term) if (full_write (1, sbuf, 4) != 4) error (EXIT_FAILURE, errno, "write message size"); - if (full_write (1, buf, size) != size) + if (full_write (1, buff->buff, size) != size) error (EXIT_FAILURE, errno, "write message content"); - - free (buf); } /* Note that all publishe...
2011 Sep 03
1
Patch to build hivex lib on Windows
Hi I'm just posting this here in case someone is interested in building hivex on Windows (mingw32). The attached patch allows building the lib but not the tools (hivexsh etc..) as there are some more problems to solve. In short terms, this patch replaces file i/o functions and mmap(), munmap() with their win32api pendants. cu -- Unix _IS_ user friendly - it's just selective about
2008 Mar 04
1
Several changes missing from [HEAD] fileflags.diff
...N void overflow_exit(const char *str); > -int set_modtime(const char *fname, time_t modtime, mode_t mode); > +int set_modtime(const char *fname, time_t modtime, mode_t mode, > uint32 fileflags); > int mkdir_defmode(char *fname); > int create_directory_path(char *fname); > int full_write(int desc, const char *ptr, size_t len); > diff -up a/rsync.1 b/rsync.1 > --- a/rsync.1 > +++ b/rsync.1 > @@ -413,6 +413,7 @@ to the detailed description below for a > \-K, \-\-keep\-dirlinks treat symlinked dir on receiver as > dir > \-H, \-\-hard\-links...
2003 Sep 05
1
new option suggestion '--backup-only'
...\n", - dest,strerror(errno)); - close(ifd); + int saveerrno = errno; + if (verbose > 2) + rprintf(FERROR,"open %s: %s\n", + dest,strerror(errno)); + close(ifd); + errno = saveerrno; return -1; } while ((len = safe_read(ifd, buf, sizeof(buf))) > 0) { if (full_write(ofd, buf, len) < 0) { + int saveerrno = errno; rprintf(FERROR,"write %s: %s\n", dest,strerror(errno)); close(ifd); close(ofd); + errno = saveerrno; return -1; } } ===================== end of the patch =============================
2011 Jun 04
3
[PATCH 1/3] febootstrap/helper/init: make sure /proc is mounted into chroot.
--- helper/init.c | 4 +++- 1 files changed, 3 insertions(+), 1 deletions(-) diff --git a/helper/init.c b/helper/init.c index 0ca3135..2b5dacf 100644 --- a/helper/init.c +++ b/helper/init.c @@ -163,8 +163,10 @@ main () chdir ("/"); - /* Run /init from ext2 filesystem. */ + mount_proc (); print_uptime (); + + /* Run /init from ext2 filesystem. */ execl
2006 Jan 24
1
propagate atimes with rsync-2.6.6 (fwd)
...0 +0100 @@ -266,7 +266,7 @@ void print_child_argv(char **cmd); void out_of_memory(char *str); void overflow_exit(char *str); -int set_modtime(char *fname, time_t modtime); +int set_modtime(char *fname, time_t modtime, time_t acctime); int create_directory_path(char *fname, int base_umask); int full_write(int desc, char *ptr, size_t len); int copy_file(char *source, char *dest, mode_t mode); diff -uNr rsync-2.6.6/rsync.1 rsync-2.6.6_patch/rsync.1 --- rsync-2.6.6/rsync.1 2005-07-28 21:31:08.000000000 +0200 +++ rsync-2.6.6_patch/rsync.1 2006-01-11 15:56:09.000000000 +0100 @@ -374,6 +374,7 @@ -g, -...
2010 Mar 11
2
[PATCH FOR DISCUSSION ONLY] Rewrite libguestfs-supermin-helper in C.
...tic int +isdir (const char *path) +{ + struct stat statbuf; + + if (stat (path, &statbuf) == -1) + return 0; + + return S_ISDIR (statbuf.st_mode); +} + +/* Copy contents of buffer to out_fd and keep out_offset correct. */ +static void +copy_to_fd (const void *buffer, size_t len) +{ + if (full_write (out_fd, buffer, len) != len) { + perror ("libguestfs-supermin-helper: write"); + exit (EXIT_FAILURE); + } + out_offset += len; +} + +/* Copy contents of file to out_fd. */ +static void +copy_file_to_fd (const char *filename) +{ + char buffer[BUFFER_SIZE]; + int fd2; + ssize_t...
2017 Mar 03
5
[PATCH WIP 0/5] Fix virt-rescue.
This set of patches fixes virt-rescue rather cleanly. In particular the problems with handling ^C are completely fixed. Work still to be done before this can go upstream: - Shutdown doesn't work properly if you exit the shell. At the moment to exit you must do 'reboot -f'. Future improvements: - An escape sequence and escape commands that could be handled by virt-rescue,
2017 Mar 03
5
[PATCH 0/5] Fix virt-rescue.
This fixes the main issues in virt-rescue and is usable. There are some enhancements which could be made (in follow up work): - An escape sequence and escape commands that could be handled by virt-rescue, eg. to shut down the appliance, mount or unmount filesystems. - `virt-rescue -i' could be implemented cleanly by performing the right API calls before handing control to the
2017 Sep 12
8
[PATCH v3 0/6] launch: direct: Disable qemu locking when opening drives readonly.
v2 -> v3: - I addressed everything that Pino mentioned last time. - It's tricky to get a stable run when multiple copies of qemu are involved, because the same cache files get overwritten by parallel libguestfs. So I changed the names of the cache files to include the qemu binary key (size, mtime), which removes this conflict. This is in new patch 4/6. Rich.
2017 Mar 03
6
[PATCH v2 0/6] Fix virt-rescue.
This supersedes the two previous patch series: https://www.redhat.com/archives/libguestfs/2017-March/msg00017.html https://www.redhat.com/archives/libguestfs/2017-March/msg00046.html Rich.
2017 Mar 04
7
[PATCH v3] Fix virt-rescue.
Version 3: - Tidies up the code further. - Implements correct handling of SIGTSTP and SIGCONT. - Adds: ^] s - sync filesystems - Adds: ^] z - suspend virt-rescue Rich.
2013 Jul 25
19
[PATCH hivex 00/19] Fix read/write handling of li-records.
This is, hopefully, a full fix for handling of li-records. See: https://bugzilla.redhat.com/show_bug.cgi?id=717583 https://bugzilla.redhat.com/show_bug.cgi?id=987463 Rich.
2014 Feb 25
2
[PATCH supermin v4] Supermin 5 rewrite.
...c void cpio_append_stat (const char *filename, const struct stat *); -static void cpio_append (const char *filename); -static void cpio_append_trailer (void); - -/* Copy contents of buffer to out_fd and keep out_offset correct. */ -static void -write_to_fd (const void *buffer, size_t len) -{ - if (full_write (out_fd, buffer, len) != len) - error (EXIT_FAILURE, errno, "write"); - out_offset += len; -} - -/* Copy contents of file to out_fd. */ -static void -write_file_to_fd (const char *filename) -{ - char buffer[BUFFER_SIZE]; - int fd2; - ssize_t r; - - if (verbose >= 2) - fprin...
2015 Feb 14
2
[PATCH 0/2] Change guestfs__*
libguestfs has used double and triple underscores in identifiers. These aren't valid for global names in C++. (http://stackoverflow.com/a/228797) These large but completely mechanical patches change the illegal identifiers to legal ones. Rich.