From: "Carsey, Jaben" <jaben.carsey@intel.com>
To: "Jim.Dailey@dell.com" <Jim.Dailey@dell.com>,
"TigerLiu@zhaoxin.com" <TigerLiu@zhaoxin.com>
Cc: "edk2-devel@lists.01.org" <edk2-devel@lists.01.org>
Subject: Re: Shell input redirection question
Date: Thu, 21 Sep 2017 13:11:12 +0000 [thread overview]
Message-ID: <CB6E33457884FA40993F35157061515C752EA3D3@FMSMSX103.amr.corp.intel.com> (raw)
In-Reply-To: <e230c322e7c74a39b0edf64ddc9945d1@ausx13mps335.AMER.DELL.COM>
If the requirement for PCI to display the information when there are no parameters present, I see no reason that it could not also use a file for input. i.e. "pci" must act according to the spec, but "pci < inputfile" is not prohibited. I think that as no code currently uses PCI with file input as long as current behavior still works it should be fine.
I would think that would be a great improvement for the PCI command.
-Jaben
> -----Original Message-----
> From: edk2-devel [mailto:edk2-devel-bounces@lists.01.org] On Behalf Of
> Jim.Dailey@dell.com
> Sent: Thursday, September 21, 2017 4:52 AM
> To: TigerLiu@zhaoxin.com
> Cc: edk2-devel@lists.01.org
> Subject: Re: [edk2] Shell input redirection question
> Importance: High
>
> The shell's pci command was not written to read from standard input. It
> expects all its input on the command line.
>
> I would say in general that if you execute a command and pass it no
> parameters, and it then prompts you in some way for input, then that
> command will likely accept input redirected from a file.
>
> If you execute pci without any parameters, it simply lists all the
> devices in the system and terminates, so it clearly is not prepared to
> read from standard input (or a redirected file).
>
> It is strictly up to whomever writes a program/command whether they do
> so in a manner that allows it to accept input from standard input. For
> example, I have written a grep utility for the shell that expects one or
> more filenames to search to be on the command line; however, if there
> are no filenames on the command line, the utility searches standard
> input.
>
> Regards,
> Jim
>
> -----Original Message-----
> From: edk2-devel [mailto:edk2-devel-bounces@lists.01.org] On Behalf Of
> Tiger Liu
> Sent: Thursday, September 21, 2017 1:11 AM
> To: edk2-devel@lists.01.org
> Subject: [edk2] Shell input redirection question
>
> Hi, experts:
> I have a question about input redirection in Shell environment.
>
> Take pci command as sample.
> I wrote a txt file(file name is : inputsample.txt), its content is:
> 00 00 01 -i
> 00 00 02 –i
>
> It means I just wanted to dump D0F1/D0F2’s config space.
>
> Then, I use this command sequence in shell :
> pci <a inputsample.txt
>
> But it seems not recognize this input file’s content.
>
> Why?
>
> Thanks
>
> best wishes,
>
>
> 保密声明:
> 本邮件含有保密或专有信息,仅供指定收件人使用。严禁对本邮件
> 或其内容做任何未经授权的查阅、使用、复制或转发。
> CONFIDENTIAL NOTE:
> This email contains confidential or legally privileged information and is for the
> sole use of its intended recipient. Any unauthorized review, use, copying or
> forwarding of this email or the content of this email is strictly prohibited.
> _______________________________________________
> edk2-devel mailing list
> edk2-devel@lists.01.org
> https://lists.01.org/mailman/listinfo/edk2-devel
> _______________________________________________
> edk2-devel mailing list
> edk2-devel@lists.01.org
> https://lists.01.org/mailman/listinfo/edk2-devel
next prev parent reply other threads:[~2017-09-21 13:08 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-09-21 6:11 Shell input redirection question Tiger Liu
2017-09-21 11:51 ` Jim.Dailey
2017-09-21 13:11 ` Carsey, Jaben [this message]
2017-09-21 13:32 ` Jim.Dailey
2017-09-21 14:13 ` Carsey, Jaben
-- strict thread matches above, loose matches on Subject: below --
2017-09-22 1:21 Tiger Liu
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-list 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=CB6E33457884FA40993F35157061515C752EA3D3@FMSMSX103.amr.corp.intel.com \
--to=devel@edk2.groups.io \
/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