From f66f10c4ede2a65a33ab7c4513377adb1ef69299 Mon Sep 17 00:00:00 2001 From: 353fc443 <353fc443@pm.me> Date: Fri, 2 Jul 2021 12:03:14 +0000 Subject: [PATCH] Added UResult for hostid --- src/uu/hostid/src/hostid.rs | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/uu/hostid/src/hostid.rs b/src/uu/hostid/src/hostid.rs index e9fc08379..b0f68968d 100644 --- a/src/uu/hostid/src/hostid.rs +++ b/src/uu/hostid/src/hostid.rs @@ -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> {