Changeset 241f1985 in mainline for uspace/app/sysctl/main.c


Ignore:
Timestamp:
2019-08-31T10:45:17Z (6 years ago)
Author:
Matthieu Riolo <matthieu.riolo@…>
Children:
102f641
Parents:
f92b315
git-author:
Matthieu Riolo <matthieu.riolo@…> (2019-08-23 22:04:34)
git-committer:
Matthieu Riolo <matthieu.riolo@…> (2019-08-31 10:45:17)
Message:

Correcting failure from previous merge

The commits from Michal Koutný from the branch system-daemon
where built on a old version of Helenos. Because of this
many types and API functions have changed. This commit
upgrades the merge code

File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/app/sysctl/main.c

    rf92b315 r241f1985  
    3939#include <str_error.h>
    4040#include <sysman/ctl.h>
    41 #include <unistd.h>
     41#include <fibril.h>
     42
    4243
    4344#define NAME "sysctl"
     
    6667}
    6768
    68 static int list_units(int argc, char *argv[])
     69static errno_t list_units(int argc, char *argv[])
    6970{
    7071        unit_handle_t *units;
    7172        size_t unit_cnt;
    7273
    73         int rc = sysman_get_units(&units, &unit_cnt);
     74        errno_t rc = sysman_get_units(&units, &unit_cnt);
    7475        if (rc != EOK) {
    7576                return rc;
     
    9899}
    99100
    100 static int start(int argc, char *argv[])
     101static errno_t start(int argc, char *argv[])
    101102{
    102103        unit_handle_t handle;
    103104        char *unit_name = argv[1];
    104105
    105         int rc = sysman_unit_handle(unit_name, &handle);
     106        errno_t rc = sysman_unit_handle(unit_name, &handle);
    106107        if (rc != EOK) {
    107108                printf("Cannot obtain handle for unit '%s' (%s).\n",
     
    120121}
    121122
    122 static int stop(int argc, char *argv[])
     123static errno_t stop(int argc, char *argv[])
    123124{
    124125        unit_handle_t handle;
    125126        char *unit_name = argv[1];
    126127
    127         int rc = sysman_unit_handle(unit_name, &handle);
     128        errno_t rc = sysman_unit_handle(unit_name, &handle);
    128129        if (rc != EOK) {
    129130                printf("Cannot obtain handle for unit '%s' (%s).\n",
     
    142143}
    143144
    144 static int shutdown(int argc, char *argv[])
     145static errno_t shutdown(int argc, char *argv[])
    145146{
    146147        const int delay = 3;
    147148        printf("Will shutdown in %i seconds...\n", delay);
    148         sleep(delay);
     149        fibril_sleep(delay);
    149150        printf("Shutdown now.\n");
    150151
    151         int rc = sysman_shutdown();
     152        errno_t rc = sysman_shutdown();
    152153        if (rc != EOK) {
    153154                printf("Shutdown request failed: %s.\n", str_error(rc));
Note: See TracChangeset for help on using the changeset viewer.