Re: [PATCH] make swsusp produce nicer screen output

From: Erik Rigtorp
Date: Mon Aug 23 2004 - 15:31:47 EST


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@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/