fix return code bug on bulk deletion

This commit is contained in:
bunnie 2023-01-29 17:32:41 +08:00
parent 004599543a
commit 2b6e0d2b89

View file

@ -575,7 +575,7 @@ impl Pddb {
.or(Err(Error::new(ErrorKind::Other, "Xous internal error")))?;
buf.lend_mut(self.conn, Opcode::DictBulkDelete.to_u32().unwrap())
.or(Err(Error::new(ErrorKind::Other, "Xous internal error")))?;
let response = buf.as_flat::<PddbKeyList, _>().unwrap();
let response = buf.as_flat::<PddbDeleteList, _>().unwrap();
match response.retcode {
ArchivedPddbRetcode::Ok => Ok(()),
ArchivedPddbRetcode::AccessDenied => Err(Error::new(ErrorKind::NotFound, "Dictionary not found, or inaccessible")),