Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(80)

Issue 6849018: Support -g option to dump value string only (no key string, no quotes). (Closed)

Created:
9 years, 8 months ago by Louis
Modified:
9 years, 4 months ago
Reviewers:
Hung-Te, dhendrix
CC:
chromium-os-reviews_chromium.org
Visibility:
Public.

Description

Support -g option to dump value string only (no key string, no quotes, no newline). Added filter for exporting. Also added an export type for exporting value only. Refined some comments too. Change-Id: I97fdd408bd444094ccc3378564b37c252fcf213e R=hungte@chromium.org,dhendrix@chromium.org BUG=no bug id TEST=Compile okay on Z600 and x86-*. Tested on Z600 machine: vpd -f test -s ABC=DEF -s DEF=GHI -s IJK=ABC vpd -f test -l # all show up vpd -f test -g abc # nothing shows up vpd -f test -g ABC # DEF is showed. vpd -f test -l -g # error check: need an argument for -g vpd -f test -l -g XXX # error check: -g and -l must be mutually exclusive. Committed: http://chrome-svn/viewvc/chromeos?view=rev&revision=65f4104

Patch Set 1 #

Patch Set 2 : remove newline #

Unified diffs Side-by-side diffs Delta from patch set Stats (+82 lines, -28 lines) Patch
M include/lib/lib_vpd.h View 3 chunks +9 lines, -1 line 0 comments Download
M lib/lib_vpd.c View 1 5 chunks +51 lines, -22 lines 0 comments Download
M vpd.c View 7 chunks +22 lines, -5 lines 0 comments Download

Messages

Total messages: 3 (0 generated)
Louis
9 years, 8 months ago (2011-04-14 06:49:52 UTC) #1
Hung-Te
LGTM P.S: I think we won't want to put multiple key names or regex into ...
9 years, 8 months ago (2011-04-14 10:12:33 UTC) #2
Louis
9 years, 8 months ago (2011-04-15 02:28:27 UTC) #3
Thanks for review. My intention is for people to easily enumerate similar
fields, for example, "^.*_MAC$" to list ethernet/wifi/bluetooth MAC addresses in
one command.

Code submitted. Will implement that when real use case comes.

On 2011/04/14 10:12:33, Hung-Te wrote:
> LGTM
> 
> P.S: I think we won't want to put multiple key names or regex into -g, because
> there's no way to distinguish from the continuous output. People who wants a
> fuzzy search should get all values and parse by himself.
> 
> You can simplify the code by making it as simple "get" if you wish, but I'm OK
> if you want to keep current implementation - that also looks good to me.

Powered by Google App Engine
This is Rietveld 408576698