clean-up
This commit is contained in:
parent
9040d85e7f
commit
e3b6cb1f25
4 changed files with 3 additions and 8 deletions
4
config.h
4
config.h
|
@ -1,4 +0,0 @@
|
||||||
// (C) 2018-2023 by Folkert van Heusden
|
|
||||||
// Released under MIT license
|
|
||||||
|
|
||||||
// #define TURBO
|
|
|
@ -57,17 +57,14 @@ std::optional<disk_backend *> select_nbd_server(console *const cnsl)
|
||||||
cnsl->flush_input();
|
cnsl->flush_input();
|
||||||
|
|
||||||
std::string hostname = cnsl->read_line("Enter hostname (or empty to abort): ");
|
std::string hostname = cnsl->read_line("Enter hostname (or empty to abort): ");
|
||||||
|
|
||||||
if (hostname.empty())
|
if (hostname.empty())
|
||||||
return { };
|
return { };
|
||||||
|
|
||||||
std::string port_str = cnsl->read_line("Enter port number (or empty to abort): ");
|
std::string port_str = cnsl->read_line("Enter port number (or empty to abort): ");
|
||||||
|
|
||||||
if (port_str.empty())
|
if (port_str.empty())
|
||||||
return { };
|
return { };
|
||||||
|
|
||||||
disk_backend *d = new disk_backend_nbd(hostname, atoi(port_str.c_str()));
|
disk_backend *d = new disk_backend_nbd(hostname, atoi(port_str.c_str()));
|
||||||
|
|
||||||
if (d->begin(false) == false) {
|
if (d->begin(false) == false) {
|
||||||
cnsl->put_string_lf("Cannot initialize NBD client");
|
cnsl->put_string_lf("Cannot initialize NBD client");
|
||||||
delete d;
|
delete d;
|
||||||
|
|
2
gen.h
2
gen.h
|
@ -3,6 +3,8 @@
|
||||||
|
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
|
// #define TURBO
|
||||||
|
|
||||||
typedef enum { EVENT_NONE = 0, EVENT_HALT, EVENT_INTERRUPT, EVENT_TERMINATE } stop_event_t;
|
typedef enum { EVENT_NONE = 0, EVENT_HALT, EVENT_INTERRUPT, EVENT_TERMINATE } stop_event_t;
|
||||||
|
|
||||||
typedef enum { DT_RK05, DT_RL02, DT_TAPE } disk_type_t;
|
typedef enum { DT_RK05, DT_RL02, DT_TAPE } disk_type_t;
|
||||||
|
|
2
log.h
2
log.h
|
@ -5,7 +5,7 @@
|
||||||
|
|
||||||
#include <string>
|
#include <string>
|
||||||
|
|
||||||
#include "config.h"
|
#include "gen.h"
|
||||||
#if defined(ESP32)
|
#if defined(ESP32)
|
||||||
#include "FvHNTP/FvHNTP.h"
|
#include "FvHNTP/FvHNTP.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
Loading…
Add table
Reference in a new issue