diff options
author | Robin Krahl <robin.krahl@ireas.org> | 2020-09-09 13:03:44 +0200 |
---|---|---|
committer | Daniel Mueller <deso@posteo.net> | 2021-01-10 17:37:57 -0800 |
commit | b39663bf381cbc1079fed08fbd3d0fe665151e90 (patch) | |
tree | c603d17f1cee7d536b55297f683e4628781ee99b | |
parent | 9593dfd03a6ca085d649ca090b6ec5e5f0104e78 (diff) | |
download | nitrocli-b39663bf381cbc1079fed08fbd3d0fe665151e90.tar.gz nitrocli-b39663bf381cbc1079fed08fbd3d0fe665151e90.tar.bz2 |
Rename device path to USB path in list output
For consistency with the --usb-path option, this path renames the device
path column in the output of the list command to USB path.
-rw-r--r-- | doc/nitrocli.1 | 4 | ||||
-rw-r--r-- | doc/nitrocli.1.pdf | bin | 42218 -> 42203 bytes | |||
-rw-r--r-- | src/commands.rs | 2 | ||||
-rw-r--r-- | src/tests/list.rs | 2 |
4 files changed, 4 insertions, 4 deletions
diff --git a/doc/nitrocli.1 b/doc/nitrocli.1 index 2d1e564..6fb1fd9 100644 --- a/doc/nitrocli.1 +++ b/doc/nitrocli.1 @@ -59,8 +59,8 @@ Print the nitrocli version and exit. .TP .B nitrocli list \fR[\fB-n\fR|\fB\-\-no-connect\fR] List all attached Nitrokey devices. -This command prints a list of the device path, the model and the serial number -of all attached Nitrokey devices. +This command prints a list of the USB path, the model and the serial number of +all attached Nitrokey devices. To access the serial number of a Nitrokey Storage device, \fBnitrocli\fR has to connect to it. To omit the serial number of Nitrokey Storage devices instead of connecting to diff --git a/doc/nitrocli.1.pdf b/doc/nitrocli.1.pdf Binary files differindex 48a41ff..d98ab41 100644 --- a/doc/nitrocli.1.pdf +++ b/doc/nitrocli.1.pdf diff --git a/src/commands.rs b/src/commands.rs index d352ca2..ebb28ca 100644 --- a/src/commands.rs +++ b/src/commands.rs @@ -425,7 +425,7 @@ pub fn list(ctx: &mut Context<'_>, no_connect: bool) -> anyhow::Result<()> { if device_infos.is_empty() { println!(ctx, "No Nitrokey device connected")?; } else { - println!(ctx, "device path\tmodel\tserial number")?; + println!(ctx, "USB path\tmodel\tserial number")?; let mut manager = nitrokey::take().context("Failed to acquire access to Nitrokey device manager")?; diff --git a/src/tests/list.rs b/src/tests/list.rs index 4c28995..cc969c6 100644 --- a/src/tests/list.rs +++ b/src/tests/list.rs @@ -16,7 +16,7 @@ fn not_connected() -> anyhow::Result<()> { #[test_device] fn connected(model: nitrokey::Model) -> anyhow::Result<()> { let re = regex::Regex::new( - r#"^device path\tmodel\tserial number + r#"^USB path\tmodel\tserial number ([[:^space:]]+\t(Pro|Storage|unknown)\t0x[[:xdigit:]]+ )+$"#, ) |