X-Git-Url: https://gerrit.automotivelinux.org/gerrit/gitweb?a=blobdiff_plain;f=src%2Fwgtpkg-installer.c;h=7c27fd5039782f2ed8fadadc1599c1912eb870f6;hb=c0fc18e47e49dd4e3cc2f09452a19297dad63f9c;hp=e8568b83b69878b5de0c1ddbfd14c9b81723fa06;hpb=9ab266df6642c6e930e03b3024d7c3d53ef88bbc;p=src%2Fapp-framework-main.git diff --git a/src/wgtpkg-installer.c b/src/wgtpkg-installer.c index e8568b8..7c27fd5 100644 --- a/src/wgtpkg-installer.c +++ b/src/wgtpkg-installer.c @@ -1,6 +1,8 @@ /* Copyright 2015 IoT.bzh + author: José Bollo + Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at @@ -23,13 +25,12 @@ #include #include #include -#include #include #include "verbose.h" #include "wgtpkg.h" -static const char appname[] = "wgtpkg-install"; +static const char appname[] = "wgtpkg-installer"; static const char *root; static int force; @@ -61,9 +62,8 @@ static struct option options[] = { int main(int ac, char **av) { int i; - char *wpath; - openlog(appname, LOG_PERROR, LOG_AUTH); + LOGAUTH(appname); xmlsec_init(); @@ -90,33 +90,23 @@ int main(int ac, char **av) grant_permission_list(optarg); break; case ':': - syslog(LOG_ERR, "missing argument value"); + ERROR("missing argument value"); return 1; default: - syslog(LOG_ERR, "unrecognized option"); + ERROR("unrecognized option"); return 1; } } ac -= optind; if (ac < 2) { - syslog(LOG_ERR, "arguments are missing"); + ERROR("arguments are missing"); return 1; } - /* canonic names for files */ + /* install widgets */ av += optind; - for (i = 0 ; av[i] != NULL ; i++) { - wpath = realpath(av[i], NULL); - if (wpath == NULL) { - syslog(LOG_ERR, "error while getting realpath of %dth widget: %s", i+1, av[i]); - return 1; - } - av[i] = wpath; - } root = *av++; - - /* install widgets */ for ( ; *av ; av++) install_widget(*av, root, force);