Subject: Re: RFC: Powerhook debugging
To: Bill Studenmund <wrstuden@netbsd.org>
From: Martin Husemann <martin@duskware.de>
List: tech-kern
Date: 09/22/2006 10:46:14
On Thu, Sep 21, 2006 at 06:29:10PM -0700, Bill Studenmund wrote:
> Why not just require that the powerhook parameter be a device pointer?

I don't like that. We were thinking of using powerhooks for unmounts
of raid partititions and swap spaces, and I'm not sure there is always
a good struct device handy (well, in this examples and with wedges
there actually might be one, but in general we probably shouldn't
rely on this assumption).

We could do something very evil and cheap: just print the callback pointer
with %p, and then use gdb to find out what the last function called
was.

Not as user friendly, and maybe slightly harder to diagnoze remotely,
but not that bad either. 

But I wouldn't mind changing it as Jared suggested.

Martin