mirror of
https://github.com/TES3MP/openmw-tes3mp.git
synced 2025-01-20 02:23:51 +00:00
Changed crashcatcher's uname system info retrieval and cleaned indentation
This commit is contained in:
parent
356b53bd22
commit
92234cf783
1 changed files with 302 additions and 297 deletions
|
@ -6,6 +6,7 @@
|
||||||
#include <sys/wait.h>
|
#include <sys/wait.h>
|
||||||
#include <sys/param.h>
|
#include <sys/param.h>
|
||||||
#include <sys/ucontext.h>
|
#include <sys/ucontext.h>
|
||||||
|
#include <sys/utsname.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include <errno.h>
|
#include <errno.h>
|
||||||
#include <limits.h>
|
#include <limits.h>
|
||||||
|
@ -175,13 +176,17 @@ static void gdb_info(pid_t pid)
|
||||||
static void sys_info(void)
|
static void sys_info(void)
|
||||||
{
|
{
|
||||||
#ifdef __unix__
|
#ifdef __unix__
|
||||||
system("echo \"System: `uname -a`\"");
|
struct utsname info;
|
||||||
putchar('\n');
|
if(!uname(&info))
|
||||||
|
printf("!!! Failed to get system information\n");
|
||||||
|
else
|
||||||
|
printf("System: %s %s %s %s %s\n",
|
||||||
|
info.sysname, info.nodename, info.release, info.version, info.machine);
|
||||||
|
|
||||||
fflush(stdout);
|
fflush(stdout);
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
static size_t safe_write(int fd, const void *buf, size_t len)
|
static size_t safe_write(int fd, const void *buf, size_t len)
|
||||||
{
|
{
|
||||||
size_t ret = 0;
|
size_t ret = 0;
|
||||||
|
|
Loading…
Reference in a new issue