Source-Changes-HG archive

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

[src/trunk]: src/tests/dev/scsipi validate that getrawpartition() didn't fail.



details:   https://anonhg.NetBSD.org/src/rev/d49bf54760c1
branches:  trunk
changeset: 763598:d49bf54760c1
user:      mlelstv <mlelstv%NetBSD.org@localhost>
date:      Sun Mar 27 08:53:56 2011 +0000

description:
validate that getrawpartition() didn't fail.

diffstat:

 tests/dev/scsipi/t_cd.c |  7 ++++---
 1 files changed, 4 insertions(+), 3 deletions(-)

diffs (22 lines):

diff -r 9f59f3395ddb -r d49bf54760c1 tests/dev/scsipi/t_cd.c
--- a/tests/dev/scsipi/t_cd.c   Sun Mar 27 08:52:25 2011 +0000
+++ b/tests/dev/scsipi/t_cd.c   Sun Mar 27 08:53:56 2011 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: t_cd.c,v 1.2 2010/09/11 16:03:41 martin Exp $  */
+/*     $NetBSD: t_cd.c,v 1.3 2011/03/27 08:53:56 mlelstv Exp $ */
 
 /*
  * Copyright (c) 2010 Antti Kantee.  All Rights Reserved.
@@ -50,9 +50,10 @@
 ATF_TC_BODY(noisyeject, tc)
 {
        static char fname[] = "/dev/rcd0_";
-       int fd, arg = 0;
+       int part, fd, arg = 0;
 
-       fname[strlen(fname)-1] = 'a' + getrawpartition();
+       RL(part = getrawpartition());
+       fname[strlen(fname)-1] = 'a' + part;
        rump_init();
        RL(fd = rump_sys_open(fname, O_RDWR));
        RL(rump_sys_ioctl(fd, DIOCEJECT, &arg));



Home | Main Index | Thread Index | Old Index