mirror of
https://github.com/aaru-dps/aaruremote.git
synced 2025-12-16 19:24:37 +00:00
Print system version.
This commit is contained in:
12
main.c
12
main.c
@@ -22,6 +22,7 @@
|
||||
#include <libnet.h>
|
||||
#include <netinet/in.h>
|
||||
#include <stdio.h>
|
||||
#include <sys/utsname.h>
|
||||
|
||||
int main()
|
||||
{
|
||||
@@ -32,10 +33,21 @@ int main()
|
||||
int sockfd, cli_sock;
|
||||
struct sockaddr_in serv_addr, cli_addr;
|
||||
socklen_t cli_len;
|
||||
struct utsname utsname;
|
||||
|
||||
printf("DiscImageChef Remote Server %s\n", DICMOTE_VERSION);
|
||||
printf("Copyright (C) 2019 Natalia Portillo\n");
|
||||
|
||||
ret = uname(&utsname);
|
||||
|
||||
if(ret)
|
||||
{
|
||||
printf("Error %d getting system version.\n", errno);
|
||||
return 1;
|
||||
}
|
||||
|
||||
printf("Running under %s %s (%s).\n", utsname.sysname, utsname.release, utsname.machine);
|
||||
|
||||
ret = getifaddrs(&ifa);
|
||||
|
||||
if(ret)
|
||||
|
||||
Reference in New Issue
Block a user