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" <chru...@suse.cz> 收件人: x...@redhat.com 抄送: ltp-list@lists.sourceforge.net 发送时间: 星期二, 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 chru...@suse.cz ------------------------------------------------------------------------------ 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 Ltp-list@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/ltp-list