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


Ignore:
File:
1 edited

Legend:

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

    r1d6dd2a r9621c7d  
    3939#include <stdio.h>
    4040#include <stdlib.h>
    41 #include <str.h>
    4241#include <str_error.h>
    4342#include <task.h>
     
    5049}
    5150
    52 static errno_t cmd_runl(const char *path, ...)
     51static int cmd_runl(const char *path, ...)
    5352{
    5453        va_list ap;
     
    6665        task_id_t id;
    6766        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);
    6968        va_end(ap);
    7069
     
    9796        }
    9897
    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
     102static int pkg_install(int argc, char *argv[])
    104103{
    105104        char *pkg_name;
     
    107106        char *fname;
    108107        char *fnunpack;
    109         errno_t rc;
    110         int ret;
     108        int rc;
    111109
    112110        if (argc != 3) {
     
    117115        pkg_name = argv[2];
    118116
    119         ret = asprintf(&src_uri, "http://ci.helenos.org/latest/" STRING(UARCH)
     117        rc = asprintf(&src_uri, "http://ci.helenos.org/latest/" STRING(UARCH)
    120118            "/%s-for-helenos-" STRING(UARCH) ".tar.gz",
    121119            pkg_name);
    122         if (ret < 0) {
     120        if (rc < 0) {
    123121                printf("Out of memory.\n");
    124122                return ENOMEM;
    125123        }
    126124
    127         ret = asprintf(&fname, "/tmp/%s-for-helenos-" STRING(UARCH)
     125        rc = asprintf(&fname, "/tmp/%s-for-helenos-" STRING(UARCH)
    128126            ".tar.gz", pkg_name);
    129         if (ret < 0) {
     127        if (rc < 0) {
    130128                printf("Out of memory.\n");
    131129                return ENOMEM;
    132130        }
    133131
    134         ret = asprintf(&fnunpack, "/tmp/%s-for-helenos-" STRING(UARCH) ".tar",
     132        rc = asprintf(&fnunpack, "/tmp/%s-for-helenos-" STRING(UARCH) ".tar",
    135133            pkg_name);
    136         if (ret < 0) {
     134        if (rc < 0) {
    137135                printf("Out of memory.\n");
    138136                return ENOMEM;
     
    182180{
    183181        char *cmd;
    184         errno_t rc;
     182        int rc;
    185183
    186184        if (argc < 2) {
Note: See TracChangeset for help on using the changeset viewer.