]> git.ipfire.org Git - people/ms/dma.git/commitdiff
dma: beautify queue listing output
authorSimon Schubert <corecode@dragonflybsd.org>
Thu, 27 Aug 2009 15:23:09 +0000 (17:23 +0200)
committerSimon Schubert <corecode@dragonflybsd.org>
Thu, 27 Aug 2009 21:12:54 +0000 (23:12 +0200)
dma.c

diff --git a/dma.c b/dma.c
index dde31ca4f0ddb2d87da320de5e771e88e84cd389..61abe22c191302af6ca9c69037c40edf7ebecfc3 100644 (file)
--- a/dma.c
+++ b/dma.c
@@ -325,11 +325,13 @@ show_queue(struct queue *queue)
        LIST_FOREACH(it, &queue->queue, next) {
                printf("ID\t: %s%s\n"
                       "From\t: %s\n"
-                      "To\t: %s\n"
-                      "--\n",
+                      "To\t: %s\n",
                       it->queueid,
                       locked ? "*" : "",
                       it->sender, it->addr);
+
+               if (LIST_NEXT(it, next) != NULL)
+                       printf("--\n");
        }
 }