diff options
author | Mary Ruthven <mruthven@chromium.org> | 2021-04-01 11:54:57 +1100 |
---|---|---|
committer | Commit Bot <commit-bot@chromium.org> | 2021-04-06 21:12:31 +0000 |
commit | bc22dfda4c5a003ead902664d82ad5e495290ca4 (patch) | |
tree | 9f162be3d5fc7a3f4c8beaa5c139c1e1182da790 | |
parent | f38daf612e9bd788791191dfd17940d757d303fa (diff) | |
download | chrome-ec-stabilize-13904.58.B-cr50_stab.tar.gz |
remove serialno commandstabilize-quickfix-13904.98.B-cr50_stabstabilize-glibc-13901.B-cr50_stabstabilize-coil-13902.B-cr50_stabstabilize-13904.67.B-cr50_stabstabilize-13904.66.B-cr50_stabstabilize-13904.62.B-cr50_stabstabilize-13904.59.B-cr50_stabstabilize-13904.58.B-cr50_stabstabilize-13904.55.B-cr50_stabstabilize-13904.49.B-cr50_stabstabilize-13904.48.B-cr50_stabstabilize-13904.47.B-cr50_stabstabilize-13904.44.B-cr50_stabstabilize-13904.43.B-cr50_stabstabilize-13904.42.B-cr50_stabstabilize-13904.41.B-cr50_stabstabilize-13904.34.B-cr50_stabrelease-R91-13904.B-cr50_stab
The cr50 serial number is based on the devid, so the serial number can
be found using the sysinfo devid output. The serial number is the devid
without '0x's, capitalized, and the space is replaced with a '-'.
echo ${DEVID//0x/} | tr '[:lower:]' '[:upper:]' | tr ' ' '-'
No scripts or tests use serialno.
This command saves 208 bytes.
BUG=b:181999426
TEST=none
Change-Id: Ib6629ceb9cfa001d8c758077119717f29116cb15
Signed-off-by: Mary Ruthven <mruthven@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2799442
Reviewed-by: Vadim Bendebury <vbendeb@chromium.org>
-rw-r--r-- | chip/g/usb.c | 22 |
1 files changed, 0 insertions, 22 deletions
diff --git a/chip/g/usb.c b/chip/g/usb.c index cf2e0245da..377eb8a470 100644 --- a/chip/g/usb.c +++ b/chip/g/usb.c @@ -1553,26 +1553,4 @@ static void usb_load_serialno(void) usb_set_serial(devid_str); } DECLARE_HOOK(HOOK_INIT, usb_load_serialno, HOOK_PRIO_DEFAULT - 1); - -static int command_serialno(int argc, char **argv) -{ - struct usb_string_desc *sd = usb_serialno_desc; - char buf[CONFIG_SERIALNO_LEN]; - int rv = EC_SUCCESS; - int i; - - if (argc != 1) { - ccprintf("Setting serial number\n"); - rv = usb_set_serial(argv[1]); - } - - for (i = 0; i < CONFIG_SERIALNO_LEN; i++) - buf[i] = sd->_data[i]; - ccprintf("Serial number: %s\n", buf); - return rv; -} - -DECLARE_CONSOLE_COMMAND(serialno, command_serialno, - "[value]", - "Read and write USB serial number"); #endif |