diff options
author | José Bollo <jose.bollo@iot.bzh> | 2019-03-19 23:21:35 +0100 |
---|---|---|
committer | José Bollo <jose.bollo@iot.bzh> | 2019-03-22 16:54:46 +0100 |
commit | 598f374d2948a76c381eab0a3dfb5334d6d62379 (patch) | |
tree | 1a45d9bdc4d9e2cfad3c259a6a39f26f578e8258 /src/afm-urun.c | |
parent | d07c7f7169788ffbe5cc70506daaf9fe0add88c2 (diff) |
Add ability to manage all widget/applicationsguppy_7.0.1guppy/7.0.17.0.1
For system uses -like automatic testing-, it is
needed to include tha ability to list ALL installed
widgets and ALL running instance of installed
widgets.
This change adds the option -a or --all to the
commands 'list' and 'runners' for the purpose
of listing any installed widgets, even those
requiring to be hidden.
Example: afm-util ps -a
Bug-AGL: SPEC-2272
Bug-AGL: SPEC-1850
Change-Id: I216ec9c63efea1b3af58e1d2d7723d986e04551e
Signed-off-by: Jose Bollo <jose.bollo@iot.bzh>
Diffstat (limited to 'src/afm-urun.c')
-rw-r--r-- | src/afm-urun.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/afm-urun.c b/src/afm-urun.c index 882d44c..7d82cdd 100644 --- a/src/afm-urun.c +++ b/src/afm-urun.c @@ -326,7 +326,7 @@ int afm_urun_resume(int runid, int uid) * * Returns the list or NULL in case of error. */ -struct json_object *afm_urun_list(struct afm_udb *db, int uid) +struct json_object *afm_urun_list(struct afm_udb *db, int all, int uid) { int i, n, isuser, pid; const char *udpath; @@ -342,7 +342,7 @@ struct json_object *afm_urun_list(struct afm_udb *db, int uid) if (result == NULL) goto error; - apps = afm_udb_applications_private(db, uid); + apps = afm_udb_applications_private(db, all, uid); n = json_object_array_length(apps); for (i = 0 ; i < n ; i++) { appli = json_object_array_get_idx(apps, i); @@ -393,7 +393,7 @@ struct json_object *afm_urun_state(struct afm_udb *db, int runid, int uid) WARNING("searched runid %d not found", runid); } else { /* search in the base */ - apps = afm_udb_applications_private(db, uid); + apps = afm_udb_applications_private(db, 1, uid); n = json_object_array_length(apps); for (i = 0 ; i < n ; i++) { appli = json_object_array_get_idx(apps, i); |