Subject: Re: Recording reboot in boothowto
To: None <firstname.lastname@example.org>
From: Andrew Doran <email@example.com>
Date: 12/15/2007 14:15:50
On Sat, Dec 15, 2007 at 12:31:54PM +0100, Joerg Sonnenberger wrote:
> there are some drivers that want to behave different between shutdown
> for reboot/halt and shutdown for powerdown and /suspend. Into this class
> at least the disk drivers fall (PR 37508 for reference).
> I don't want to add an additional argument for the suspend callback as
> it will be rarely used. I can't think of much hardware besides disks
> where you would want to do that.
> What do you think of the attached patch to make it possible for drivers
> to distinguish the cases based on boothowto? The suggested patch for
> wd.c is in the PR.
Giving drivers an understanding of boothowto isn't ideal. This is why (some
months ago) I requested that the power stuff communicate with drivers using
a simple message interface. For example, you could handle it by sending a
"suspend for reboot" command to the driver. If it returns back and says it
doesn't understand that, follow up with the usual suspend command.