]> git.tue.mpg.de Git - paraslash.git/commitdiff
com_lsblob: Print an error message if no blob matched.
authorAndre Noll <maan@systemlinux.org>
Tue, 1 Nov 2011 20:43:51 +0000 (21:43 +0100)
committerAndre Noll <maan@systemlinux.org>
Sun, 6 Nov 2011 11:29:13 +0000 (12:29 +0100)
Just to be consistent with other commands.

blob.c

diff --git a/blob.c b/blob.c
index b1d552248cea4e925136172eab846cf1549b3b26..2545aea9af2d9dbb5d34b4a41a6d3363c35c3385 100644 (file)
--- a/blob.c
+++ b/blob.c
@@ -156,6 +156,8 @@ static void com_lsblob_callback(struct osl_table *table,
        ret = for_each_matching_row(&pmd);
        if (ret < 0)
                para_printf(&lbad.pb, "%s\n", para_strerror(-ret));
+       else if (pmd.num_matches == 0 && pmd.patterns.size > 0)
+               para_printf(&lbad.pb, "no matches\n");
        if (lbad.pb.offset)
                pass_buffer_as_shm(lbad.pb.buf, lbad.pb.offset, &fd);
        free(lbad.pb.buf);