To detect invalid modification on feature of enum type, the init_db
reports error by return code, let mic make use of it, aborting the
whole mic process.
Change-Id: Ic45e1e6949a6912203ce10bd85a8dcb8bb69b0b2
Signed-off-by: Youngjae Cho <y0.cho@samsung.com>
EOF
/usr/bin/system_info_init_db --input=/hal/etc/config/model-config.xml --output=/hal/etc/system_info_db
-
+ if [ $? -ne 0 ]; then
+ echo "Failed to generate system_info_db"
+ exit 1
+ fi
else
cat <<EOF > /etc/info.ini
[Version]
EOF
/usr/bin/system_info_init_db
+ if [ $? -ne 0 ]; then
+ echo "Failed to generate system_info_db"
+ exit 1
+ fi
# Create version info file for update
if [ -e /usr/share/upgrade/record-version.sh ]; then
ret = system_info_util_get_enumerator_value(value, &__enumerator_value);
if (ret < 0) {
_E("cannot find enumerator %s", value);
- return ret;
+ exit(EXIT_FAILURE);
}
ret = snprintf(enumerator_value, sizeof(enumerator_value) - 1, "%d", __enumerator_value);