Changes in uspace/app/pkg/pkg.c [9621c7d:1d6dd2a] in mainline
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/app/pkg/pkg.c
r9621c7d r1d6dd2a 39 39 #include <stdio.h> 40 40 #include <stdlib.h> 41 #include <str.h> 41 42 #include <str_error.h> 42 43 #include <task.h> … … 49 50 } 50 51 51 static int cmd_runl(const char *path, ...)52 static errno_t cmd_runl(const char *path, ...) 52 53 { 53 54 va_list ap; … … 65 66 task_id_t id; 66 67 task_wait_t wait; 67 int rc = task_spawn(&id, &wait, path, cnt, ap);68 errno_t rc = task_spawn(&id, &wait, path, cnt, ap); 68 69 va_end(ap); 69 70 … … 96 97 } 97 98 98 return retval ;99 } 100 101 102 static int pkg_install(int argc, char *argv[])99 return retval == 0 ? EOK : EPARTY; 100 } 101 102 103 static errno_t pkg_install(int argc, char *argv[]) 103 104 { 104 105 char *pkg_name; … … 106 107 char *fname; 107 108 char *fnunpack; 108 int rc; 109 errno_t rc; 110 int ret; 109 111 110 112 if (argc != 3) { … … 115 117 pkg_name = argv[2]; 116 118 117 r c= asprintf(&src_uri, "http://ci.helenos.org/latest/" STRING(UARCH)119 ret = asprintf(&src_uri, "http://ci.helenos.org/latest/" STRING(UARCH) 118 120 "/%s-for-helenos-" STRING(UARCH) ".tar.gz", 119 121 pkg_name); 120 if (r c< 0) {122 if (ret < 0) { 121 123 printf("Out of memory.\n"); 122 124 return ENOMEM; 123 125 } 124 126 125 r c= asprintf(&fname, "/tmp/%s-for-helenos-" STRING(UARCH)127 ret = asprintf(&fname, "/tmp/%s-for-helenos-" STRING(UARCH) 126 128 ".tar.gz", pkg_name); 127 if (r c< 0) {129 if (ret < 0) { 128 130 printf("Out of memory.\n"); 129 131 return ENOMEM; 130 132 } 131 133 132 r c= asprintf(&fnunpack, "/tmp/%s-for-helenos-" STRING(UARCH) ".tar",134 ret = asprintf(&fnunpack, "/tmp/%s-for-helenos-" STRING(UARCH) ".tar", 133 135 pkg_name); 134 if (r c< 0) {136 if (ret < 0) { 135 137 printf("Out of memory.\n"); 136 138 return ENOMEM; … … 180 182 { 181 183 char *cmd; 182 int rc;184 errno_t rc; 183 185 184 186 if (argc < 2) {
Note:
See TracChangeset
for help on using the changeset viewer.