Source-Changes-HG archive

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

[src/trunk]: src/sys/arch/xen/xen Fix problem where xbdi->xbdi_size was set t...



details:   https://anonhg.NetBSD.org/src/rev/7f42959d4cae
branches:  trunk
changeset: 750863:7f42959d4cae
user:      haad <haad%NetBSD.org@localhost>
date:      Sun Jan 17 12:08:29 2010 +0000

description:
Fix problem where xbdi->xbdi_size was set to 0 after succesfull DIOCGWEDGEINFO
call. Problem reported in private mail.

diffstat:

 sys/arch/xen/xen/xbdback_xenbus.c |  10 +++++-----
 1 files changed, 5 insertions(+), 5 deletions(-)

diffs (31 lines):

diff -r 5e80bc33594e -r 7f42959d4cae sys/arch/xen/xen/xbdback_xenbus.c
--- a/sys/arch/xen/xen/xbdback_xenbus.c Sun Jan 17 11:57:29 2010 +0000
+++ b/sys/arch/xen/xen/xbdback_xenbus.c Sun Jan 17 12:08:29 2010 +0000
@@ -1,4 +1,4 @@
-/*      $NetBSD: xbdback_xenbus.c,v 1.29 2009/12/15 00:19:52 haad Exp $      */
+/*      $NetBSD: xbdback_xenbus.c,v 1.30 2010/01/17 12:08:29 haad Exp $      */
 
 /*
  * Copyright (c) 2006 Manuel Bouyer.
@@ -26,7 +26,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: xbdback_xenbus.c,v 1.29 2009/12/15 00:19:52 haad Exp $");
+__KERNEL_RCSID(0, "$NetBSD: xbdback_xenbus.c,v 1.30 2010/01/17 12:08:29 haad Exp $");
 
 #include <sys/types.h>
 #include <sys/param.h>
@@ -731,9 +731,9 @@
                    "for domain %d\n", wi.dkw_devname, xbdi->xbdi_size,
                    xbdi->xbdi_domid);
        }
-       /* ENOTTY should be returned only when device doesn't implement
-          DIOCGWEDGEINFO and we are working with non wedge like device. */
-       if (err != ENOTTY) {
+       if ((err != 0) && (err != ENOTTY)) {
+               /* ENOTTY should be returned only when device doesn't implement
+                  DIOCGWEDGEINFO and we are working with non wedge like device. */
                printf("xbdback %s: can't DIOCGWEDGEINFO device "
                    "0x%"PRIx64": %d\n", xbusd->xbusd_path,
                    xbdi->xbdi_dev, err);               



Home | Main Index | Thread Index | Old Index