* [Patch] cld: return more correct codes
@ 2009-08-27 18:54 Pete Zaitcev
2009-08-27 19:39 ` Jeff Garzik
0 siblings, 1 reply; 2+ messages in thread
From: Pete Zaitcev @ 2009-08-27 18:54 UTC (permalink / raw)
To: Jeff Garzik; +Cc: Project Hail List
When doing "ls /foo" in cldcli currently, server reports "invalid inode
number". But in fact it's a name that's incorrect, all numbers are fine.
It seems we need to return "invalid name" afer we looked up by name,
and "invalid number" after we looked up by number (this is ok now and
not changed by the patch).
Signed-off-by: Pete Zaitcev <zaitcev@redhat.com>
diff --git a/server/msg.c b/server/msg.c
index 6666d3c..4ac806e 100644
--- a/server/msg.c
+++ b/server/msg.c
@@ -583,7 +583,7 @@ void msg_open(struct msg_params *mp)
goto err_out;
}
if (!create && (rc == DB_NOTFOUND)) {
- resp_rc = CLE_INODE_INVAL;
+ resp_rc = CLE_NAME_INVAL;
goto err_out;
}
if (create && rc == 0) {
@@ -990,7 +990,7 @@ void msg_del(struct msg_params *mp)
rc = cldb_inode_get_byname(txn, name, name_len, &ino, false, 0);
if (rc) {
if (rc == DB_NOTFOUND)
- resp_rc = CLE_INODE_INVAL;
+ resp_rc = CLE_NAME_INVAL;
else
resp_rc = CLE_DB_ERR;
goto err_out;
^ permalink raw reply related [flat|nested] 2+ messages in thread
end of thread, other threads:[~2009-08-27 19:39 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-08-27 18:54 [Patch] cld: return more correct codes Pete Zaitcev
2009-08-27 19:39 ` Jeff Garzik
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.