2 * Copyright (C) Frank Lahm 2010
3 * All Rights Reserved. See COPYING.
8 #endif /* HAVE_CONFIG_H */
12 #include <netatalk/endian.h>
13 #include <atalk/logger.h>
14 #include <atalk/cnid_dbd_private.h>
20 int dbd_search(DBD *dbd, struct cnid_dbd_rqst *rqst, struct cnid_dbd_rply *rply)
24 static char resbuf[DBD_MAX_SRCH_RPLY_PAYLOAD];
25 memset(&key, 0, sizeof(key));
28 key.data = rqst->name;
29 key.size = rqst->namelen;
31 if ((rc = dbif_del(dbd, DBIF_IDX_DEVINO, &key, 0)) < 0) {
32 LOG(log_error, logtype_cnid, "dbd_delete: Unable to delete entry for dev/ino: 0x%llx/0x%llx",
33 (unsigned long long)rqst->dev, (unsigned long long)rqst->ino);
34 rply->result = CNID_DBD_RES_ERR_DB;
38 LOG(log_debug, logtype_cnid, "cnid_delete: deleted dev/ino: 0x%llx/0x%llx",
39 (unsigned long long)rqst->dev, (unsigned long long)rqst->ino);
40 rply->result = CNID_DBD_RES_OK;
42 LOG(log_debug, logtype_cnid, "cnid_delete: dev/ino: 0x%llx/0x%llx not in database",
43 (unsigned long long)rqst->dev, (unsigned long long)rqst->ino);
44 rply->result = CNID_DBD_RES_NOTFOUND;