File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1717
1818#include " ws_uplink.hpp"
1919#include " common.hpp"
20-
21- #include < net/autoconf.hpp>
2220#include < os>
2321
2422namespace uplink {
@@ -37,8 +35,6 @@ void setup_uplink()
3735 MYINFO (" Setting up WS uplink" );
3836
3937 try {
40- net::autoconf::load ();
41-
4238 auto & en0 = net::Super_stack::get<net::IP4>(0 );
4339
4440 uplink = std::make_unique<WS_uplink>(en0);
Original file line number Diff line number Diff line change @@ -10,7 +10,7 @@ include($ENV{INCLUDEOS_PREFIX}/includeos/pre.service.cmake)
1010
1111
1212# Name of your project
13- project (seed )
13+ project (starbase )
1414
1515# Human-readable name of your service
1616set (SERVICE_NAME "IncludeOS Starbase" )
@@ -39,16 +39,13 @@ set(SOURCES
3939# DRIVERS / PLUGINS:
4040
4141set (DRIVERS
42- virtionet # Virtio networking
42+ virtionet
4343 vmxnet3
44- # virtioblock # Virtio block device
45- # ... Others from IncludeOS/src/drivers
4644 )
4745
4846set (PLUGINS
49- # syslogd # Syslog over UDP
50- # ...others
5147 uplink
48+ autoconf
5249 )
5350
5451# THIRD PARTY LIBRARIES:
File renamed without changes.
Original file line number Diff line number Diff line change 1818#include " ws_uplink.hpp"
1919#include " common.hpp"
2020
21- #include < memdisk>
22-
2321#ifndef RAPIDJSON_HAS_STDSTRING
2422 #define RAPIDJSON_HAS_STDSTRING 1
2523#endif
3735#include < hw/pci_device.hpp>
3836#include < kernel/cpuid.hpp>
3937#include < statman>
38+ #include < config>
4039
4140namespace uplink {
4241
@@ -264,24 +263,13 @@ namespace uplink {
264263
265264 void WS_uplink::read_config ()
266265 {
267- MYINFO (" Reading uplink config from %s" , UPLINK_CFG_FILE.c_str ());
268- auto & disk = fs::memdisk ();
269-
270- if (not disk.fs_ready ())
271- {
272- disk.init_fs ([] (auto err, auto &) {
273- Expects (not err && " Error occured when mounting FS." );
274- });
275- }
276-
277- auto cfg = disk.fs ().stat (UPLINK_CFG_FILE); // name hardcoded for now
266+ MYINFO (" Reading uplink config" );
278267
279- Expects (cfg.is_file () && " File not found." );
280- Expects (cfg.size () && " File is empty." );
268+ const auto & cfg = ::Config::get ();
281269
282- auto content = cfg.read ( );
270+ Expects ( not cfg.empty () && " Config is empty " );
283271
284- parse_config (content );
272+ parse_config ({cfg. data (), cfg. size ()} );
285273 }
286274
287275 void WS_uplink::parse_config (const std::string& json)
You can’t perform that action at this time.
0 commit comments