diff options
-rw-r--r-- | loader/loader.c | 11 | ||||
-rw-r--r-- | loader/loader.h | 3 |
2 files changed, 11 insertions, 3 deletions
diff --git a/loader/loader.c b/loader/loader.c index af83effde..575aa7fee 100644 --- a/loader/loader.c +++ b/loader/loader.c @@ -1121,6 +1121,11 @@ static void parseCmdLineFlags(struct loaderData_s * loaderData, flags |= LOADER_FLAGS_GRAPHICAL; } + if (!strncasecmp(argv[i], "syslog", 6)) { + logMessage(INFO, "early networking required for syslog"); + flags |= LOADER_FLAGS_EARLY_NETWORKING; + } + if (!strncasecmp(argv[i], "vesa", 4)) { if (asprintf(&extraArgs[numExtraArgs], "--xdriver=vesa") == -1) { @@ -1377,7 +1382,8 @@ static char *doLoaderMain(struct loaderData_s *loaderData, } case STEP_DRIVER: { - if (class == -1 || haveDeviceOfType(class)) { + if ((FL_EARLY_NETWORKING(flags) && haveDeviceOfType(DEVICE_NETWORK)) || + (class == -1 || haveDeviceOfType(class))) { step = STEP_NETWORK; dir = 1; class = -1; @@ -1437,7 +1443,8 @@ static char *doLoaderMain(struct loaderData_s *loaderData, case STEP_NETWORK: { if ((installMethods[validMethods[loaderData->method]].type != DEVICE_NETWORK) && (!hasGraphicalOverride()) && - !FL_ASKNETWORK(flags)) { + !FL_ASKNETWORK(flags) && + !FL_EARLY_NETWORKING(flags)) { needsNetwork = 0; if (dir == 1) step = STEP_STAGE2; diff --git a/loader/loader.h b/loader/loader.h index 96190710f..a6e2d057c 100644 --- a/loader/loader.h +++ b/loader/loader.h @@ -36,7 +36,7 @@ #define LOADER_FLAGS_POWEROFF (((uint64_t) 1) << 6) #define LOADER_FLAGS_NOPROBE (((uint64_t) 1) << 7) #define LOADER_FLAGS_MODDISK (((uint64_t) 1) << 8) -/* #9 is the most delicious of all flags, also available for use */ +#define LOADER_FLAGS_EARLY_NETWORKING (((uint64_t) 1) << 9) #define LOADER_FLAGS_SERIAL (((uint64_t) 1) << 10) #define LOADER_FLAGS_UPDATES (((uint64_t) 1) << 11) #define LOADER_FLAGS_KSFILE (((uint64_t) 1) << 12) @@ -77,6 +77,7 @@ #define FL_POWEROFF(a) ((a) & LOADER_FLAGS_POWEROFF) #define FL_NOPROBE(a) ((a) & LOADER_FLAGS_NOPROBE) #define FL_MODDISK(a) ((a) & LOADER_FLAGS_MODDISK) +#define FL_EARLY_NETWORKING(a) ((a) & LOADER_FLAGS_EARLY_NETWORKING) #define FL_SERIAL(a) ((a) & LOADER_FLAGS_SERIAL) #define FL_UPDATES(a) ((a) & LOADER_FLAGS_UPDATES) #define FL_KSFILE(a) ((a) & LOADER_FLAGS_KSFILE) |