Changeset b7fd2a0 in mainline for uspace/app/pkg/pkg.c


Ignore:
Timestamp:
2018-01-13T03:10:29Z (8 years ago)
Author:
Jiří Zárevúcky <zarevucky.jiri@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
a53ed3a
Parents:
36f0738
Message:

Use errno_t in all uspace and kernel code.

Change type of every variable, parameter and return value that holds an
<errno.h> constant to either errno_t (the usual case), or sys_errno_t
(some places in kernel). This is for the purpose of self-documentation,
as well as for type-checking with a bit of type definition hackery.

Although this is a massive commit, it is a simple text replacement, and thus
is very easy to verify. Simply do the following:

`
git checkout <this commit's hash>
git reset HEAD
git add .
tools/srepl '\berrno_t\b' int
git add .
tools/srepl '\bsys_errno_t\b' sysarg_t
git reset
git diff
`

While this doesn't ensure that the replacements are correct, it does ensure
that the commit doesn't do anything except those replacements. Since errno_t
is typedef'd to int in the usual case (and sys_errno_t to sysarg_t), even if
incorrect, this commit cannot change behavior.

File:
1 edited

Legend:

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

    r36f0738 rb7fd2a0  
    4949}
    5050
    51 static int cmd_runl(const char *path, ...)
     51static errno_t cmd_runl(const char *path, ...)
    5252{
    5353        va_list ap;
     
    6565        task_id_t id;
    6666        task_wait_t wait;
    67         int rc = task_spawn(&id, &wait, path, cnt, ap);
     67        errno_t rc = task_spawn(&id, &wait, path, cnt, ap);
    6868        va_end(ap);
    6969
     
    100100
    101101
    102 static int pkg_install(int argc, char *argv[])
     102static errno_t pkg_install(int argc, char *argv[])
    103103{
    104104        char *pkg_name;
     
    106106        char *fname;
    107107        char *fnunpack;
    108         int rc;
     108        errno_t rc;
    109109        int ret;
    110110
     
    181181{
    182182        char *cmd;
    183         int rc;
     183        errno_t rc;
    184184
    185185        if (argc < 2) {
Note: See TracChangeset for help on using the changeset viewer.