- if (get_eligible_leaves(&limiter.stable_instance)) {
- printlog(LOG_CRITICAL, "Failed to read eligigle leaves.\n");
- return false;
+ /* If no leaves are specified, assume we're on planetlab and read them out
+ * of /proc/virtual. Otherwise, read the specified line. */
+ if (!strncmp(leaves.u.string, "PLANETLAB", 9)) {
+ if (get_eligible_leaves(&limiter.stable_instance)) {
+ printlog(LOG_CRITICAL, "Failed to read eligigle leaves.\n");
+ return false;
+ }
+ } else {
+ if (parse_leaves(&limiter.stable_instance, leaves.u.string)) {
+ printlog(LOG_CRITICAL, "Failed to parse leaf string.\n");
+ return false;
+ }