return MMConfig(base, end_bus)
-if (
- (options.generate_collector is False) and (options.root is '/')
- and (os.geteuid() is not 0)
-):
- print('ERROR: You have to be root to work on "/"!', file=sys.stderr)
- sys.exit(1)
-
def get_cpu_vendor():
with input_open('/proc/cpuinfo', 'r') as f:
for line in f:
return value.strip()
+if (
+ (options.generate_collector is False) and (options.root is '/')
+ and (os.geteuid() is not 0)
+):
+ print('ERROR: You have to be root to work on "/"!', file=sys.stderr)
+ sys.exit(1)
+
+jh_enabled = input_readline('/sys/devices/jailhouse/enabled',
+ True).rstrip()
+if options.generate_collector is False and jh_enabled == '1':
+ print('ERROR: Jailhouse was enabled when collecting input files! '
+ 'Disable jailhouse and try again.',
+ file=sys.stderr)
+ sys.exit(1)
+
(pcidevices, pcicaps) = parse_pcidevices()
product = [input_readline('/sys/class/dmi/id/sys_vendor',
pm_timer_base = parse_ioports()
-jh_enabled = input_readline('/sys/devices/jailhouse/enabled',
- True).rstrip()
-if options.generate_collector is False and jh_enabled == '1':
- print('ERROR: Jailhouse was enabled when collecting input files! '
- 'Disable jailhouse and try again.',
- file=sys.stderr)
- sys.exit(1)
-
f = open(options.file, 'w')
if options.generate_collector: