Rename mode
clap parameter to permissions
Rename the clap parameter when creating a new message queue `mode` to `permissions`.
This commit is contained in:
parent
bcefd6241b
commit
4633b7a4d8
1 changed files with 3 additions and 3 deletions
|
@ -7,8 +7,8 @@ use std::fs;
|
|||
#[derive(Clap, Debug)]
|
||||
pub struct Create {
|
||||
/// Permissions (octal) to create the queue with
|
||||
#[clap(short = 'p', long)]
|
||||
mode: Option<String>,
|
||||
#[clap(short, long)]
|
||||
permissions: Option<String>,
|
||||
/// Maximum number of messages in the queue
|
||||
#[clap(short, long)]
|
||||
capacity: Option<usize>,
|
||||
|
@ -38,7 +38,7 @@ impl Create {
|
|||
pub fn run(&self, verbose: bool) -> Result<()> {
|
||||
let mq = &mut posixmq::OpenOptions::readonly();
|
||||
|
||||
if let Some(m) = &self.mode {
|
||||
if let Some(m) = &self.permissions {
|
||||
mq.mode(u32::from_str_radix(&m, 8)?);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue