init/ramdisk: use pr_cont() at the end of ramdisk loading
authorAaro Koskinen <aaro.koskinen@iki.fi>
Tue, 10 Apr 2018 23:34:34 +0000 (16:34 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Wed, 11 Apr 2018 17:28:36 +0000 (10:28 -0700)
Use pr_cont() at the end of ramdisk loading.  This will avoid the
rotator and an extra newline appearing in the dmesg.

Before:
  RAMDISK: Loading 2436KiB [1 disk] into ram disk... |
  done.

After:
  RAMDISK: Loading 2436KiB [1 disk] into ram disk... done.

Link: http://lkml.kernel.org/r/20180302205552.16031-1-aaro.koskinen@iki.fi
Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi>
Reviewed-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
init/do_mounts_rd.c

index 12c159824c7bd994132d289b49fbf651f6cca750..035a5f0ab26b9882d251784f2abd348d7eef2b9a 100644 (file)
@@ -255,7 +255,7 @@ int __init rd_load_image(char *from)
                nblocks, ((nblocks-1)/devblocks)+1, nblocks>devblocks ? "s" : "");
        for (i = 0, disk = 1; i < nblocks; i++) {
                if (i && (i % devblocks == 0)) {
                nblocks, ((nblocks-1)/devblocks)+1, nblocks>devblocks ? "s" : "");
        for (i = 0, disk = 1; i < nblocks; i++) {
                if (i && (i % devblocks == 0)) {
-                       printk("done disk #%d.\n", disk++);
+                       pr_cont("done disk #%d.\n", disk++);
                        rotate = 0;
                        if (ksys_close(in_fd)) {
                                printk("Error closing the disk.\n");
                        rotate = 0;
                        if (ksys_close(in_fd)) {
                                printk("Error closing the disk.\n");
@@ -278,7 +278,7 @@ int __init rd_load_image(char *from)
                }
 #endif
        }
                }
 #endif
        }
-       printk("done.\n");
+       pr_cont("done.\n");
 
 successful_load:
        res = 1;
 
 successful_load:
        res = 1;