Thanks for reviewing.
good, but a few questions:
- if (system("mkfs.btrfs 2>&1 | grep '\\-f ' >/dev/null") == 0) {
here is the original author's check, use "== 0", so I'am not sure the
"!tst_system" will be good for ltp's coding style.
and if I make codes like this, the next line's style will not be consistent to
it:
+ if (!tst_system("mkfs.btrfs 2>&1 | grep '\\-f ' >/dev/null")) {
tst_resm(TINFO, "Appending '-f' flag to mkfs.%s",
fs_type);
to be consistent, iit should be changed like the following:
+ if (!tst_system("mkfs.btrfs 2>&1 | grep '\\-f ' >/dev/null")) {
- tst_resm(TINFO, "Appending '-f' flag to mkfs.%s",
- fs_type);
+ tst_resm(TINFO, "Appending '-f' flag to mkfs.%s", fs_type);
Willl it be OK?
Best regards,
--
George Wang 王旭
Kernel Quantity Engineer
Red Hat Software (Beijing) Co.,Ltd
IRC:xuw
Tel:+86-010-62608041
Phone:15901231579
9/F, Tower C, Raycom
----- 原始邮件 -----
发件人: "Cyril Hrubis" <[email protected]>
收件人: [email protected]
抄送: [email protected]
发送时间: 星期二, 2014年 12 月 16日 下午 10:54:48
主题: Re: [LTP] [PATCHv3] library: add tst_system for wrapper system(3) without
SIGCHLD
Hi!
> - if (system("mkfs.btrfs 2>&1 | grep '\\-f ' >/dev/null") == 0) {
> + if (0 == tst_system(
> + "mkfs.btrfs 2>&1 | grep '\\-f '
> >/dev/null")
> + ) {
This is way too ugly. What about:
if (!tst_system("mkfs.btrfs 2>&1 | grep '\\-f '>/dev/null")) {
--
Cyril Hrubis
[email protected]
------------------------------------------------------------------------------
Download BIRT iHub F-Type - The Free Enterprise-Grade BIRT Server
from Actuate! Instantly Supercharge Your Business Reports and Dashboards
with Interactivity, Sharing, Native Excel Exports, App Integration & more
Get technology previously reserved for billion-dollar corporations, FREE
http://pubads.g.doubleclick.net/gampad/clk?id=164703151&iu=/4140/ostg.clktrk
_______________________________________________
Ltp-list mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/ltp-list