Changes in uspace/app/pkg/pkg.c [9621c7d:1d6dd2a] in mainline


Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/app/pkg/pkg.c

    r9621c7d r1d6dd2a  
    3939#include <stdio.h>
    4040#include <stdlib.h>
     41#include <str.h>
    4142#include <str_error.h>
    4243#include <task.h>
     
    4950}
    5051
    51 static int cmd_runl(const char *path, ...)
     52static errno_t cmd_runl(const char *path, ...)
    5253{
    5354        va_list ap;
     
    6566        task_id_t id;
    6667        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);
    6869        va_end(ap);
    6970
     
    9697        }
    9798
    98         return retval;
    99 }
    100 
    101 
    102 static int pkg_install(int argc, char *argv[])
     99        return retval == 0 ? EOK : EPARTY;
     100}
     101
     102
     103static errno_t pkg_install(int argc, char *argv[])
    103104{
    104105        char *pkg_name;
     
    106107        char *fname;
    107108        char *fnunpack;
    108         int rc;
     109        errno_t rc;
     110        int ret;
    109111
    110112        if (argc != 3) {
     
    115117        pkg_name = argv[2];
    116118
    117         rc = asprintf(&src_uri, "http://ci.helenos.org/latest/" STRING(UARCH)
     119        ret = asprintf(&src_uri, "http://ci.helenos.org/latest/" STRING(UARCH)
    118120            "/%s-for-helenos-" STRING(UARCH) ".tar.gz",
    119121            pkg_name);
    120         if (rc < 0) {
     122        if (ret < 0) {
    121123                printf("Out of memory.\n");
    122124                return ENOMEM;
    123125        }
    124126
    125         rc = asprintf(&fname, "/tmp/%s-for-helenos-" STRING(UARCH)
     127        ret = asprintf(&fname, "/tmp/%s-for-helenos-" STRING(UARCH)
    126128            ".tar.gz", pkg_name);
    127         if (rc < 0) {
     129        if (ret < 0) {
    128130                printf("Out of memory.\n");
    129131                return ENOMEM;
    130132        }
    131133
    132         rc = asprintf(&fnunpack, "/tmp/%s-for-helenos-" STRING(UARCH) ".tar",
     134        ret = asprintf(&fnunpack, "/tmp/%s-for-helenos-" STRING(UARCH) ".tar",
    133135            pkg_name);
    134         if (rc < 0) {
     136        if (ret < 0) {
    135137                printf("Out of memory.\n");
    136138                return ENOMEM;
     
    180182{
    181183        char *cmd;
    182         int rc;
     184        errno_t rc;
    183185
    184186        if (argc < 2) {
Note: See TracChangeset for help on using the changeset viewer.