Re: [PATCH] make swsusp produce nicer screen output

Erik Rigtorp
2004-08-23T20:28:07Z

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