Fork us on GitHub Follow us on Facebook Follow us on Twitter

Changeset 88ad75f in mainline for uspace/srv/sysman/main.c


Ignore:
Timestamp:
2020-01-09T01:04:57Z (13 months ago)
Author:
Matthieu Riolo <matthieu.riolo@…>
Children:
76c8209
Parents:
0939097
git-author:
Matthieu Riolo <matthieu.riolo@…> (2020-01-05 19:24:23)
git-committer:
Matthieu Riolo <matthieu.riolo@…> (2020-01-09 01:04:57)
Message:

repo_add_unit() returned an errno_t but it was never handled. This
commit adds a check if EOK is returned or else the repo will be left
unchanged

File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/srv/sysman/main.c

    r0939097 r88ad75f  
    135135        repo_begin_update();
    136136
    137         repo_add_unit(mnt_initrd);
    138         repo_add_unit(cfg_init);
    139         repo_add_unit(tgt_init);
     137        rc = repo_add_unit(mnt_initrd);
     138        if (rc != EOK)
     139                goto rollback;
     140        rc = repo_add_unit(cfg_init);
     141        if (rc != EOK)
     142                goto rollback;
     143        rc = repo_add_unit(tgt_init);
     144        if (rc != EOK)
     145                goto rollback;
    140146
    141147        rc = edge_connect(tgt_init, cfg_init);
    142         if (rc != EOK) {
    143                 goto rollback;
    144         }
     148        if (rc != EOK)
     149                goto rollback;
    145150
    146151        rc = edge_connect(cfg_init, mnt_initrd);
    147         if (rc != EOK) {
    148                 goto rollback;
    149         }
     152        if (rc != EOK)
     153                goto rollback;
    150154
    151155        repo_commit();
    152 
    153156        return EOK;
    154157
Note: See TracChangeset for help on using the changeset viewer.