Rename mode clap parameter to permissions

Rename the clap parameter when creating a new message queue `mode` to
`permissions`.
This commit is contained in:
finga 2021-06-22 01:36:00 +02:00
parent bcefd6241b
commit 4633b7a4d8

View file

@ -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)?);
}