From: Wanlong Gao <gaowanlong@cn.fujitsu.com>
To: Wang Xiaoguang <wangxg.fnst@cn.fujitsu.com>
Cc: LTP <ltp-list@lists.sourceforge.net>
Subject: Re: [LTP] lib/tst_mkfs.c: problem about tst_mkfs()
Date: Mon, 20 Jan 2014 16:52:55 +0800 [thread overview]
Message-ID: <52DCE3E7.9060109@cn.fujitsu.com> (raw)
In-Reply-To: <52DCE226.4030500@cn.fujitsu.com>
On 01/20/2014 04:45 PM, Wang Xiaoguang wrote:
> Hi,
>
> When I used tst_mkfs() to build a file system with extra mkfs
> options, like that:
> tst_mkfs(NULL, device, "ext4", "-b 1024"); /* device is /dev/loop0 */
>
> It will output this error message:
> TINFO : Formatting /dev/loop0 with ext4 extra opts='-b 1024'
> mke2fs 1.42.7 (21-Jan-2013)
> mkfs.ext4: invalid blocks '/dev/loop0' on device 'ext4'
>
> I look through tst_mkfs()'s implementations,
> the call chain is: tst_mkfs => tst_run_cmd => tst_run_cmd_fds
> => _exit(execvp(argv[0], (char *const *)argv));
>
> in this case argv will be like that:
> char *argv[] = {"mkfs", "-t", "ext4", "-b 1024", "/dev/loop0", NULL},
> then we finally call mkfs like that:
> mkfs -t ext4 "-b 1024" /dev/loop0 # this may make command mkfs parse
> # arguments failed.
>
> Indeed the right command should be: mkfs -t ext4 -b 1024 /dev/loop0.
>
> So I think there are some problems here, if we want to pass extra fs options.
> Would you please review this? If so, I can send a patch to fix this.
Should be fixed, please send a patch.
Thanks,
Wanlong Gao
>
> Thanks,
> Xiaoguang Wang
>
>
> ------------------------------------------------------------------------------
> CenturyLink Cloud: The Leader in Enterprise Cloud Services.
> Learn Why More Businesses Are Choosing CenturyLink Cloud For
> Critical Workloads, Development Environments & Everything In Between.
> Get a Quote or Start a Free Trial Today.
> http://pubads.g.doubleclick.net/gampad/clk?id=119420431&iu=/4140/ostg.clktrk
> _______________________________________________
> Ltp-list mailing list
> Ltp-list@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/ltp-list
>
------------------------------------------------------------------------------
CenturyLink Cloud: The Leader in Enterprise Cloud Services.
Learn Why More Businesses Are Choosing CenturyLink Cloud For
Critical Workloads, Development Environments & Everything In Between.
Get a Quote or Start a Free Trial Today.
http://pubads.g.doubleclick.net/gampad/clk?id=119420431&iu=/4140/ostg.clktrk
_______________________________________________
Ltp-list mailing list
Ltp-list@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ltp-list
parent reply other threads:[~2014-01-20 9:00 UTC|newest]
Thread overview: expand[flat|nested] mbox.gz Atom feed
[parent not found: <52DCE226.4030500@cn.fujitsu.com>]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=52DCE3E7.9060109@cn.fujitsu.com \
--to=gaowanlong@cn.fujitsu.com \
--cc=ltp-list@lists.sourceforge.net \
--cc=wangxg.fnst@cn.fujitsu.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox