com_addblob(): Return negative on errors
authorAndre Noll <maan@tuebingen.mpg.de>
Sun, 5 Apr 2015 15:18:48 +0000 (15:18 +0000)
committerAndre Noll <maan@tuebingen.mpg.de>
Wed, 12 Aug 2015 21:23:48 +0000 (23:23 +0200)
blob.c

diff --git a/blob.c b/blob.c
index ea746072d85b4493ec3c03313f8f8d3c74df191e..6e48c487eb6b975ebf740561146374af122d1479 100644 (file)
--- a/blob.c
+++ b/blob.c
@@ -374,13 +374,12 @@ static int com_addblob_callback(struct osl_table *table, int fd,
        afs_event(BLOB_ADD, NULL, table);
 out:
        if (ret < 0)
-               msg_len = xasprintf(&msg, "could not add %s: %s\n", name,
-                       para_strerror(-ret));
+               msg_len = xasprintf(&msg, "cannot add %s\n", name);
        else
                msg_len = xasprintf(&msg, "added %s as id %u\n", name, id);
        pass_buffer_as_shm(fd, SBD_OUTPUT, msg, msg_len);
        free(msg);
-       return 0;
+       return ret;
 }
 
 /* Write input from fd to dynamically allocated buffer, but maximal 10M. */