Skip to content

Commit 9a88e8e

Browse files
akahermetan-ucw
authored andcommitted
io_control01: fix: use correct rbyte of io.read
To select a device, both dev_major and dev_minor should match. However, following if condition passes if only one of them matches: if (start.mjr == dev_major || start.mnr == dev_minor) Fix: if (start.mjr == dev_major && start.mnr == dev_minor) Signed-off-by: Ajay Kaher <[email protected]> Reviewed-by: Cyril Hrubis <[email protected]>
1 parent ecb6ca2 commit 9a88e8e

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

testcases/kernel/controllers/io/io_control01.c

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -64,11 +64,10 @@ static void run(void)
6464
if (convs < 2)
6565
continue;
6666

67-
tst_res(TINFO, "Found %u:%u in io.stat", dev_major, dev_minor);
68-
69-
if (start.mjr == dev_major || start.mnr == dev_minor)
67+
if (start.mjr == dev_major && start.mnr == dev_minor) {
68+
tst_res(TINFO, "Found %u:%u in io.stat", dev_major, dev_minor);
7069
break;
71-
70+
}
7271
line = strtok_r(NULL, "\n", &buf_ptr);
7372
}
7473

0 commit comments

Comments
 (0)