New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 776337 link

Starred by 1 user

Issue metadata

Status: Archived
Owner:
Last visit > 30 days ago
Closed: Dec 2017
EstimatedDays: ----
NextAction: ----
OS: Chrome
Pri: 3
Type: Feature



Sign in to add a comment

Export VPD data into program friendly format.

Project Member Reported by yhong@chromium.org, Oct 19 2017

Issue description

Currently the vpd tool can only:
* Dump the raw data of a specific key.
* Dump all vpd data into human readable but hard to parse format.
* Export all vpd data into an executable shell script which can set all the vpd data back.

In factory repository, we need a more program friendly format so that our code can get all the vpd data easily and be less error-prone.
 
Project Member

Comment 1 by bugdroid1@chromium.org, Dec 11 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromiumos/platform/vpd/+/61c1061abac8dd9fa42fc3727ebd7e9fc172346b

commit 61c1061abac8dd9fa42fc3727ebd7e9fc172346b
Author: Yong Hong <yhong@chromium.org>
Date: Mon Dec 11 13:32:16 2017

container: Refactor the methods for exporting the container.

This CL refactors the logic about exporting the data in VPD in both
vpd.c and lib/vpd_container.c so that developers can extend this tool
to support more kind of export format easier.  And this CL also
rewrites the part of exporting vpd data into shell script to handle
special characters strictly.

BUG= chromium:776337 
TEST=manually test; make test
BRANCH=None

Change-Id: I19b922d96c5ffb4854c65eedb4100facf9cc7ee7
Reviewed-on: https://chromium-review.googlesource.com/727831
Commit-Ready: Yong Hong <yhong@google.com>
Tested-by: Yong Hong <yhong@google.com>
Reviewed-by: Yong Hong <yhong@google.com>

[modify] https://crrev.com/61c1061abac8dd9fa42fc3727ebd7e9fc172346b/tests/functions.sh
[modify] https://crrev.com/61c1061abac8dd9fa42fc3727ebd7e9fc172346b/lib/vpd_container.c
[modify] https://crrev.com/61c1061abac8dd9fa42fc3727ebd7e9fc172346b/vpd.c
[modify] https://crrev.com/61c1061abac8dd9fa42fc3727ebd7e9fc172346b/tests/Makefile
[add] https://crrev.com/61c1061abac8dd9fa42fc3727ebd7e9fc172346b/tests/test_export.sh
[modify] https://crrev.com/61c1061abac8dd9fa42fc3727ebd7e9fc172346b/include/lib/lib_vpd.h

Project Member

Comment 2 by bugdroid1@chromium.org, Dec 12 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromiumos/platform/vpd/+/8964afe6e3f5ad2cff04c8ff2c1211a5f7b63002

commit 8964afe6e3f5ad2cff04c8ff2c1211a5f7b63002
Author: Yong Hong <yhong@chromium.org>
Date: Tue Dec 12 19:09:11 2017

vpd: Adds a way to export vpd data into null-terminate format.

This CL adds a new export format, which is more program friendly:

```
key1=value1\0key2=value2\0...keyN=valueN\0
```

Use `--null-terminated` commandline argument to select this format
for exporting the vpd data.

BUG= chromium:776337 
TEST=manually test; make test
BRANCH=None

Change-Id: I3dc030387ed9fdf8cee8b23e84d47ff98d26e1c2
Reviewed-on: https://chromium-review.googlesource.com/727503
Commit-Ready: Yong Hong <yhong@google.com>
Tested-by: Yong Hong <yhong@google.com>
Reviewed-by: Yong Hong <yhong@google.com>

[modify] https://crrev.com/8964afe6e3f5ad2cff04c8ff2c1211a5f7b63002/include/lib/lib_vpd.h
[modify] https://crrev.com/8964afe6e3f5ad2cff04c8ff2c1211a5f7b63002/lib/vpd_container.c
[modify] https://crrev.com/8964afe6e3f5ad2cff04c8ff2c1211a5f7b63002/vpd.c
[modify] https://crrev.com/8964afe6e3f5ad2cff04c8ff2c1211a5f7b63002/tests/test_export.sh

Comment 3 by yhong@chromium.org, Dec 20 2017

Status: Fixed (was: Started)
Status: Archived (was: Fixed)

Sign in to add a comment