Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions src/uu/mknod/src/mknod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ pub struct Config<'a> {
pub context: Option<&'a String>,
}

fn _mknod(file_name: &str, config: Config) -> i32 {
fn mknod(file_name: &str, config: Config) -> i32 {
let c_str = CString::new(file_name).expect("Failed to convert to CString");

// the user supplied a mode
Expand Down Expand Up @@ -127,7 +127,7 @@ pub fn uumain(args: impl uucore::Args) -> UResult<()> {
))
} else {
config.mode = S_IFIFO | mode;
let exit_code = _mknod(file_name, config);
let exit_code = mknod(file_name, config);
set_exit_code(exit_code);
Ok(())
}
Expand All @@ -146,11 +146,11 @@ pub fn uumain(args: impl uucore::Args) -> UResult<()> {
let exit_code = match file_type {
FileType::Block => {
config.mode |= S_IFBLK;
_mknod(file_name, config)
mknod(file_name, config)
}
FileType::Character => {
config.mode |= S_IFCHR;
_mknod(file_name, config)
mknod(file_name, config)
}
FileType::Fifo => {
unreachable!("file_type was validated to be only block or character")
Expand Down
Loading