public inbox for linux-pm@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/1] PM / Hibernate: swap, use KERN_CONT
@ 2009-10-10 12:00 Jiri Slaby
  2009-10-10 12:15 ` Pavel Machek
  2009-10-28 22:08 ` Rafael J. Wysocki
  0 siblings, 2 replies; 4+ messages in thread
From: Jiri Slaby @ 2009-10-10 12:00 UTC (permalink / raw)
  To: rjw; +Cc: linux-pm, linux-kernel, Jiri Slaby

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

Signed-off-by: Jiri Slaby <jirislaby@gmail.com>
---
 kernel/power/swap.c |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/kernel/power/swap.c b/kernel/power/swap.c
index 47586d9..4c0f80b 100644
--- a/kernel/power/swap.c
+++ b/kernel/power/swap.c
@@ -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;
 }
-- 
1.6.4.2

^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH 1/1] PM / Hibernate: swap, use KERN_CONT
  2009-10-10 12:00 [PATCH 1/1] PM / Hibernate: swap, use KERN_CONT Jiri Slaby
@ 2009-10-10 12:15 ` Pavel Machek
  2009-10-10 12:19   ` Jiri Slaby
  2009-10-28 22:08 ` Rafael J. Wysocki
  1 sibling, 1 reply; 4+ messages in thread
From: Pavel Machek @ 2009-10-10 12:15 UTC (permalink / raw)
  To: Jiri Slaby; +Cc: linux-pm, linux-kernel

On Sat 2009-10-10 14:00:24, Jiri Slaby wrote:
> 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
-- 
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH 1/1] PM / Hibernate: swap, use KERN_CONT
  2009-10-10 12:15 ` Pavel Machek
@ 2009-10-10 12:19   ` Jiri Slaby
  0 siblings, 0 replies; 4+ messages in thread
From: Jiri Slaby @ 2009-10-10 12:19 UTC (permalink / raw)
  To: Pavel Machek; +Cc: linux-pm, linux-kernel

On 10/10/2009 02:15 PM, Pavel Machek wrote:
> On Sat 2009-10-10 14:00:24, Jiri Slaby wrote:
>> 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.

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH 1/1] PM / Hibernate: swap, use KERN_CONT
  2009-10-10 12:00 [PATCH 1/1] PM / Hibernate: swap, use KERN_CONT Jiri Slaby
  2009-10-10 12:15 ` Pavel Machek
@ 2009-10-28 22:08 ` Rafael J. Wysocki
  1 sibling, 0 replies; 4+ messages in thread
From: Rafael J. Wysocki @ 2009-10-28 22:08 UTC (permalink / raw)
  To: Jiri Slaby; +Cc: linux-pm, linux-kernel

On Saturday 10 October 2009, Jiri Slaby wrote:
> Use KERN_CONT in save_image for printks. So that anybody won't
> try to add a loglevel.
> 
> Signed-off-by: Jiri Slaby <jirislaby@gmail.com>

Applied to suspend-2.6/linux-next.

Thanks,
Rafael


> ---
>  kernel/power/swap.c |    6 +++---
>  1 files changed, 3 insertions(+), 3 deletions(-)
> 
> diff --git a/kernel/power/swap.c b/kernel/power/swap.c
> index 47586d9..4c0f80b 100644
> --- a/kernel/power/swap.c
> +++ b/kernel/power/swap.c
> @@ -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;
>  }
> 

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2009-10-28 22:08 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-10-10 12:00 [PATCH 1/1] PM / Hibernate: swap, use KERN_CONT Jiri Slaby
2009-10-10 12:15 ` Pavel Machek
2009-10-10 12:19   ` Jiri Slaby
2009-10-28 22:08 ` Rafael J. Wysocki

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox