On Wed, Jul 19, 2006 at 12:00:48PM +0200, Rafael J. Wysocki wrote:
> Hi,
>
> On Wednesday 19 July 2006 11:17, Stefan Seyfried wrote:
> > I dug this out again after updating the vbetool code.
> > This hack does the equivalent of
> >
> > X=`vbetool vbemode get`
> > <suspend>
> > <maybe vbetool post>
> > vbetool vbemode set $X
>
> Nice. [Perhaps I should try it on my box.]
> VBE_SAVE notoriosly segfaults on x866_64 machines.
Well, i'm not sure if VBE_MODE is better :-)
>
> > a) "feels" better to me
> > b) the HAL / pm-utils guys have a similar method in their repertoire, and
> > i'd like to have "s2ram $SOME_ADVANCED_OPTIONS_DETERMINED_BY_HAL" as an
> > drop-in-replacement to this stuff, so i need this.
>
> OK
>
> > I actually included the nx5000 whitelist change, to show a potential usage
> > of this flag.
>
> Generally looks good (see below for one little comment).
>
> Rafael
> > Index: vbetool/vbetool.c
> > ===================================================================
> > RCS file: /cvsroot/suspend/suspend/vbetool/vbetool.c,v
> > retrieving revision 1.6
> > diff -u -p -r1.6 vbetool.c
> > --- vbetool/vbetool.c 19 Jul 2006 08:51:04 -0000 1.6
> > +++ vbetool/vbetool.c 19 Jul 2006 09:13:23 -0000
> > @@ -379,6 +379,11 @@ int do_set_mode (int mode, int vga) {
> > return 0;
> > }
> >
> > +void set_vbe_mode(int mode)
> > +{
> > + (void)do_set_mode(mode, 0);
> > +}
>
> I'd remove the (void) here.
I think i did this due to a compiler warning (do_set_mode is int).
> > @@ -441,12 +446,18 @@ int do_set_panel_brightness(int brightne
> > return 0;
> > }
> >
> > -int do_get_mode() {
> > +int __get_mode()
> > +{
> > reg_frame regs;
> > int error;
> >
> > memset(®s, 0, sizeof(regs));
> > error = do_vbe_service(0x4f03, 0, ®s);
> > + return error;
> > +}
And i know the error variable is totally superfluous here, but it keeps the
diff to upstream vbetool smaller ;-)
--
Stefan Seyfried | "Please, just tell people
QA / R&D Team Mobile Devices | to use KDE."
SUSE LINUX Products GmbH, Nürnberg | -- Linus Torvalds
-------------------------------------------------------------------------
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