Previously, a general EXIT_FAILURE was returned in this case, which is hard to
distinguish from other cluster failures.

Signed-off-by: Chris Webb <[email protected]>
---
 collie/collie.c |    6 ++++++
 1 files changed, 6 insertions(+), 0 deletions(-)

diff --git a/collie/collie.c b/collie/collie.c
index 853d8b6..ae33e0c 100644
--- a/collie/collie.c
+++ b/collie/collie.c
@@ -979,6 +979,9 @@ reread:
                } else if (ret == SD_RES_NO_OBJ) {
                        fprintf(stderr, "no such attribute, %s\n", key);
                        return EXIT_MISSING;
+               } else if (ret == SD_RES_NO_VDI) {
+                       fprintf(stderr, "vdi not found\n");
+                       return EXIT_MISSING;
                } else
                        fprintf(stderr, "failed to find attr oid, %s\n",
                                sd_strerror(ret));
@@ -1063,6 +1066,9 @@ static int vdi_getattr(int argc, char **argv)
        if (ret == SD_RES_NO_OBJ) {
                fprintf(stderr, "no such attribute, %s\n", key);
                return EXIT_MISSING;
+       } else if (ret == SD_RES_NO_VDI) {
+               fprintf(stderr, "vdi not found\n");
+               return EXIT_MISSING;
        } else if (ret) {
                fprintf(stderr, "failed to find attr oid, %s\n",
                        sd_strerror(ret));
-- 
1.7.5.4

-- 
sheepdog mailing list
[email protected]
http://lists.wpkg.org/mailman/listinfo/sheepdog

Reply via email to