| … | |
… | |
| 693 | fp = fopen ("/proc/xen/capabilities", "r"); |
693 | fp = fopen ("/proc/xen/capabilities", "r"); |
| 694 | if (fp) |
694 | if (fp) |
| 695 | { |
695 | { |
| 696 | fclose (fp); |
696 | fclose (fp); |
| 697 | if (file_regex ("/proc/xen/capabilities", "control_d")) |
697 | if (file_regex ("/proc/xen/capabilities", "control_d")) |
| 698 | sprintf (sys, "XENU"); |
698 | snprintf (sys, sizeof (sys), "XENU"); |
| 699 | } |
699 | } |
| 700 | if (! sys) |
700 | if (! sys) |
| 701 | sprintf (sys, "XEN0"); |
701 | snprintf (sys, sizeof (sys), "XEN0"); |
| 702 | } |
702 | } |
| 703 | else if (file_regex ("/proc/cpuinfo", "UML")) |
703 | else if (file_regex ("/proc/cpuinfo", "UML")) |
| 704 | sprintf (sys, "UML"); |
704 | snprintf (sys, sizeof (sys), "UML"); |
| 705 | else if (file_regex ("/proc/self/status", |
705 | else if (file_regex ("/proc/self/status", |
| 706 | "(s_context|VxID|envID):[[:space:]]*[1-9]")) |
706 | "(s_context|VxID|envID):[[:space:]]*[1-9]")) |
| 707 | sprintf(sys, "VPS"); |
707 | snprintf (sys, sizeof (sys), "VPS"); |
| 708 | #endif |
708 | #endif |
| 709 | |
709 | |
| 710 | /* Only add a NET_FS list if not defined */ |
710 | /* Only add a NET_FS list if not defined */ |
| 711 | STRLIST_FOREACH (env, line, i) |
711 | STRLIST_FOREACH (env, line, i) |
| 712 | if (strncmp (line, "RC_NET_FS_LIST=", strlen ("RC_NET_FS_LIST=")) == 0) |
712 | if (strncmp (line, "RC_NET_FS_LIST=", strlen ("RC_NET_FS_LIST=")) == 0) |