1
0
forked from bonsai/harakit

hru(1), fop(1): changed to reflect strerror changes

This commit is contained in:
Emma Tebibyte 2024-03-18 21:31:25 -06:00
parent 1891c3e1aa
commit d87b5d0958
Signed by untrusted user: emma
GPG Key ID: 06FA419A1698C270
2 changed files with 6 additions and 6 deletions

View File

@ -27,7 +27,7 @@ extern crate strerror;
extern crate sysexits; extern crate sysexits;
use getopt::{ Opt, Parser }; use getopt::{ Opt, Parser };
use strerror::raw_message; use strerror::StrError;
use sysexits::{ EX_DATAERR, EX_IOERR, EX_UNAVAILABLE, EX_USAGE }; use sysexits::{ EX_DATAERR, EX_IOERR, EX_UNAVAILABLE, EX_USAGE };
fn main() { fn main() {
@ -77,7 +77,7 @@ fn main() {
.stdout(Stdio::piped()) .stdout(Stdio::piped())
.spawn() .spawn()
.unwrap_or_else( |e| { .unwrap_or_else( |e| {
eprintln!("{}: {}: {}", argv[0], argv[command_arg], raw_message(e)); eprintln!("{}: {}: {}", argv[0], argv[command_arg], e.strerror());
exit(EX_UNAVAILABLE); exit(EX_UNAVAILABLE);
}); });
@ -96,7 +96,7 @@ fn main() {
} }
let output = spawned.wait_with_output().unwrap_or_else(|e| { let output = spawned.wait_with_output().unwrap_or_else(|e| {
eprintln!("{}: {}: {}", argv[0], argv[command_arg], raw_message(e)); eprintln!("{}: {}: {}", argv[0], argv[command_arg], e.strerror());
exit(EX_IOERR); exit(EX_IOERR);
}); });
@ -114,7 +114,7 @@ fn main() {
stdout().write_all( stdout().write_all(
fields.join(&d.to_string()).as_bytes() fields.join(&d.to_string()).as_bytes()
).unwrap_or_else(|e| { ).unwrap_or_else(|e| {
eprintln!("{}: {}", argv[0], raw_message(e)); eprintln!("{}: {}", argv[0], e.strerror());
exit(EX_IOERR); exit(EX_IOERR);
}); });
} }

View File

@ -26,7 +26,7 @@ use std::{
extern crate strerror; extern crate strerror;
extern crate sysexits; extern crate sysexits;
use strerror::raw_message; use strerror::StrError;
use sysexits::{ EX_DATAERR, EX_IOERR, EX_SOFTWARE }; use sysexits::{ EX_DATAERR, EX_IOERR, EX_SOFTWARE };
const LIST: [(u32, &str); 10] = [ const LIST: [(u32, &str); 10] = [
@ -100,7 +100,7 @@ fn main() -> ExitCode {
stdout().write_all(format!("{} {}\n", out, si_prefix).as_bytes()) stdout().write_all(format!("{} {}\n", out, si_prefix).as_bytes())
.unwrap_or_else(|e| { .unwrap_or_else(|e| {
eprintln!("{}: {}", argv[0], raw_message(e)); eprintln!("{}: {}", argv[0], e.strerror());
exit(EX_IOERR); exit(EX_IOERR);
}); });
} }