mirror of
https://github.com/TES3MP/openmw-tes3mp.git
synced 2025-01-19 20:53:50 +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/param.h>
|
||||
#include <sys/ucontext.h>
|
||||
#include <sys/utsname.h>
|
||||
#include <string.h>
|
||||
#include <errno.h>
|
||||
#include <limits.h>
|
||||
|
@ -175,13 +176,17 @@ static void gdb_info(pid_t pid)
|
|||
static void sys_info(void)
|
||||
{
|
||||
#ifdef __unix__
|
||||
system("echo \"System: `uname -a`\"");
|
||||
putchar('\n');
|
||||
struct utsname info;
|
||||
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);
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
static size_t safe_write(int fd, const void *buf, size_t len)
|
||||
{
|
||||
size_t ret = 0;
|
||||
|
|
Loading…
Reference in a new issue