Changeset 102f641 in mainline for uspace/srv/sysman/units


Ignore:
Timestamp:
2019-09-02T19:01:50Z (6 years ago)
Author:
Matthieu Riolo <matthieu.riolo@…>
Children:
25697163
Parents:
241f1985
Message:

Correcting syntax according to ccheck

Location:
uspace/srv/sysman/units
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • uspace/srv/sysman/units/unit_cfg.c

    r241f1985 r102f641  
    4646
    4747static config_item_t unit_configuration[] = {
    48         {"Path", &config_parse_string, offsetof(unit_cfg_t, path), NULL},
     48        { "Path", &config_parse_string, offsetof(unit_cfg_t, path), NULL },
    4949        CONFIGURATION_ITEM_SENTINEL
    5050};
     
    8181                goto finish;
    8282        }
    83        
     83
    8484        /* We parse files as part of ongoing repo transaction (locked). */
    8585        unit_t *u = repo_find_unit_by_name_unsafe(unit_name);
     
    231231
    232232        errno_t rc = cfg_load_configuration(u_cfg->path);
    233        
     233
    234234        if (rc == EOK) {
    235235                unit->state = STATE_STARTED;
     
    267267}
    268268
    269 DEFINE_UNIT_VMT(unit_cfg)
    270 
     269DEFINE_UNIT_VMT(unit_cfg);
  • uspace/srv/sysman/units/unit_mnt.c

    r241f1985 r102f641  
    4141
    4242static config_item_t unit_configuration[] = {
    43         {"What",      &config_parse_string, offsetof(unit_mnt_t, device),     NULL},
    44         {"Where",     &config_parse_string, offsetof(unit_mnt_t, mountpoint), NULL},
    45         {"Type",      &config_parse_string, offsetof(unit_mnt_t, type),       NULL},
    46         {"Autostart", &config_parse_bool,   offsetof(unit_mnt_t, autostart),  "true"},
    47         {"Blocking",  &config_parse_bool,   offsetof(unit_mnt_t, blocking),   "true"},
     43        { "What",      &config_parse_string, offsetof(unit_mnt_t, device),     NULL },
     44        { "Where",     &config_parse_string, offsetof(unit_mnt_t, mountpoint), NULL },
     45        { "Type",      &config_parse_string, offsetof(unit_mnt_t, type),       NULL },
     46        { "Autostart", &config_parse_bool,   offsetof(unit_mnt_t, autostart),  "true" },
     47        { "Blocking",  &config_parse_bool,   offsetof(unit_mnt_t, blocking),   "true" },
    4848        CONFIGURATION_ITEM_SENTINEL
    4949};
     
    195195        assert(!u_mnt->autostart || u_mnt->blocking);
    196196
    197        
    198197        assert(unit->state == STATE_STOPPED);
    199198
     
    203202        mnt_data.mountpoint = u_mnt->mountpoint;
    204203        mnt_data.device     = u_mnt->device;
    205         /* TODO use other mount parameters
     204        /*
     205         * TODO use other mount parameters
    206206         * mnt_data.options    = u_mnt->options;
    207207         * mnt_data.instance   = u_mnt->instance;
     
    235235        assert(!u_mnt->autostart || u_mnt->blocking);
    236236
    237        
    238237        // note: we should never hit STATE_STARTING, since it'd mean there are
    239238        //       two jobs running at once (unless job cancellation is implemented)
     
    284283}
    285284
    286 
    287 DEFINE_UNIT_VMT(unit_mnt)
    288 
     285DEFINE_UNIT_VMT(unit_mnt);
  • uspace/srv/sysman/units/unit_mnt.h

    r241f1985 r102f641  
    3939        char *device;
    4040
    41         /** Should be underlying units (FS server, device) be autostarted
    42          * (implies blocking) */
     41        /**
     42         * Should be underlying units (FS server, device) be autostarted
     43         * (implies blocking)
     44         */
    4345        bool autostart;
    4446
     
    5052
    5153#endif
    52 
  • uspace/srv/sysman/units/unit_svc.c

    r241f1985 r102f641  
    4040
    4141static config_item_t unit_configuration[] = {
    42         {"ExecStart", &util_parse_command, offsetof(unit_svc_t, exec_start), NULL},
     42        { "ExecStart", &util_parse_command, offsetof(unit_svc_t, exec_start), NULL },
    4343        CONFIGURATION_ITEM_SENTINEL
    4444};
     
    8282        assert(u_svc);
    8383
    84        
    8584        assert(unit->state == STATE_STOPPED);
    8685
     
    117116        assert(u_svc);
    118117
    119        
    120118        // note: May change when job cancellation is possible.
    121119        assert(unit->state == STATE_STARTED);
     
    133131
    134132        if (rc != EOK) {
    135                 /* Task may still be running, but be conservative about unit's
    136                  * state. */
     133                /*
     134                 * Task may still be running, but be conservative about unit's
     135                 * state.
     136                 */
    137137                unit->state = STATE_FAILED;
    138138                return rc;
     
    144144}
    145145
    146 
    147146static void unit_svc_exposee_created(unit_t *unit)
    148147{
    149148        assert(CAST_SVC(unit));
    150         assert(unit->state == STATE_STOPPED || unit->state == STATE_STARTING || unit->state==STATE_STARTED);
     149        assert(unit->state == STATE_STOPPED || unit->state == STATE_STARTING || unit->state == STATE_STARTED);
    151150
    152151        /* Exposee itself doesn't represent started unit. */
     
    160159}
    161160
    162 DEFINE_UNIT_VMT(unit_svc)
    163 
     161DEFINE_UNIT_VMT(unit_svc);
  • uspace/srv/sysman/units/unit_svc.h

    r241f1985 r102f641  
    5151
    5252#endif
    53 
  • uspace/srv/sysman/units/unit_tgt.c

    r241f1985 r102f641  
    8282}
    8383
    84 
    85 DEFINE_UNIT_VMT(unit_tgt)
    86 
     84DEFINE_UNIT_VMT(unit_tgt);
Note: See TracChangeset for help on using the changeset viewer.