buffet: Fix loading Buffet state when config file is not present

When there is no config file for Buffet, it fails to load the device
state as well because BuffetConfig::Load() would have not be called
at all.

Check for existance of the config file before trying to load it.
And if it exists, make sure we load it correctly by using CHECK().

Afterwards call BuffetConfig::Load() unconditionally which will load
default values if the store is empty.

BUG=None
TEST=`FEATURES=test emerge-link buffet`

Change-Id: Idfb21504fda018bedd228488dc0ad168f64a796a
Reviewed-on: https://chromium-review.googlesource.com/271818
Trybot-Ready: Alex Vakulenko <avakulenko@chromium.org>
Tested-by: Alex Vakulenko <avakulenko@chromium.org>
Reviewed-by: Vitaly Buka <vitalybuka@chromium.org>
Commit-Queue: Vitaly Buka <vitalybuka@chromium.org>
1 file changed
tree: f46801f39f66fedf2912a1f618c51bf33b177bbc
  1. buffet/