Commit ed2551d
committed
vpd-tool: fix odd length keyword value
Odd length ASCII values was not taken to update keyword value for write
Keyword command, as keyword length check was present in the wrong
place.
This commit fixes the above issue, utils:: convertToBinary is updated
to fix this issue.
Output:
'''
Issue: odd length values not taking
root@p10bmc:/tmp# ./vpd-tool -O /system/chassis/motherboard -R VSYS -K WN -V "A" -w
Write keyword's value for path: /system/chassis/motherboard, Record: VSYS, Keyword: WN is failed. Exception: Write option accepts 2 digit hex numbers. (Ex. 0x1 should be given as 0x01).
With the fix:
root@p10bmc:/tmp# ./vpd-tool_oddLength -O /system/chassis/motherboard -R VSYS -K WN -V "A" -w
Data updated successfully
root@p10bmc:/tmp# vpd-tool -O /system/chassis/motherboard -R VSYS -K WN -r
{
"/system/chassis/motherboard": {
"WN": "A "
}
}
'''
Signed-off-by: Anupama B R <[email protected]>1 parent c4c1359 commit ed2551d
1 file changed
+7
-7
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
312 | 312 | | |
313 | 313 | | |
314 | 314 | | |
315 | | - | |
316 | | - | |
317 | | - | |
318 | | - | |
319 | | - | |
320 | | - | |
321 | | - | |
322 | 315 | | |
323 | 316 | | |
324 | 317 | | |
325 | 318 | | |
| 319 | + | |
| 320 | + | |
| 321 | + | |
| 322 | + | |
| 323 | + | |
| 324 | + | |
| 325 | + | |
326 | 326 | | |
327 | 327 | | |
328 | 328 | | |
| |||
0 commit comments