Changeset bb154c6 in mainline for uspace/srv/sysman/main.c


Ignore:
Timestamp:
2019-08-03T08:15:25Z (5 years ago)
Author:
Matthieu Riolo <matthieu.riolo@…>
Children:
09a8006
Parents:
6006f35
git-author:
Michal Koutný <xm.koutny+hos@…> (2015-04-15 15:14:58)
git-committer:
Matthieu Riolo <matthieu.riolo@…> (2019-08-03 08:15:25)
Message:

Add skeleton for configuration files loading

  • Create content of /cfg directory,
  • create sample configuration file,
  • refactored polymorphism.

Conflicts:

boot/Makefile

File:
1 edited

Legend:

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

    r6006f35 rbb154c6  
    3636                goto fail;
    3737        }
     38        mnt_initrd->name                 = str_dup("initrd.mnt");
    3839        // TODO Use RDFMT
    39         mnt_initrd->data.mnt.type       = str_dup("ext4fs");
    40         mnt_initrd->data.mnt.mountpoint = str_dup("/");
    41         mnt_initrd->data.mnt.device     = str_dup("bd/initrd");
     40        CAST_MNT(mnt_initrd)->type       = str_dup("ext4fs");
     41        CAST_MNT(mnt_initrd)->mountpoint = str_dup("/");
     42        CAST_MNT(mnt_initrd)->device     = str_dup("bd/initrd");
    4243
    4344        cfg_init = unit_create(UNIT_CONFIGURATION);
     
    4647                goto fail;
    4748        }
    48         cfg_init->data.cfg.path = str_dup("/cfg/");
     49        cfg_init->name           = str_dup("init.cfg");
     50        CAST_CFG(cfg_init)->path = str_dup("/cfg/sysman");
    4951       
    5052        tgt_default = unit_create(UNIT_TARGET);
     
    5355                goto fail;
    5456        }
     57        tgt_default->name = str_dup("default.tgt");
    5558       
    5659
     
    5861         * Add units to configuration and start the default target.
    5962         */
     63        configuration_start_update();
     64
    6065        configuration_add_unit(mnt_initrd);
    6166        configuration_add_unit(cfg_init);
Note: See TracChangeset for help on using the changeset viewer.