[ConsoleKit] Review for bug 26055

Halton Huo halton.huo at gmail.com
Tue May 18 04:52:37 PDT 2010


On Tue, 2010-05-18 at 07:15 -0400, Ray Strode wrote:
> Hi,
> 
> On Tue, May 18, 2010 at 3:17 AM, Halton Huo <halton.huo at gmail.com> wrote:
> 
> > Can somebody review patch for
> > https://bugs.freedesktop.org/show_bug.cgi?id=26055?
> There's certainly nothing wrong with the concept, but the patch has a
> few issues that need to be fixed.
> 
> 1) Internal functions have to have return types and be declared static
Add gboolean as return value for is_vt_enabled()

> 2) Functions have to be in all lower case
Rename to is_vt_enabled()

> 3) presumably you need to link libscf in?
Yes, $(SCF_LIBS) is added to console_kit_daemon_LDADD in src/Makefile.am

> 4) you check for HAVE_SYS_VT_H in one place, HAVE_SCF in another.  I
> have vt.h on linux and i don't have those functions, so you probably
> shouldn't check for HAVE_VT_H.
Yes, should use HAVE_SCF instead of HAVE_SYS_VT_H

There is another logic error in old patch. is_vt_enabled() should always
return TRUE in case of not having HAVE_SCF.

I updated the patch in the bug report, please check here
https://bugs.freedesktop.org/attachment.cgi?id=35724

Look okay?

Thanks,
Halton.



More information about the ConsoleKit mailing list