lkml.org 
[lkml]   [2004]   [Aug]   [23]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] make swsusp produce nicer screen output
On Mon, Aug 23, 2004 at 07:42:18PM +0200, Pavel Machek wrote:
> Well, it looks nice, be sure to submit smooth version :-).
I'm working on it :).

> > @@ -85,10 +85,17 @@
> >
> > static void free_some_memory(void)
> > {
> > - printk("Freeing memory: ");
> > - while (shrink_all_memory(10000))
> > - printk(".");
> > - printk("|\n");
> > + int i = 0;
> > + char *p = "-\|/";
> > +
> > + printk("Freeing memory: ");
> > + while (shrink_all_memory(10000)) {
> > + printk("\b%c", p[i]);
> > + i++;
> > + if (i > 3)
> > + i = 0;
> > + }
> > + printk("\bdone\n");
> > }
>
> I'd leave dots here. Its usefull to see if it done something or not.

Well, it will display a spinning thingy that is updated every time
shrink_all_memory(10000) returns. Maybe you want to see how much memory was
freed?

And do we need to handle the case when nr_copy_pages < 100?

/Erik
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 14:05    [W:0.112 / U:0.116 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site