mirror of
https://github.com/RGBCube/uutils-coreutils
synced 2025-07-28 11:37:44 +00:00
Add default filename static.
This commit is contained in:
parent
bc11734557
commit
d20d119416
1 changed files with 3 additions and 1 deletions
|
@ -24,6 +24,8 @@ use std::ptr;
|
||||||
use std::str;
|
use std::str;
|
||||||
use extra::getopts::groups;
|
use extra::getopts::groups;
|
||||||
|
|
||||||
|
static DEFAULT_FILE: &'static str = "/var/run/utmp";
|
||||||
|
|
||||||
static UT_LINESIZE: uint = 32;
|
static UT_LINESIZE: uint = 32;
|
||||||
static UT_NAMESIZE: uint = 32;
|
static UT_NAMESIZE: uint = 32;
|
||||||
static UT_HOSTSIZE: uint = 256;
|
static UT_HOSTSIZE: uint = 256;
|
||||||
|
@ -101,7 +103,7 @@ fn main() {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
let mut filename = "/var/run/utmp";
|
let mut filename = DEFAULT_FILE;
|
||||||
if matches.free.len() > 0 {
|
if matches.free.len() > 0 {
|
||||||
filename = matches.free[0].as_slice();
|
filename = matches.free[0].as_slice();
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue