mirror of
https://github.com/RGBCube/uutils-coreutils
synced 2025-07-31 13:07:46 +00:00
Added UResult for hostid
This commit is contained in:
parent
330db2eb3e
commit
f66f10c4ed
1 changed files with 4 additions and 2 deletions
|
@ -12,6 +12,7 @@ extern crate uucore;
|
|||
|
||||
use clap::{crate_version, App};
|
||||
use libc::c_long;
|
||||
use uucore::error::UResult;
|
||||
|
||||
static SYNTAX: &str = "[options]";
|
||||
|
||||
|
@ -20,10 +21,11 @@ extern "C" {
|
|||
pub fn gethostid() -> c_long;
|
||||
}
|
||||
|
||||
pub fn uumain(args: impl uucore::Args) -> i32 {
|
||||
#[uucore_procs::gen_uumain]
|
||||
pub fn uumain(args: impl uucore::Args) -> UResult<()> {
|
||||
uu_app().get_matches_from(args);
|
||||
hostid();
|
||||
0
|
||||
Ok(())
|
||||
}
|
||||
|
||||
pub fn uu_app() -> App<'static, 'static> {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue