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