Added host info for freebsd, fixed 104
This commit is contained in:
parent
8a576e5e02
commit
9d6f99d2e9
1 changed files with 6 additions and 0 deletions
|
@ -405,6 +405,12 @@ void get_info()
|
||||||
#endif
|
#endif
|
||||||
FILE *host_model_info = fopen("/sys/devices/virtual/dmi/id/board_name", "r");
|
FILE *host_model_info = fopen("/sys/devices/virtual/dmi/id/board_name", "r");
|
||||||
if (!host_model_info) host_model_info = fopen("/sys/devices/virtual/dmi/id/product_name", "r");
|
if (!host_model_info) host_model_info = fopen("/sys/devices/virtual/dmi/id/product_name", "r");
|
||||||
|
#ifdef __FREEBSD__
|
||||||
|
host_model_info = popen("sysctl -a hw.hv_vendor", "r");
|
||||||
|
while (fgets(line, sizeof(line), host_model_info))
|
||||||
|
if (sscanf(line, "hw.hv_vendor: %[^\n]", host_model))
|
||||||
|
break;
|
||||||
|
#endif
|
||||||
FILE *host_model_version = fopen("/sys/devices/virtual/dmi/id/product_version", "r");
|
FILE *host_model_version = fopen("/sys/devices/virtual/dmi/id/product_version", "r");
|
||||||
#ifdef __CYGWIN__
|
#ifdef __CYGWIN__
|
||||||
iscygwin = 1;
|
iscygwin = 1;
|
||||||
|
|
Loading…
Reference in a new issue