On Thu, Nov 30, 2006 at 10:53:56AM +0100, Tim Dijkstra wrote:
> So by checking errno we can distinguish 'to old
> kernel' from 'real error'?
Yes, i think so. I have not checked all the possible cases where the
error return value is set, but i think it cannot return -ENOTTY other
than for this case:
if (_IOC_TYPE(cmd) != SNAPSHOT_IOC_MAGIC)
return -ENOTTY;
if (_IOC_NR(cmd) > SNAPSHOT_IOC_MAXNR)
return -ENOTTY;
so if we check for ENOTTY, we should be safe.
> If that is the case I would suggest
> silently falling back to shutdown for 'to old kernel'.
I still would print
suspend: falling back to shutdown mode.
so if you get a bugreport you can see that it did that, but the message
is not really scary.
> BTW, what is the first kernel with the correct code? It's not in
> 2.16.18, is it? Ah, I see they just released 2.6.19, is it in there?
I think it is (i pushed it through Andrew), but i have not checked it.
"grep SNAPSHOT_PMOPS kernel/power/power.h" should tell you :-)
--
Stefan Seyfried
QA / R&D Team Mobile Devices | "Any ideas, John?"
SUSE LINUX Products GmbH, Nürnberg | "Well, surrounding them's out."
-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Suspend-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/suspend-devel