Source-Changes-HG archive

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

[src/trunk]: src/sys/dev correctly return -1 on error in dk_size



details:   https://anonhg.NetBSD.org/src/rev/376a1cab74e0
branches:  trunk
changeset: 337854:376a1cab74e0
user:      mlelstv <mlelstv%NetBSD.org@localhost>
date:      Fri May 01 12:30:28 2015 +0000

description:
correctly return -1 on error in dk_size

diffstat:

 sys/dev/dksubr.c |  6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diffs (27 lines):

diff -r 2d22a1f13120 -r 376a1cab74e0 sys/dev/dksubr.c
--- a/sys/dev/dksubr.c  Fri May 01 09:59:11 2015 +0000
+++ b/sys/dev/dksubr.c  Fri May 01 12:30:28 2015 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: dksubr.c,v 1.58 2014/12/31 19:52:05 christos Exp $ */
+/* $NetBSD: dksubr.c,v 1.59 2015/05/01 12:30:28 mlelstv Exp $ */
 
 /*-
  * Copyright (c) 1996, 1997, 1998, 1999, 2002, 2008 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: dksubr.c,v 1.58 2014/12/31 19:52:05 christos Exp $");
+__KERNEL_RCSID(0, "$NetBSD: dksubr.c,v 1.59 2015/05/01 12:30:28 mlelstv Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -275,7 +275,7 @@
                    (lp->d_secsize / DEV_BSIZE);
 
        if (!is_open && di->di_close(dev, 0, S_IFBLK, curlwp))
-               return 1;
+               return -1;
 
        return size;
 }



Home | Main Index | Thread Index | Old Index