Pavel Machek <[email protected]> ha scritto:
> Hi!
>
> On www.sf.net/projects/suspend , there's s2ram.c program for
> suspending machines. It contains whitelist of known machines, along
> with methods to get their video working (similar to
> Doc*/power/video.txt). Unfortunately, video.txt does not allow me to
> fill in whitelist automatically, so I need your help.
>
> I do not yet have solution for machines that need vbetool; fortunately
> my machines do not need that :-), and it is pretty complex (includes
> x86 emulator).
What about adding something like:
void s2ram_restore(void) {
if (needed)
fork_and_exec(vbetool);
}
machine_table could set a global flag or something. It would be
possibile to us an array to carry the informations about what need to be
done on restore, i.e. something like:
void machine_table() {
if ((!strcmp(sys_vendor, "ASUS")) {
if (!strcmp(sys_version, "My notebook")) {
machine_known();
on_resume[NEED_VBETOOL] = 1;
return;
}
}
}
void s2ram_restore(void) {
if (on_resume[NEED_VBETOOL])
fork_and_exec(vbetool);
if (on_resume[NEED_RADEON_STUFF])
radeon_stuff();
if (on_resume[NEED_FOOBAR])
black_magic();
}
Ugly? Maybe, but you don't have to fiddle with a x86 emulator.
Luca
--
Home: http://kronoz.cjb.net
Windows NT: Designed for the Internet. The Internet: Designed for Unix.
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
[Index of Archives]
[Kernel Newbies]
[Netfilter]
[Bugtraq]
[Photo]
[Stuff]
[Gimp]
[Yosemite News]
[MIPS Linux]
[ARM Linux]
[Linux Security]
[Linux RAID]
[Video 4 Linux]
[Linux for the blind]
[Linux Resources]