Skip to contentSkip to conversation

PM / Hibernate: swap, use KERN_CONT

PATCH Applied Jiri Slaby 3 participants 5 messages Oct 10, 2009 – Oct 28, 2009

Subsystems (2)
lore
Share & tools
lore

Jiri Slaby

author
#0 lore raw

PATCH 1/1 PM / Hibernate: swap, use KERN_CONT

Use KERN_CONT in save_image for printks. So that anybody won't try to add a loglevel.

---
 kernel/power/swap.c |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)
kernel/power/swap.c +3 -3
index 47586d9..4c0f80b 100644
@@ -437,7 +437,7 @@ static int save_image(struct swap_map_handle *handle,
 		if (ret)
 			break;
 		if (!(nr_pages % m))
-			printk("\b\b\b\b%3d%%", nr_pages / m);
+			printk(KERN_CONT "\b\b\b\b%3d%%", nr_pages / m);
 		nr_pages++;
 	}
 	err2 = wait_on_bio_chain(&bio);
@@ -445,9 +445,9 @@ static int save_image(struct swap_map_handle *handle,
 	if (!ret)
 		ret = err2;
 	if (!ret)
-		printk("\b\b\b\bdone\n");
+		printk(KERN_CONT "\b\b\b\bdone\n");
 	else
-		printk("\n");
+		printk(KERN_CONT "\n");
 	swsusp_show_speed(&start, &stop, nr_to_write, "Wrote");
 	return ret;
 }
Signature · 1 line
1.6.4.2
#1 lore raw
Quoted 2 lines · Jiri Slaby

Use KERN_CONT in save_image for printks. So that anybody won't try to add a loglevel.

Someone has a big, pending patch to switch to pr_*. Should we take that instead?
Pavel

Signature · 2 lines
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html
author
#2 lore raw
Quoted 6 lines · Pavel Machek
Quoted 2 lines · Jiri Slaby

Use KERN_CONT in save_image for printks. So that anybody won't try to add a loglevel.

Someone has a big, pending patch to switch to pr_*. Should we take that instead?

I have no problem with that at all.

#3 lore raw
In reply to Jiri Slaby
Quoted 4 lines · Jiri Slaby

Use KERN_CONT in save_image for printks. So that anybody won't try to add a loglevel.

Applied to suspend-2.6/linux-next.

Thanks,
Rafael

Quoted 30 lines
---
 kernel/power/swap.c |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)
kernel/power/swap.c +3 -3
index 47586d9..4c0f80b 100644
@@ -437,7 +437,7 @@ static int save_image(struct swap_map_handle *handle,
 		if (ret)
 			break;
 		if (!(nr_pages % m))
-			printk("\b\b\b\b%3d%%", nr_pages / m);
+			printk(KERN_CONT "\b\b\b\b%3d%%", nr_pages / m);
 		nr_pages++;
 	}
 	err2 = wait_on_bio_chain(&bio);
@@ -445,9 +445,9 @@ static int save_image(struct swap_map_handle *handle,
 	if (!ret)
 		ret = err2;
 	if (!ret)
-		printk("\b\b\b\bdone\n");
+		printk(KERN_CONT "\b\b\b\bdone\n");
 	else
-		printk("\n");
+		printk(KERN_CONT "\n");
 	swsusp_show_speed(&start, &stop, nr_to_write, "Wrote");
 	return ret;
 }
#4 lore raw
In reply to Jiri Slaby
Quoted 4 lines · Jiri Slaby

Use KERN_CONT in save_image for printks. So that anybody won't try to add a loglevel.

Applied to suspend-2.6/linux-next.

Thanks,
Rafael

Quoted 30 lines
---
 kernel/power/swap.c |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)
kernel/power/swap.c +3 -3
index 47586d9..4c0f80b 100644
@@ -437,7 +437,7 @@ static int save_image(struct swap_map_handle *handle,
 		if (ret)
 			break;
 		if (!(nr_pages % m))
-			printk("\b\b\b\b%3d%%", nr_pages / m);
+			printk(KERN_CONT "\b\b\b\b%3d%%", nr_pages / m);
 		nr_pages++;
 	}
 	err2 = wait_on_bio_chain(&bio);
@@ -445,9 +445,9 @@ static int save_image(struct swap_map_handle *handle,
 	if (!ret)
 		ret = err2;
 	if (!ret)
-		printk("\b\b\b\bdone\n");
+		printk(KERN_CONT "\b\b\b\bdone\n");
 	else
-		printk("\n");
+		printk(KERN_CONT "\n");
 	swsusp_show_speed(&start, &stop, nr_to_write, "Wrote");
 	return ret;
 }