aboutsummaryrefslogtreecommitdiff
path: root/nitrocli/src/commands.rs
diff options
context:
space:
mode:
Diffstat (limited to 'nitrocli/src/commands.rs')
-rw-r--r--nitrocli/src/commands.rs9
1 files changed, 9 insertions, 0 deletions
diff --git a/nitrocli/src/commands.rs b/nitrocli/src/commands.rs
index e1c88c8..4deb1a7 100644
--- a/nitrocli/src/commands.rs
+++ b/nitrocli/src/commands.rs
@@ -593,6 +593,15 @@ pub fn pws_set(slot: u8, name: &str, login: &str, password: &str) -> Result<()>
.map_err(|err| get_error("Could not write PWS slot", &err))
}
+/// Clear a PWS slot.
+pub fn pws_clear(slot: u8) -> Result<()> {
+ let device = get_device()?;
+ let pws = get_password_safe(&device)?;
+ pws
+ .erase_slot(slot)
+ .map_err(|err| get_error("Could not clear PWS slot", &err))
+}
+
#[cfg(test)]
mod tests {
use super::*;