This commit is contained in:
folkert van heusden 2024-05-13 19:38:04 +02:00
parent 9040d85e7f
commit e3b6cb1f25
Signed by untrusted user who does not match committer: folkert
GPG key ID: 6B6455EDFEED3BD1
4 changed files with 3 additions and 8 deletions

View file

@ -1,4 +0,0 @@
// (C) 2018-2023 by Folkert van Heusden
// Released under MIT license
// #define TURBO

View file

@ -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
View file

@ -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
View file

@ -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