summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHwankyu Jhun <h.jhun@samsung.com>2017-01-19 14:43:51 +0900
committerHwankyu Jhun <h.jhun@samsung.com>2017-01-19 14:43:51 +0900
commit9294b984f53bd63958432cfbc6eee6e6673ff290 (patch)
treed8d8a07713ec95c815765d21eeb68eb1c1db8a3d
parentbc7f86d61bc9e9ddbaf6d4bad540a403fc69d5d0 (diff)
downloadsyspopup-9294b984f53bd63958432cfbc6eee6e6673ff290.tar.gz
syspopup-9294b984f53bd63958432cfbc6eee6e6673ff290.tar.bz2
syspopup-9294b984f53bd63958432cfbc6eee6e6673ff290.zip
Fix syspopup initdb tool
Even if the profile is not the wearable or the mobile, the syspopup db should be installed. Change-Id: Ic3d878ef7310153dc6eb55c693efa69aa6e45b90 Signed-off-by: Hwankyu Jhun <h.jhun@samsung.com>
-rwxr-xr-xtool/sp_initdb.c23
1 files changed, 5 insertions, 18 deletions
diff --git a/tool/sp_initdb.c b/tool/sp_initdb.c
index 4d4e727..f1e2d21 100755
--- a/tool/sp_initdb.c
+++ b/tool/sp_initdb.c
@@ -59,7 +59,7 @@ struct syspopup_info {
};
static sqlite3 *db;
-static struct syspopup_info mobile_info[] = {
+static struct syspopup_info default_info[] = {
{"volume", 1, 1, -1, 1, 1, "org.tizen.volume"},
{"bt-syspopup", 0, 0, -1, 0, 0, "org.tizen.bt-syspopup"},
{"wifi-qs", 0, 0, -1, 0, 2, "net.wifi-qs"},
@@ -237,28 +237,15 @@ static int __init_db(void)
return -1;
}
- switch (*profile) {
- case 'm':
- case 'M':
- info = mobile_info;
- info_size = ARRAY_SIZE(mobile_info);
- break;
- case 'w':
- case 'W':
+ if (*profile == 'w' || *profile == 'W') {
info = wearable_info;
info_size = ARRAY_SIZE(wearable_info);
- break;
- default:
- info = NULL;
- break;
+ } else {
+ info = default_info;
+ info_size = ARRAY_SIZE(default_info);
}
free(profile);
- if (info == NULL) {
- printf("Syspopup info doesn't exist\n");
- return -1;
- }
-
ret = __open_db();
if (ret < 0)
return -1;