Hi,
(sorry for answering late, i was terribly busy over the last weeks).
On Mon, Jun 18, 2007 at 10:55:54PM +0200, Tim Dijkstra wrote:
> Hi,
>
> What do people think about this?
> Subject: Bug#392168: Resume device on external USB drive causes the boot pr
> X-Debian-PR-Keywords: wontfix
That's very correct ;-)
> --- resume.c.dpkg 2007-06-10 22:49:25.000000000 -0400
> +++ resume.c 2007-06-11 23:02:33.000000000 -0400
> @@ -731,6 +731,9 @@
> struct stat stat_buf;
> int dev;
> int n, error = 0;
> + // Grace period variables
> + int loopcnt;
> + unsigned int usecs = 500000; // half a second
>
> page_size = getpagesize();
> buffer_size = BUFFER_PAGES * page_size;
> @@ -755,6 +758,18 @@
> if (splash_param != 'y' && splash_param != 'Y')
> splash_param = 0;
>
> + /*
> + * 30 second grace period to allow resume device
> + * to come online (i.e. external USB drives)
> + */
> + for (loopcnt = 1; loopcnt <= 60; loopcnt++)
> + {
> + if (stat(resume_dev_name, &stat_buf) != 0)
> + usleep(usecs); // wait a half
> second
> + else
> + break;
> + }
> +
> while (stat(resume_dev_name, &stat_buf)) {
> fprintf(stderr,
> "resume: Could not stat the resume device
> file.\n"
The initrd can just wait for the resume device to appear before calling
"resume". It needs such a function for the root device anyway.
So i'd say this is not really needed in resume.c.
OTOH, i am not totally opposed, since it won't affect me anyway ;-)
--
Stefan Seyfried
QA / R&D Team Mobile Devices | "Any ideas, John?"
SUSE LINUX Products GmbH, Nürnberg | "Well, surrounding them's out."
This footer brought to you by insane German lawmakers:
SUSE Linux Products GmbH, GF: Markus Rex, HRB 16746 (AG Nürnberg)
-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
Suspend-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/suspend-devel