init_db: Fix not to print warning log about no source file 90/322990/2 accepted/tizen_unified accepted/tizen_unified_x tizen accepted/tizen/unified/20250429.071338 accepted/tizen/unified/x/20250429.203611
authorYoungjae Cho <y0.cho@samsung.com>
Mon, 21 Apr 2025 04:54:14 +0000 (13:54 +0900)
committerYoungjae Cho <y0.cho@samsung.com>
Mon, 21 Apr 2025 10:48:50 +0000 (19:48 +0900)
commit7849fa13fdc71621fecb8d589ecf7a021be95b7a
treeca6c48612415e05600c47239bdcb8732614abe7b
parentea1035a275fcc632479c08fcf73ba51e081aa0b9
init_db: Fix not to print warning log about no source file

There might be no source files for the system info database. For
example, when creating hal.img, there might be no /etc/info.ini and
/etc/config/model-config.xml.
 - I/O warning : failed to load "/etc/config/model-config.xml":
       No such file or directory
 - iniparser: cannot open /etc/info.ini
To prevent printing warning log about no such files, check their
existance before parsing them.

In addition, fixed log when there is no given --release argument for
the system_info_update_db(). Previously, it just printed null buffer
after the 'and', making the entire message end with just 'and'.
 - Make system info db(/hal/etc/system_info_db) by
       /hal/etc/config/model-config.xml and
And it made the following line seem like continued message from the
trailing 'and'. So fixed not to print 'and' when there is no given
--release argument.

Change-Id: Ic7bce9b46f3578b40fb3b07f54d43a36df37cf2f
Signed-off-by: Youngjae Cho <y0.cho@samsung.com>
src/init_db/system_info_db_init.c