[LTP] [PATCH v3 2/2] syscalls/ioctl_loop05: Using LOOP_CONFIGURE to set direct io

Cyril Hrubis chrubis@suse.cz
Wed Jul 29 13:39:46 CEST 2020


Hi!
I started look at this patch however the first thing I've found out is that
our mountinfo parser is wrong. If you look at man 5 proc it says:

36 35 98:0 /mnt1 /mnt2 rw,noatime master:1 - ext3 /dev/root rw,errors=continue
(1)(2)(3)   (4)   (5)      (6)      (7)   (8) (9)   (10)         (11)


(7)  optional fields: zero or more fields of the form
     "tag[:value]"; see below.

So we cannot really parse the information with a static scanf() string,
since the number of elements in the line is not constant.

And it does fail on some of the machines I do have here since there is
no optional fields present.

So I guess that we will have to write a parser that reads that
information line by line after all.

-- 
Cyril Hrubis
chrubis@suse.cz


More information about the ltp mailing list