summaryrefslogtreecommitdiffstats
path: root/cli/src
diff options
context:
space:
mode:
Diffstat (limited to 'cli/src')
-rw-r--r--cli/src/cli-rpc-ops.c13
1 files changed, 12 insertions, 1 deletions
diff --git a/cli/src/cli-rpc-ops.c b/cli/src/cli-rpc-ops.c
index b39ce6a11..fe08a3b95 100644
--- a/cli/src/cli-rpc-ops.c
+++ b/cli/src/cli-rpc-ops.c
@@ -7554,13 +7554,24 @@ list_snap_of_volume (dict_t *dict_n, char *prefix_str) {
* if volume not present then display that volume doesnot exist
* and try to fetch next volume mentioned
*/
+
+ ret = snprintf (buffer, sizeof (buffer), "%s.err_str", prefix_str);
+ if (ret < 0) {
+ goto out;
+ }
+ ret = dict_get_str (dict_n, buffer, &get_buffer);
+ if (ret == 0) {
+ cli_out (get_buffer);
+ ret = 0;
+ goto out;
+ }
ret = snprintf (buffer, sizeof(buffer), "%s.volname", prefix_str);
if (ret < 0) { /* Negative value is an error */
goto out;
}
ret = dict_get_str (dict_n, buffer, &get_buffer);
if (get_buffer == NULL){
- cli_out ("Volume doesnot exist");
+ ret = 0;
goto out;
}
cli_out ("Vol Name : %s", get_buffer);