aboutsummaryrefslogtreecommitdiffstats
path: root/src/wgtpkg-install.c
diff options
context:
space:
mode:
authorJosé Bollo <jose.bollo@iot.bzh>2016-01-04 20:52:33 +0100
committerJosé Bollo <jose.bollo@iot.bzh>2016-01-04 21:12:07 +0100
commit32b15670d36b31b39a9ae2215ff0d1679e211169 (patch)
tree0480ed39f7094d3ea0a2acb730a434cc4fb35e3a /src/wgtpkg-install.c
parentcda8f0470953975c45c66b8f3b7249f36f064d78 (diff)
wgt-info: adding field 'ver' for major.minor
Change-Id: I3f9684b1e313894c5c796141d3a0b36831e52695 Signed-off-by: José Bollo <jose.bollo@iot.bzh>
Diffstat (limited to 'src/wgtpkg-install.c')
-rw-r--r--src/wgtpkg-install.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/wgtpkg-install.c b/src/wgtpkg-install.c
index 7b299f2..a405cfa 100644
--- a/src/wgtpkg-install.c
+++ b/src/wgtpkg-install.c
@@ -71,6 +71,7 @@ static int check_temporary_constraints(const struct wgt_desc *desc)
{
int result = check_valid_string(desc->id, "id");
result |= check_valid_string(desc->version, "version");
+ result |= check_valid_string(desc->ver, "ver");
result |= check_defined(desc->icons, "icon");
result |= check_defined(desc->content_src, "content");
if (result)
@@ -119,7 +120,7 @@ static int move_widget(const char *root, const struct wgt_desc *desc, int force)
char newdir[PATH_MAX];
int rc;
- rc = snprintf(newdir, sizeof newdir, "%s/%s/%s", root, desc->id, desc->version);
+ rc = snprintf(newdir, sizeof newdir, "%s/%s/%s", root, desc->id, desc->ver);
if (rc >= sizeof newdir) {
ERROR("path to long in move_widget");
errno = EINVAL;
@@ -136,7 +137,7 @@ static int install_icon(const struct wgt_desc *desc)
int rc;
create_directory(FWK_ICON_DIR, 0755, 1);
- rc = snprintf(link, sizeof link, "%s/%s@%s", FWK_ICON_DIR, desc->id, desc->version);
+ rc = snprintf(link, sizeof link, "%s/%s@%s", FWK_ICON_DIR, desc->id, desc->ver);
if (rc >= sizeof link) {
ERROR("link to long in install_icon");
errno = EINVAL;