On Friday, 15 September 2006 11:06, Pavel Machek wrote:
> Hi!
> 
> > This patch will lock the VT that is active just after splash is
> > initialized and release it just before the splash system is stopped.
> > 
> > I haven't tested it extensively with bootsplash.org, but it seems to
> > work with that (in vmware) too.
> > 
> > Comments?
> > 
> 
> > @@ -1027,6 +1030,75 @@
> >  }
> >  #endif
> >  
> > +
> > +static void release_vt(int signo)
> > +{
> > +   printf("Ignoring request to release VT\n");
> > +   ioctl(vfd, VT_RELDISP, 0);
> > +}
> > +
> 
> Is printf safe to call from signal handler?
> 
> > +static int lock_vt()
> 
> (void).
> 
> > +   error = ioctl(fd, VT_GETSTATE, &vtstat);
> > +   close(fd);
> > +   
> > +   if ( error < 0 )
> 
> (error < 0), (no spaces) please.
> 
> > +   /* Setting vt mode to VT_PROCESS means this process
> > +    * will handle vt switching requests.
> > +    * We installed handlers for release and acquire requests.
> > +    */
> 
> Is it possible to just ignore those signals? Kernel will be unable to
> switch, anyway, no?
> 
> > +   printf("Locked against VT switching\n");
> 
> This should be gone in final version.
> 
> Otherwise looks okay to me...

It looks good to me too except for one thing: could we please return
well-defined error codes from lock_vt() instead of -1?

Rafael


-- 
You never change things by fighting the existing reality.
                R. Buckminster Fuller

-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
Suspend-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/suspend-devel

Reply via email to