@@ 44,7 44,7 @@ export fn main() void = {
if (op == operation::QUERY) {
if (len(cmd.args) != 0) {
- getopt::printhelp(os::stderr, "powerctl", help...);
+ getopt::printhelp(os::stderr, "powerctl", help...)!;
os::exit(1);
};
@@ 64,7 64,7 @@ export fn main() void = {
};
if (len(cmd.args) != 1) {
- getopt::printhelp(os::stderr, "powerctl", help...);
+ getopt::printhelp(os::stderr, "powerctl", help...)!;
os::exit(1);
};
@@ 76,7 76,7 @@ export fn main() void = {
case let state: disk_state =>
yield state;
case errors::invalid =>
- getopt::printhelp(os::stderr, "powerctl", help...);
+ getopt::printhelp(os::stderr, "powerctl", help...)!;
os::exit(1);
};
const result = set_disk_state(state);
@@ 95,7 95,7 @@ export fn main() void = {
case let state: mem_state =>
yield state;
case errors::invalid =>
- getopt::printhelp(os::stderr, "powerctl", help...);
+ getopt::printhelp(os::stderr, "powerctl", help...)!;
os::exit(1);
};
const result = set_mem_state(state);
@@ 105,7 105,7 @@ export fn main() void = {
case let state: sleep_state =>
yield state;
case errors::invalid =>
- getopt::printhelp(os::stderr, "powerctl", help...);
+ getopt::printhelp(os::stderr, "powerctl", help...)!;
os::exit(1);
};
const result = set_sleep_state(state);
@@ 46,7 46,7 @@ fn read_states(path: str) (strings::tokenizer | fs::error | io::error) = {
};
fn write_sysfs_file(path: str, content: str) (void | fs::error | io::error) = {
- const file = os::open(path, fs::flags::WRONLY | fs::flags::TRUNC)?;
+ const file = os::open(path, fs::flag::WRONLY | fs::flag::TRUNC)?;
defer io::close(file)!;
io::write(file, strings::toutf8(content))?;
};