Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/rump/net/lib/libvirtif Fix a few minor issues found by p...



details:   https://anonhg.NetBSD.org/src/rev/b295fb47d560
branches:  trunk
changeset: 785435:b295fb47d560
user:      pooka <pooka%NetBSD.org@localhost>
date:      Wed Mar 13 21:17:32 2013 +0000

description:
Fix a few minor issues found by proofreading the diff one last time.

diffstat:

 sys/rump/net/lib/libvirtif/rumpcomp_user.c |  8 +++++---
 sys/rump/net/lib/libvirtif/rumpcomp_user.h |  4 ++--
 2 files changed, 7 insertions(+), 5 deletions(-)

diffs (45 lines):

diff -r 1f40b61c1819 -r b295fb47d560 sys/rump/net/lib/libvirtif/rumpcomp_user.c
--- a/sys/rump/net/lib/libvirtif/rumpcomp_user.c        Wed Mar 13 21:13:45 2013 +0000
+++ b/sys/rump/net/lib/libvirtif/rumpcomp_user.c        Wed Mar 13 21:17:32 2013 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: rumpcomp_user.c,v 1.1 2013/03/13 21:13:45 pooka Exp $  */
+/*     $NetBSD: rumpcomp_user.c,v 1.2 2013/03/13 21:17:32 pooka Exp $  */
 
 /*
  * Copyright (c) 2013 Antti Kantee.  All Rights Reserved.
@@ -127,7 +127,7 @@
 
 /* how often to check for interface going south */
 #define POLLTIMO_MS 10
-size_t
+ssize_t
 rumpcomp_virtif_recv(struct virtif_user *viu, void *data, size_t dlen)
 {
        void *cookie = rumpuser_component_unschedule();
@@ -145,8 +145,10 @@
                rv = poll(&pfd, 1, POLLTIMO_MS);
                if (rv == 0)
                        continue;
-               if (rv == -1)
+               if (rv == -1) {
+                       nn = -1;
                        break;
+               }
 
                nn = read(viu->viu_fd, data, dlen);
                if (nn == -1 && errno == EAGAIN)
diff -r 1f40b61c1819 -r b295fb47d560 sys/rump/net/lib/libvirtif/rumpcomp_user.h
--- a/sys/rump/net/lib/libvirtif/rumpcomp_user.h        Wed Mar 13 21:13:45 2013 +0000
+++ b/sys/rump/net/lib/libvirtif/rumpcomp_user.h        Wed Mar 13 21:17:32 2013 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: rumpcomp_user.h,v 1.1 2013/03/13 21:13:45 pooka Exp $  */
+/*     $NetBSD: rumpcomp_user.h,v 1.2 2013/03/13 21:17:32 pooka Exp $  */
 
 /*
  * Copyright (c) 2013 Antti Kantee.  All Rights Reserved.
@@ -32,4 +32,4 @@
 void rumpcomp_virtif_destroy(struct virtif_user *);
 
 void   rumpcomp_virtif_send(struct virtif_user *, struct iovec *, size_t);
-ssize_t        rumpcomp_virtif_recv(struct virtif_user *, void *data, size_t);
+ssize_t        rumpcomp_virtif_recv(struct virtif_user *, void *, size_t);



Home | Main Index | Thread Index | Old Index