aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRoy Marples <roy@marples.name>2007-05-23 12:30:34 +0000
committerRoy Marples <roy@marples.name>2007-05-23 12:30:34 +0000
commitf754cfd2a936d8ccc13839f9ecdefc663bf746f6 (patch)
treea6ab651b124986068dc4674ee6854dfa60293d6b
parent64e6dcfc9f46d4e352a908104718a0ca225efaea (diff)
RC_SYS should now set XEN0 correctly
-rw-r--r--src/librc-misc.c12
1 files changed, 7 insertions, 5 deletions
diff --git a/src/librc-misc.c b/src/librc-misc.c
index ecb403a0..f527ef11 100644
--- a/src/librc-misc.c
+++ b/src/librc-misc.c
@@ -677,13 +677,15 @@ char **rc_config_env (char **env)
if (file_regex ("/proc/xen/capabilities", "control_d"))
snprintf (sys, sizeof (sys), "XENU");
}
- if (! sys)
+ if (! sys[0])
snprintf (sys, sizeof (sys), "XEN0");
- } else if (file_regex ("/proc/cpuinfo", "UML"))
+ } else if (file_regex ("/proc/cpuinfo", "UML")) {
snprintf (sys, sizeof (sys), "UML");
- else if (file_regex ("/proc/self/status",
- "(s_context|VxID|envID):[[:space:]]*[1-9]"))
- snprintf (sys, sizeof (sys), "VPS");
+ } else if (file_regex ("/proc/self/status",
+ "(s_context|VxID|envID):[[:space:]]*[1-9]"))
+ {
+ snprintf (sys, sizeof (sys), "VPS");
+ }
#endif
/* Only add a NET_FS list if not defined */