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)
libexec/dma/dma.c

index dde31ca..61abe22 100644 (file)
@@ -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");
        }
 }