follow-up tweaking for missing sysconf --showpaths

This commit is contained in:
nhmall
2024-12-23 00:16:52 -05:00
parent 1746f57f37
commit 1a6847ca15
+12 -4
View File
@@ -4565,6 +4565,7 @@ debugcore(const char *filename, boolean wildcards)
void void
reveal_paths(int code) reveal_paths(int code)
{ {
boolean skip_sysopt = FALSE;
const char *fqn, *nodumpreason, const char *fqn, *nodumpreason,
*sysconffile = "system configuration file"; *sysconffile = "system configuration file";
@@ -4617,6 +4618,7 @@ reveal_paths(int code)
if (code == 1) { if (code == 1) {
raw_printf("NOTE: The %s above is missing or inaccessible!", raw_printf("NOTE: The %s above is missing or inaccessible!",
sysconffile); sysconffile);
skip_sysopt = TRUE;
} }
#else /* !SYSCF */ #else /* !SYSCF */
raw_printf("No system configuration file."); raw_printf("No system configuration file.");
@@ -4690,17 +4692,20 @@ reveal_paths(int code)
/* dumplog */ /* dumplog */
fqn = (char *) 0;
#ifndef DUMPLOG #ifndef DUMPLOG
nodumpreason = "not supported"; nodumpreason = "not supported";
#else #else
nodumpreason = "disabled"; nodumpreason = "disabled";
#ifdef SYSCF #ifdef SYSCF
if (!skip_sysopt) {
fqn = sysopt.dumplogfile; fqn = sysopt.dumplogfile;
} else {
nodumpreason = "dumplogfile setting unavailable from missing sysconf";
}
#else /* !SYSCF */ #else /* !SYSCF */
#ifdef DUMPLOG_FILE #ifdef DUMPLOG_FILE
fqn = DUMPLOG_FILE; fqn = DUMPLOG_FILE;
#else
fqn = (char *) 0;
#endif #endif
#endif /* ?SYSCF */ #endif /* ?SYSCF */
if (fqn && *fqn) { if (fqn && *fqn) {
@@ -4708,11 +4713,13 @@ reveal_paths(int code)
(void) dump_fmtstr(fqn, buf, FALSE); (void) dump_fmtstr(fqn, buf, FALSE);
buf[sizeof buf - sizeof " \"\""] = '\0'; buf[sizeof buf - sizeof " \"\""] = '\0';
raw_printf(" \"%s\"", buf); raw_printf(" \"%s\"", buf);
} else } else {
raw_printf("No end-of-game disclosure file (%s)", nodumpreason);
}
#endif /* ?DUMPLOG */ #endif /* ?DUMPLOG */
raw_printf("No end-of-game disclosure file (%s).", nodumpreason);
#ifdef WIN32 #ifdef WIN32
if (!skip_sysopt) {
if (sysopt.portable_device_paths) { if (sysopt.portable_device_paths) {
const char *pd = get_portable_device(); const char *pd = get_portable_device();
@@ -4724,6 +4731,7 @@ reveal_paths(int code)
raw_printf(" \"%s\"", pd); raw_printf(" \"%s\"", pd);
} }
} }
}
#endif #endif
/* personal configuration file */ /* personal configuration file */