hnvram: allow adding variables in RO partition

A previous commit allowed adding new variables into hnvram
at runtime:
go/fibercl/75404.

These variables were automatically placed into the RW partition
and stored as STRING datatype. This commit continues by allowing
variables to be added into the Read Only (RO) partition as well.

hnvram -w NEWVAR=abc123 - Will fail, as before
hnvram -n -w NEWVAR=abc123 - Add to RW partition as STRING
hnvram -n -p RW -w NEWVAR=abc123 - Add to RW partition as STRING
hnvram -n -p RO -w NEWVAR=abc123 - Add to RW partition as STRING

hnvram -k NEWVAR - Will delete NEWVAR from any and all partitions

In reference to b/31999248

Change-Id: Ia3a70c1bc90b27a7d837752b5ef946cdd6ea3ff6
2 files changed