version 1.22, 2025/04/13 04:22:43
|
version 1.23, 2025/04/17 14:34:27
|
Line 24
|
Line 24
|
* along with FreeM. If not, see <https://www.gnu.org/licenses/>. |
* along with FreeM. If not, see <https://www.gnu.org/licenses/>. |
* |
* |
* $Log$ |
* $Log$ |
|
* Revision 1.23 2025/04/17 14:34:27 snw |
|
* Further logging improvements |
|
* |
* Revision 1.22 2025/04/13 04:22:43 snw |
* Revision 1.22 2025/04/13 04:22:43 snw |
* Fix snprintf calls |
* Fix snprintf calls |
* |
* |
Line 97
|
Line 100
|
#include "mpsdef.h" |
#include "mpsdef.h" |
#include "journal.h" |
#include "journal.h" |
#include "global_bltin.h" |
#include "global_bltin.h" |
|
#include "log.h" |
|
|
global_handle *global_handles_head; |
global_handle *global_handles_head; |
unsigned long gbl_cache_misses = 0; |
unsigned long gbl_cache_misses = 0; |
Line 437 short gbl_open(global_handle *g, short a
|
Line 441 short gbl_open(global_handle *g, short a
|
switch (result) { |
switch (result) { |
|
|
case GBL_HDR_BADMAGIC: |
case GBL_HDR_BADMAGIC: |
fprintf (stderr, "gbl_open: bad magic value in %s [FATAL]\n", g->global_name); |
logprintf (FM_LOG_FATAL, "gbl_open: bad magic value in %s", g->global_name); |
exit (1); |
|
break; |
break; |
|
|
case GBL_HDR_BADVERSION: |
case GBL_HDR_BADVERSION: |
fprintf (stderr, "gbl_open: global version is %d in %s (must be %d) [FATAL]\n", g->header.format_version, g->global_name, GBL_FORMAT_VERSION); |
logprintf (FM_LOG_FATAL, "gbl_open: global version is %d in %s (must be %d)", g->header.format_version, g->global_name, GBL_FORMAT_VERSION); |
exit (1); |
|
break; |
break; |
|
|
} |
} |
Line 3606 void close_all_globals (void)
|
Line 3608 void close_all_globals (void)
|
gbl_close_all (); |
gbl_close_all (); |
|
|
return; |
return; |
} /* end close_all_globals() */ |
} /* close_all_globals() */ |
|
|
static void panic (void) |
static void panic (void) |
{ |
{ |
printf ("write failed\r\n"); |
logprintf (FM_LOG_ERROR, "global_bltin: could not write to full disk"); |
|
|
printf ("\033[s\033[25H\033[5;7mwrite needs more disk space immediately\007"); |
|
sleep (1); |
|
printf ("\033[m\007\033[2K\033[u"); |
|
|
|
/* restore screen 'cause system messed up screen */ |
|
|
|
#ifdef NOWRITEM |
|
|
|
write_m ("\033[4~\201"); |
|
|
|
#endif /* NOWRITEM */ |
|
|
|
return; |
return; |
|
} /* panic() */ |
} /* end panic() */ |
|
|
|
|
|
void gbl_dump_stat(void) |
void gbl_dump_stat(void) |