if (acpiDevs.isEmpty()) {
out.println("No ACPI devices are registered");
exit(1);
} else {
for (Device dev : acpiDevs) {
final AcpiAPI api = dev.getAPI(AcpiAPI.class);
if (FLAG_DUMP.isSet()) {
api.dump(new PrintWriter(out));
} else if (FLAG_BATTERY.isSet()) {
// TODO fix this
out.println("The '--battery' option is temporary disabled");
//api.dumpBattery();
} else {
out.println(api.toDetailedString());
}
}
}
}