Displaying 20 results from an estimated 27 matches for "xread".
Did you mean:
read
2016 May 20
1
[PATCH] protocol: Ignore rest of option when replying with error
...ons.c
index 0c93f35..840e315 100644
--- a/src/connections.c
+++ b/src/connections.c
@@ -334,6 +334,10 @@ _negotiate_handshake_newstyle_options (struct connection *conn)
if (send_newstyle_option_reply (conn, option, NBD_REP_ERR_INVALID)
== -1)
return -1;
+ if (xread (conn->sockin, data, optlen) == -1) {
+ nbdkit_error ("read: %m");
+ return -1;
+ }
continue;
}
@@ -351,6 +355,10 @@ _negotiate_handshake_newstyle_options (struct connection *conn)
/* Unknown option. */
if (send_newstyle_option_re...
2002 Feb 01
0
comment.char in read.fwf (PR#1297)
...test.dat", widths=c(3,3,3), sep="\t", comment.char="")
V1 V2 V3
1 123 ABC 123
2 123 NA NA
3 123 XYZ 123
Replacing this assignment in read.fwf:
raw <- scan(file, what = "", sep = "\n", quote = "", quiet = TRUE, n = n)
with this in Xread.fwf:
raw <- scan(file, what = "", sep = "\n", quote = "", quiet = TRUE,
n = n, comment.char="")
we get:
Xread.fwf("test.dat", widths=c(3,3,3), sep="\t", comment.char="")
V1 V2 V3
1 123 ABC 123
2 123 #3 123
3 123...
2002 Feb 01
0
comment.char in read.fwf (PR#1298)
...test.dat", widths=c(3,3,3), sep="\t", comment.char="")
V1 V2 V3
1 123 ABC 123
2 123 NA NA
3 123 XYZ 123
Replacing this assignment in read.fwf:
raw <- scan(file, what = "", sep = "\n", quote = "", quiet = TRUE, n = n)
with this in Xread.fwf:
raw <- scan(file, what = "", sep = "\n", quote = "", quiet = TRUE,
n = n, comment.char="")
we get:
Xread.fwf("test.dat", widths=c(3,3,3), sep="\t", comment.char="")
V1 V2 V3
1 123 ABC 123
2 123 #3 123
3 123...
2009 Aug 18
8
src/ is now warning-free, too
These patches first make src/ warning free, and then
turn on the strict warning options.
75 0001-build-suppress-an-ignored-write-return-value-warning.patch
38 0002-build-suppress-an-ignored-dup-return-value-warning.patch
27 0003-generator.ml-suppress-signed-unsigned-compare-warnin.patch
48 0004-build-don-t-perform-arithmetic-on-void-pointers.patch
30
2016 Jan 11
1
[PATCH] Add support for newstyle NBD protocol (RHBZ#1297100).
Experimental and only very lightly tested so far.
Rich.
2009 Sep 14
3
[PATCH REBASED] Remove main loop
...309,6 @@ guestfs_close (guestfs_h *g)
}
/* release mutex (XXX) */
- free (g->msg_in);
- free (g->msg_out);
free (g->last_error);
free (g->path);
free (g->qemu);
@@ -565,6 +481,7 @@ xwrite (int fd, const void *v_buf, size_t len)
return 0;
}
+#if 0
static int
xread (int fd, void *v_buf, size_t len)
{
@@ -585,6 +502,7 @@ xread (int fd, void *v_buf, size_t len)
return 0;
}
+#endif
void
guestfs_set_out_of_memory_handler (guestfs_h *g, guestfs_abort_cb cb)
@@ -848,7 +766,7 @@ guestfs__add_drive (guestfs_h *g, const char *filename)
}
}
- retu...
2009 Nov 20
1
fix new failures from latest-from-gnulib syntax-check
...tions. */
main_loop (sock);
- exit (0);
+ exit (EXIT_SUCCESS);
}
/* Read /proc/cmdline. */
diff --git a/daemon/proto.c b/daemon/proto.c
index a0d3736..284037d 100644
--- a/daemon/proto.c
+++ b/daemon/proto.c
@@ -63,7 +63,7 @@ main_loop (int _sock)
/* Read the length word. */
if (xread (sock, lenbuf, 4) == -1)
- exit (1);
+ exit (EXIT_FAILURE);
xdrmem_create (&xdr, lenbuf, 4, XDR_DECODE);
xdr_uint32_t (&xdr, &len);
@@ -72,7 +72,7 @@ main_loop (int _sock)
if (len > GUESTFS_MESSAGE_MAX) {
fprintf (stderr, "guestfsd: incoming mess...
2009 Aug 17
13
total warning-removal for daemon/
The warnings in daemon were aggravating and risky
for development (too easy to miss new ones) so I spent some
time last week and today working on removing them.
The first patch gets us down to almost no warnings with
the original -Wall setting. That was by far the hardest part.
Once I'd done that, I enabled nearly all of gcc's warnings via
gnulib's warnings and manywarnings modules
2011 Nov 11
3
[PATCH v2] Add mdadm-create, list-md-devices APIs.
This adds the mdadm-create API for creating RAID devices, and
includes various fixes for the other two patches.
Rich.
2017 Aug 03
0
[PATCH 3/6] daemon: Refine check for Device and Dev_or_Path parameters (RHBZ#1477623).
...sroot_path (const char *path);
extern char *sysroot_realpath (const char *path);
extern int is_root_device (const char *device);
+extern int is_device_parameter (const char *device);
extern int xwrite (int sock, const void *buf, size_t len)
__attribute__((__warn_unused_result__));
extern int xread (int sock, void *buf, size_t len)
diff --git a/daemon/dd.c b/daemon/dd.c
index 15f3f7a6c..0b61c87d8 100644
--- a/daemon/dd.c
+++ b/daemon/dd.c
@@ -35,7 +35,7 @@ do_dd (const char *src, const char *dest)
CLEANUP_FREE char *err = NULL;
int r;
- src_is_dev = STRPREFIX (src, "/dev/")...
2017 Jun 19
0
[PATCH v7 13/13] daemon: Link guestfsd with libutils.
...;guestfs_protocol.h"
-#include "guestfs-internal-all.h"
-
#include "cleanups.h"
+#include "guestfs-utils.h"
+
+#include "guestfs-internal-all.h"
+
#include "structs-cleanups.h"
#include "command.h"
@@ -76,6 +78,22 @@ extern int xread (int sock, void *buf, size_t len)
extern char *mountable_to_string (const mountable_t *mountable);
+/*-- in cleanups.c --*/
+
+/* These functions are used internally by the CLEANUP_* macros.
+ * Don't call them directly.
+ */
+extern void cleanup_aug_close (void *ptr);
+extern void cleanup...
2012 Mar 13
2
[PATCH 0/2] 'int' to 'size_t' changes
These two patches are probably not completely independent, but
separating them is a lot of work.
With *both* patches applied, all the tests and extra-tests pass.
That's no guarantee however that there isn't a mistake, so I don't
think this patch is a candidate for the 1.16 branch, until it's had a
lot more testing in development.
Rich.
2013 Feb 07
12
[PATCH 01/12] generator: Add new Mountable argument type
This type is initially identical to Device.
---
generator/bindtests.ml | 2 +-
generator/c.ml | 7 +++++--
generator/csharp.ml | 6 ++++--
generator/daemon.ml | 4 ++--
generator/erlang.ml | 6 +++---
generator/fish.ml | 8 ++++----
generator/gobject.ml | 11 ++++++-----
generator/haskell.ml | 11 +++++++----
generator/java.ml | 10 +++++-----
2017 Aug 03
9
[PATCH 0/6] tests: Fix handling of device API parameters (RHBZ#1477623).
https://bugzilla.redhat.com/show_bug.cgi?id=1477623
The first two patches are cleanups.
The third patch changes the way that we handle Device and Dev_or_Path
parameters so that a parameter marked as such can really only contain
a block device name (and not, for instance, a chardev). Using a
chardev here caused hangs in the API.
The next two patches fix API usage to conform to this new stricter
2014 Feb 25
2
[PATCH supermin v4] Supermin 5 rewrite.
...gned long body_len, name_len;
-static uid_t uid;
-static gid_t gid;
-static time_t mtime;
-static int dev_major, dev_minor, rdev_major, rdev_minor;
-static loff_t curr, next_header;
-#ifdef HAVE_ZLIB
-static gzFile gzfp;
-#else
-static FILE *fp;
-#endif
-static const char *input_file;
-
-static int xread (void *buffer, size_t size);
-static void parse_header (char *s);
-static int parse_next_entry (void);
-static void skip_to_next_header (void);
-static void read_file (void);
-static char *read_whole_body (void);
-static ext2_ino_t maybe_link (void);
-static void add_link (ext2_ino_t real_ino);
-st...
2013 Feb 12
7
Remaining btrfs patches
[PATCH 1/7] mount: Add mount_vfs_nochroot
This is significantly reworked from before. umount is gone as
discussed, and variable motion is minimised.
[PATCH 2/7] btrfs: Update btrfs_subvolume_list to take
Already provisionally ACKed. Previous comment was that cleanup could
be tidier. I looked into creating a new cleanup function for fs_buf,
but it isn't possible (or simple, anyway) in this
2013 Jan 24
3
[REVIEW ONLY] Mountable patches
These 3 patches implement support for APIs which must accept a mountable, but
don't update apis which must return mountables.
Matt
2017 Jun 03
12
[PATCH v2 00/12] Allow APIs to be implemented in OCaml.
Version 1 was here:
https://www.redhat.com/archives/libguestfs/2017-June/msg00003.html
This patch series reimplements a few more APIs in OCaml, including
some very important core APIs like ?list_filesystems? and ?mount?.
All the tests pass after this.
The selection of APIs that I have moved may look a little random, but
in fact they are all APIs consumed by the inspection code (and some
more
2017 Jul 24
6
[PATCH 0/2] daemon: Replace GUESTFSD_EXT_CMD with --print-external-commands.
Replace GUESTFSD_EXT_CMD with a command line option
‘./guestfsd --print-external-commands’
2017 Jun 05
19
[PATCH v3 00/19] Allow APIs to be implemented in OCaml.
v2 was here:
https://www.redhat.com/archives/libguestfs/2017-June/msg00008.html
This series gets as far as a working (and faster) reimplementation of
‘guestfs_list_filesystems’.
I also have another patch series on top of this one which reimplements
the inspection APIs inside the daemon, but that needs a bit more work
still, since inspection turns out to be a very large piece of code.
Rich.