hru(1), fop(1): changed to reflect strerror changes
This commit is contained in:
parent
1891c3e1aa
commit
d87b5d0958
@ -27,7 +27,7 @@ extern crate strerror;
|
||||
extern crate sysexits;
|
||||
|
||||
use getopt::{ Opt, Parser };
|
||||
use strerror::raw_message;
|
||||
use strerror::StrError;
|
||||
use sysexits::{ EX_DATAERR, EX_IOERR, EX_UNAVAILABLE, EX_USAGE };
|
||||
|
||||
fn main() {
|
||||
@ -77,7 +77,7 @@ fn main() {
|
||||
.stdout(Stdio::piped())
|
||||
.spawn()
|
||||
.unwrap_or_else( |e| {
|
||||
eprintln!("{}: {}: {}", argv[0], argv[command_arg], raw_message(e));
|
||||
eprintln!("{}: {}: {}", argv[0], argv[command_arg], e.strerror());
|
||||
exit(EX_UNAVAILABLE);
|
||||
});
|
||||
|
||||
@ -96,7 +96,7 @@ fn main() {
|
||||
}
|
||||
|
||||
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);
|
||||
});
|
||||
|
||||
@ -114,7 +114,7 @@ fn main() {
|
||||
stdout().write_all(
|
||||
fields.join(&d.to_string()).as_bytes()
|
||||
).unwrap_or_else(|e| {
|
||||
eprintln!("{}: {}", argv[0], raw_message(e));
|
||||
eprintln!("{}: {}", argv[0], e.strerror());
|
||||
exit(EX_IOERR);
|
||||
});
|
||||
}
|
||||
|
@ -26,7 +26,7 @@ use std::{
|
||||
extern crate strerror;
|
||||
extern crate sysexits;
|
||||
|
||||
use strerror::raw_message;
|
||||
use strerror::StrError;
|
||||
use sysexits::{ EX_DATAERR, EX_IOERR, EX_SOFTWARE };
|
||||
|
||||
const LIST: [(u32, &str); 10] = [
|
||||
@ -100,7 +100,7 @@ fn main() -> ExitCode {
|
||||
|
||||
stdout().write_all(format!("{} {}\n", out, si_prefix).as_bytes())
|
||||
.unwrap_or_else(|e| {
|
||||
eprintln!("{}: {}", argv[0], raw_message(e));
|
||||
eprintln!("{}: {}", argv[0], e.strerror());
|
||||
exit(EX_IOERR);
|
||||
});
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user