Source-Changes-HG archive

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

[src/trunk]: src/tests/fs/common Fix ffs_fstest_delfs's error branch for rump...



details:   https://anonhg.NetBSD.org/src/rev/61739d2652d0
branches:  trunk
changeset: 780733:61739d2652d0
user:      riastradh <riastradh%NetBSD.org@localhost>
date:      Sun Aug 05 02:03:05 2012 +0000

description:
Fix ffs_fstest_delfs's error branch for rump_pub_etfs_remove.

rump_pub_etfs_remove returns an error code, rather than setting errno
and returning -1.

diffstat:

 tests/fs/common/fstest_ffs.c |  8 +++++---
 1 files changed, 5 insertions(+), 3 deletions(-)

diffs (22 lines):

diff -r 79b636dba517 -r 61739d2652d0 tests/fs/common/fstest_ffs.c
--- a/tests/fs/common/fstest_ffs.c      Sun Aug 05 01:58:36 2012 +0000
+++ b/tests/fs/common/fstest_ffs.c      Sun Aug 05 02:03:05 2012 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: fstest_ffs.c,v 1.5 2011/06/26 13:06:00 christos Exp $  */
+/*     $NetBSD: fstest_ffs.c,v 1.6 2012/08/05 02:03:05 riastradh Exp $ */
 
 /*-
  * Copyright (c) 2010 The NetBSD Foundation, Inc.
@@ -104,8 +104,10 @@
        struct ffstestargs *args = buf;
 
        res = rump_pub_etfs_remove(args->ta_devpath);
-       if (res != 0)
-               return res;
+       if (res != 0) {
+               errno = res;
+               return -1;
+       }
 
        res = unlink(args->ta_imgpath);
        if (res != 0)



Home | Main Index | Thread Index | Old Index