Hello community,
here is the log from the commit of package powersave
checked in at Mon Feb 4 17:40:42 CET 2008.
--------
--- powersave/powersave.changes 2007-11-20 12:34:21.000000000 +0100
+++ /mounts/work_src_done/STABLE/powersave/powersave.changes 2008-02-03 22:22:49.000000000 +0100
@@ -1,0 +2,9 @@
+Sun Feb 3 20:50:21 CET 2008 - hmacht@suse.de
+
+- fix includes
+- Convert to new HAL policy names for hibernate/suspend/standby and
+ fix logic in detection. (Michael Biebl)
+- more fixes and less compile warnings (dkukawka)
+- r3135
+
+-------------------------------------------------------------------
Old:
----
powersave-0.15.19.tar.bz2
New:
----
powersave-0.15.20.tar.bz2
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ powersave.spec ++++++
--- /var/tmp/diff_new_pack.x13547/_old 2008-02-04 17:40:17.000000000 +0100
+++ /var/tmp/diff_new_pack.x13547/_new 2008-02-04 17:40:17.000000000 +0100
@@ -1,7 +1,7 @@
#
-# spec file for package powersave (Version 0.15.19)
+# spec file for package powersave (Version 0.15.20)
#
-# Copyright (c) 2007 SUSE LINUX Products GmbH, Nuernberg, Germany.
+# Copyright (c) 2008 SUSE LINUX Products GmbH, Nuernberg, Germany.
# This file and all modifications and additions to the pristine
# package are under the same license as the package itself.
#
@@ -14,7 +14,7 @@
BuildRequires: dbus-1-glib-devel gcc-c++ liblazy-devel lynx pkgconfig
Url: http://powersave.sourceforge.net/
Summary: General Powermanagement daemon supporting APM and ACPI and CPU frequency scaling
-Version: 0.15.19
+Version: 0.15.20
Release: 1
License: GPL v2 only; GPL v2 or later
Group: System/Daemons
@@ -163,3 +163,4 @@
%files libs
%defattr(-,root,root)
%_libdir/lib*.so*
+
++++++ powersave-0.15.19.tar.bz2 -> powersave-0.15.20.tar.bz2 ++++++
++++ 2265 lines of diff (skipped)
++++ retrying with extended exclude list
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/powersave-0.15.19/compile new/powersave-0.15.20/compile
--- old/powersave-0.15.19/compile 1970-01-01 01:00:00.000000000 +0100
+++ new/powersave-0.15.20/compile 2008-02-03 20:49:22.000000000 +0100
@@ -0,0 +1,142 @@
+#! /bin/sh
+# Wrapper for compilers which do not understand `-c -o'.
+
+scriptversion=2005-05-14.22
+
+# Copyright (C) 1999, 2000, 2003, 2004, 2005 Free Software Foundation, Inc.
+# Written by Tom Tromey .
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+
+# As a special exception to the GNU General Public License, if you
+# distribute this file as part of a program that contains a
+# configuration script generated by Autoconf, you may include it under
+# the same distribution terms that you use for the rest of that program.
+
+# This file is maintained in Automake, please report
+# bugs to or send patches to
+# .
+
+case $1 in
+ '')
+ echo "$0: No command. Try \`$0 --help' for more information." 1>&2
+ exit 1;
+ ;;
+ -h | --h*)
+ cat <<\EOF
+Usage: compile [--help] [--version] PROGRAM [ARGS]
+
+Wrapper for compilers which do not understand `-c -o'.
+Remove `-o dest.o' from ARGS, run PROGRAM with the remaining
+arguments, and rename the output as expected.
+
+If you are trying to build a whole package this is not the
+right script to run: please start by reading the file `INSTALL'.
+
+Report bugs to .
+EOF
+ exit $?
+ ;;
+ -v | --v*)
+ echo "compile $scriptversion"
+ exit $?
+ ;;
+esac
+
+ofile=
+cfile=
+eat=
+
+for arg
+do
+ if test -n "$eat"; then
+ eat=
+ else
+ case $1 in
+ -o)
+ # configure might choose to run compile as `compile cc -o foo foo.c'.
+ # So we strip `-o arg' only if arg is an object.
+ eat=1
+ case $2 in
+ *.o | *.obj)
+ ofile=$2
+ ;;
+ *)
+ set x "$@" -o "$2"
+ shift
+ ;;
+ esac
+ ;;
+ *.c)
+ cfile=$1
+ set x "$@" "$1"
+ shift
+ ;;
+ *)
+ set x "$@" "$1"
+ shift
+ ;;
+ esac
+ fi
+ shift
+done
+
+if test -z "$ofile" || test -z "$cfile"; then
+ # If no `-o' option was seen then we might have been invoked from a
+ # pattern rule where we don't need one. That is ok -- this is a
+ # normal compilation that the losing compiler can handle. If no
+ # `.c' file was seen then we are probably linking. That is also
+ # ok.
+ exec "$@"
+fi
+
+# Name of file we expect compiler to create.
+cofile=`echo "$cfile" | sed -e 's|^.*/||' -e 's/\.c$/.o/'`
+
+# Create the lock directory.
+# Note: use `[/.-]' here to ensure that we don't use the same name
+# that we are using for the .o file. Also, base the name on the expected
+# object file name, since that is what matters with a parallel build.
+lockdir=`echo "$cofile" | sed -e 's|[/.-]|_|g'`.d
+while true; do
+ if mkdir "$lockdir" >/dev/null 2>&1; then
+ break
+ fi
+ sleep 1
+done
+# FIXME: race condition here if user kills between mkdir and trap.
+trap "rmdir '$lockdir'; exit 1" 1 2 15
+
+# Run the compile.
+"$@"
+ret=$?
+
+if test -f "$cofile"; then
+ mv "$cofile" "$ofile"
+elif test -f "${cofile}bj"; then
+ mv "${cofile}bj" "$ofile"
+fi
+
+rmdir "$lockdir"
+exit $ret
+
+# Local Variables:
+# mode: shell-script
+# sh-indentation: 2
+# eval: (add-hook 'write-file-hooks 'time-stamp)
+# time-stamp-start: "scriptversion="
+# time-stamp-format: "%:y-%02m-%02d.%02H"
+# time-stamp-end: "$"
+# End:
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/powersave-0.15.19/configure.ac new/powersave-0.15.20/configure.ac
--- old/powersave-0.15.19/configure.ac 2007-11-20 12:30:51.000000000 +0100
+++ new/powersave-0.15.20/configure.ac 2008-02-03 22:15:48.000000000 +0100
@@ -3,7 +3,7 @@
AC_PREREQ(2.59)
-AC_INIT(powersave, 0.15.19, hmacht@suse.de)
+AC_INIT(powersave, 0.15.20, hmacht@suse.de)
AM_INIT_AUTOMAKE
AC_CONFIG_SRCDIR([daemon/powersaved.cpp])
AM_CONFIG_HEADER(config.h)
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/powersave-0.15.19/daemon/acpi.cpp new/powersave-0.15.20/daemon/acpi.cpp
--- old/powersave-0.15.19/daemon/acpi.cpp 2007-11-20 12:30:50.000000000 +0100
+++ new/powersave-0.15.20/daemon/acpi.cpp 2008-02-03 20:49:06.000000000 +0100
@@ -29,6 +29,7 @@
#include
#include <sstream>
+#include
#include "acpi.h"
#include "stringutil.h"
@@ -36,6 +37,7 @@
#include "event_management.h"
#include "globals.h"
#include "powerlib.h"
+#include "config_pm.h"
using namespace Powersave::Globals;
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/powersave-0.15.19/daemon/acpi.h new/powersave-0.15.20/daemon/acpi.h
--- old/powersave-0.15.19/daemon/acpi.h 2007-11-20 12:30:50.000000000 +0100
+++ new/powersave-0.15.20/daemon/acpi.h 2008-02-03 20:49:05.000000000 +0100
@@ -27,6 +27,8 @@
#include "pm_interface.h"
+using namespace std;
+
class ACPI_Interface : public PM_Interface {
public:
/** @brief default initialisation */
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/powersave-0.15.19/daemon/apm.cpp new/powersave-0.15.20/daemon/apm.cpp
--- old/powersave-0.15.19/daemon/apm.cpp 2007-11-20 12:30:50.000000000 +0100
+++ new/powersave-0.15.20/daemon/apm.cpp 2008-02-03 20:49:07.000000000 +0100
@@ -22,6 +22,8 @@
* *
***************************************************************************/
+#include
+#include
#include
#include
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/powersave-0.15.19/daemon/config_pm.h new/powersave-0.15.20/daemon/config_pm.h
--- old/powersave-0.15.19/daemon/config_pm.h 2007-11-20 12:30:50.000000000 +0100
+++ new/powersave-0.15.20/daemon/config_pm.h 2008-02-03 20:49:04.000000000 +0100
@@ -27,6 +27,8 @@
#include <map>
#include <string>
+#include <list>
+
#include "powerlib.h"
#include "event.h"
@@ -45,7 +47,6 @@
enum THERMAL_MANAGEMENT_DELIGATION { OFF, KERNEL, KERNEL_PASSIVE };
-class Event;
class GeneralConfig;
using namespace std;
@@ -59,7 +60,7 @@
/** @brief destructor */
virtual ~ PS_Config();
- virtual Event & getEvent(const string &event_name);
+ virtual class Event & getEvent(const string &event_name);
virtual int readConfigFile(const std::string & file = "");
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/powersave-0.15.19/daemon/cpufreq_management.cpp new/powersave-0.15.20/daemon/cpufreq_management.cpp
--- old/powersave-0.15.19/daemon/cpufreq_management.cpp 2007-11-20 12:30:50.000000000 +0100
+++ new/powersave-0.15.20/daemon/cpufreq_management.cpp 2008-02-03 20:49:07.000000000 +0100
@@ -130,7 +130,6 @@
break;
case _PERFORMANCE:
eM->executeEvent("processor.performance");
- governor.append("performance");
break;
case _POWERSAVE:
eM->executeEvent("processor.powersave");
@@ -149,9 +148,9 @@
case _PERFORMANCE:
governor.append("performance");
break;
- case _POWERSAVE:
- governor.append("powersave");
- break;
+ case _POWERSAVE:
+ governor.append("powersave");
+ break;
}
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/powersave-0.15.19/daemon/dbus_server.cpp new/powersave-0.15.20/daemon/dbus_server.cpp
--- old/powersave-0.15.19/daemon/dbus_server.cpp 2007-11-20 12:30:50.000000000 +0100
+++ new/powersave-0.15.20/daemon/dbus_server.cpp 2008-02-03 20:49:08.000000000 +0100
@@ -29,6 +29,10 @@
#include "main_loop.h"
#include "powerlib.h"
+#include <string>
+
+using namespace std;
+
#include
#include
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/powersave-0.15.19/daemon/event.cpp new/powersave-0.15.20/daemon/event.cpp
--- old/powersave-0.15.19/daemon/event.cpp 2007-11-20 12:30:50.000000000 +0100
+++ new/powersave-0.15.20/daemon/event.cpp 2008-02-03 20:49:05.000000000 +0100
@@ -22,6 +22,7 @@
* *
***************************************************************************/
+#include <algorithm>
#include
#include
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/powersave-0.15.19/daemon/event.h new/powersave-0.15.20/daemon/event.h
--- old/powersave-0.15.19/daemon/event.h 2007-11-20 12:30:50.000000000 +0100
+++ new/powersave-0.15.20/daemon/event.h 2008-02-03 20:49:08.000000000 +0100
@@ -27,7 +27,6 @@
#include <list>
#include <string>
-#include
#include "config_pm.h"
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/powersave-0.15.19/daemon/event_management.cpp new/powersave-0.15.20/daemon/event_management.cpp
--- old/powersave-0.15.19/daemon/event_management.cpp 2007-11-20 12:30:50.000000000 +0100
+++ new/powersave-0.15.20/daemon/event_management.cpp 2008-02-03 20:49:07.000000000 +0100
@@ -32,6 +32,7 @@
#include <string>
#include
#include
+#include
using namespace Powersave::Globals;
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/powersave-0.15.19/daemon/main_loop.cpp new/powersave-0.15.20/daemon/main_loop.cpp
--- old/powersave-0.15.19/daemon/main_loop.cpp 2007-11-20 12:30:50.000000000 +0100
+++ new/powersave-0.15.20/daemon/main_loop.cpp 2008-02-03 20:49:07.000000000 +0100
@@ -26,6 +26,7 @@
#include
#include
#include
+#include
#include "main_loop.h"
#include "powerlib.h"
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/powersave-0.15.19/daemon/pm_interface.cpp new/powersave-0.15.20/daemon/pm_interface.cpp
--- old/powersave-0.15.19/daemon/pm_interface.cpp 2007-11-20 12:30:50.000000000 +0100
+++ new/powersave-0.15.20/daemon/pm_interface.cpp 2008-02-03 20:49:09.000000000 +0100
@@ -27,6 +27,8 @@
#include
#include
#include
+#include
+#include
#include "event_management.h"
#include "main_loop.h"
@@ -471,12 +473,12 @@
bool PM_Interface::suspendToDisk()
{
- if (!_can_suspend_to_ram) {
- pDebug(DBG_WARN, "ACPI S3 state not available");
+ if (!_can_suspend_to_disk) {
+ pDebug(DBG_WARN, "ACPI S4 state not available");
return false;
}
- if (liblazy_hal_is_caller_privileged("hal-power-hibernate") != 1)
+ if (liblazy_hal_is_caller_privileged("org.freedesktop.hal.power-management.hibernate") != 1)
return false;
else if (sendSleepRequest("Hibernate", DBUS_TYPE_INVALID)) {
pDebug(DBG_ERR, "Could not send suspend to disk request to HAL\n");
@@ -498,7 +500,7 @@
int wake_up = 0;
- if (liblazy_hal_is_caller_privileged("hal-power-suspend") != 1)
+ if (liblazy_hal_is_caller_privileged("org.freedesktop.hal.power-management.suspend") != 1)
return false;
else if (sendSleepRequest("Suspend",
DBUS_TYPE_INT32,
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/powersave-0.15.19/daemon/pm_interface.h new/powersave-0.15.20/daemon/pm_interface.h
--- old/powersave-0.15.19/daemon/pm_interface.h 2007-11-20 12:30:50.000000000 +0100
+++ new/powersave-0.15.20/daemon/pm_interface.h 2008-02-03 20:49:06.000000000 +0100
@@ -25,13 +25,14 @@
#ifndef POWERSAVE_PM_INTERFACE_H
#define POWERSAVE_PM_INTERFACE_H
-#include
#include "throttle_interface.h"
-#include "config_pm.h"
+
#include "battery.h"
#include "powerlib.h"
#include "dbus_server.h"
+using namespace std;
+
class MainLoop;
class EventManagement;
class Brightness;
@@ -224,7 +225,7 @@
* @return DBUS_ERROR
*/
DBUS_ERROR handleDBusMessage(DBusMessage *msg, DBusMessage *reply,
- const string &msg_member);
+ const string &msg_member);
/** @brief called when coming back from suspend
*
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/powersave-0.15.19/daemon/powersaved.cpp new/powersave-0.15.20/daemon/powersaved.cpp
--- old/powersave-0.15.19/daemon/powersaved.cpp 2007-11-20 12:30:50.000000000 +0100
+++ new/powersave-0.15.20/daemon/powersaved.cpp 2008-02-03 20:49:05.000000000 +0100
@@ -28,6 +28,8 @@
#include
#include <fstream>
#include
+#include
+#include
#include "config_pm.h"
#include "acpi.h"
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/powersave-0.15.19/INSTALL new/powersave-0.15.20/INSTALL
--- old/powersave-0.15.19/INSTALL 2007-11-20 12:31:09.000000000 +0100
+++ new/powersave-0.15.20/INSTALL 2008-02-03 20:50:15.000000000 +0100
@@ -2,7 +2,7 @@
*************************
Copyright (C) 1994, 1995, 1996, 1999, 2000, 2001, 2002, 2004, 2005,
-2006 Free Software Foundation, Inc.
+2006, 2007 Free Software Foundation, Inc.
This file is free documentation; the Free Software Foundation gives
unlimited permission to copy, distribute and modify it.
@@ -67,6 +67,9 @@
all sorts of other programs in order to regenerate files that came
with the distribution.
+ 6. Often, you can also type `make uninstall' to remove the installed
+ files again.
+
Compilers and Options
=====================
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/powersave-0.15.19/libpower/fan.c new/powersave-0.15.20/libpower/fan.c
--- old/powersave-0.15.19/libpower/fan.c 2007-11-20 12:30:47.000000000 +0100
+++ new/powersave-0.15.20/libpower/fan.c 2008-02-03 20:47:17.000000000 +0100
@@ -67,7 +67,7 @@
/* expect that dirent will always give back the same order of files(directories) */
while (1) {
dirent = readdir(dir);
- if (dirent <= 0) {
+ if (dirent == NULL) {
closedir(dir);
return -3;
}
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/powersave-0.15.19/libpower/powerlib.c new/powersave-0.15.20/libpower/powerlib.c
--- old/powersave-0.15.19/libpower/powerlib.c 2007-11-20 12:30:47.000000000 +0100
+++ new/powersave-0.15.20/libpower/powerlib.c 2008-02-03 20:47:17.000000000 +0100
@@ -40,7 +40,7 @@
static int isACPI = NOT_SUPPORTED;
-int checkACPI()
+int checkACPI(void)
{
/* already set, so don't check it again */
if (isACPI != NOT_SUPPORTED)
@@ -184,11 +184,13 @@
int _write_line(const char *filename, const char *fmt, ...)
{
FILE *fp = fopen(filename, "w+");
+ va_list ap;
+
if (!fp) {
pDebug(DBG_DIAG, "Could not open %s for writing", filename);
return -1;
}
- va_list ap;
+
va_start(ap, fmt); /* get variable argument list passed */
if (vfprintf(fp, fmt, ap) < 0) {
pDebug(DBG_DIAG, "Could not write to %s", filename);
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/powersave-0.15.19/libpower/therm.c new/powersave-0.15.20/libpower/therm.c
--- old/powersave-0.15.19/libpower/therm.c 2007-11-20 12:30:47.000000000 +0100
+++ new/powersave-0.15.20/libpower/therm.c 2008-02-03 20:47:16.000000000 +0100
@@ -186,7 +186,7 @@
/* expect that dirent will always give back the same order of files(directories) */
while (1) {
dirent = readdir(dir);
- if (dirent <= 0) {
+ if (dirent == NULL) {
closedir(dir);
return -3;
}
@@ -306,7 +306,7 @@
/* expect that dirent will always give back the same order of files(directories) */
while (1) {
dirent = readdir(dir);
- if (dirent <= 0) {
+ if (dirent == NULL) {
closedir(dir);
return -3;
}
@@ -361,7 +361,7 @@
/* expect that dirent will always give back the same order of files(directories) */
while (1) {
dirent = readdir(dir);
- if (dirent <= 0) {
+ if (dirent == NULL) {
closedir(dir);
return -3;
}
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/powersave-0.15.19/testsuite/testclient/testclient.c new/powersave-0.15.20/testsuite/testclient/testclient.c
--- old/powersave-0.15.19/testsuite/testclient/testclient.c 2007-11-20 12:30:49.000000000 +0100
+++ new/powersave-0.15.20/testsuite/testclient/testclient.c 2008-02-03 20:48:29.000000000 +0100
@@ -87,7 +87,10 @@
*/
+#ifndef DBUS_API_SUBJECT_TO_CHANGE
#define DBUS_API_SUBJECT_TO_CHANGE
+#endif
+
#include "powerlib.h"
#include
#include
@@ -102,21 +105,21 @@
static int CONNECT = 0;
static int CONNECT_AND_CLOSE = 0;
-void usage();
+void usage(void);
DBusHandlerResult filter_function(DBusConnection *, DBusMessage *, void *);
void checkArgs(int argc, char **argv);
-GMainLoop *gmain;
+static GMainLoop *gmain;
void checkArgs(int argc, char **argv)
{
int option_index = 0;
struct option opts[] = {
- {"connect", 0, 0, 'c'},
- {"connect-and-close", 0, 0, 'C'},
- {"help", 0, 0, 'h'},
- {NULL, 0, 0, 0},
+ {"connect", 0, NULL, 'c'},
+ {"connect-and-close", 0, NULL, 'C'},
+ {"help", 0, NULL, 'h'},
+ {NULL, 0, NULL, 0},
};
while (1) {
@@ -148,11 +151,10 @@
int main(int argc, char *argv[])
{
- checkArgs(argc, argv);
-
DBusError error;
DBusConnection *connection;
+ checkArgs(argc, argv);
/* set up a new main loop with glib */
gmain = g_main_loop_new(NULL, FALSE);
@@ -199,17 +201,18 @@
{
DBusError error;
+ /* the argument received */
+ char *value;
+ const char *signal;
+
dbus_error_init(&error);
if (dbus_message_get_type(message) != DBUS_MESSAGE_TYPE_SIGNAL) {
return DBUS_HANDLER_RESULT_NOT_YET_HANDLED;
}
- /* the argument received */
- char *value;
-
/* get the name of the signal */
- const char *signal = dbus_message_get_member(message);
+ signal = dbus_message_get_member(message);
if (liblazy_dbus_message_get_basic_arg(message, DBUS_TYPE_STRING, &value, 0) < 0) {
printf(" Warning: Received signal %s, but no string argument\n", error.message);
@@ -252,7 +255,7 @@
return 0;
}
-void usage()
+void usage(void)
{
printf("Test client for connection to powersaved and\n"
"getting informed about acpi events, powersave events,\n"
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/powersave-0.15.19/user_binary/powersave.cpp new/powersave-0.15.20/user_binary/powersave.cpp
--- old/powersave-0.15.19/user_binary/powersave.cpp 2007-11-20 12:30:47.000000000 +0100
+++ new/powersave-0.15.20/user_binary/powersave.cpp 2008-02-03 22:29:38.000000000 +0100
@@ -634,13 +634,13 @@
int supported;
if (liblazy_hal_get_property_bool(HAL_UDI_COMPUTER,
"power_management.can_suspend", &supported)
- && !supported) {
+ || supported != 1) {
printf("Suspend to ram is not supported.\n");
ret = -1;
} else {
int wake_up = 0;
- if (liblazy_hal_is_caller_privileged("hal-power-suspend") != 1)
- privilege_error("hal-power-suspend");
+ if (liblazy_hal_is_caller_privileged("org.freedesktop.hal.power-management.suspend") != 1)
+ privilege_error("org.freedesktop.hal.power-management.suspend");
else if (send_sleep_request("Suspend",
DBUS_TYPE_INT32,
&wake_up,
@@ -653,14 +653,14 @@
}
if (STANDBY) {
int supported;
- if (!liblazy_hal_get_property_bool(HAL_UDI_COMPUTER,
+ if (liblazy_hal_get_property_bool(HAL_UDI_COMPUTER,
"power_management.can_standby", &supported)
- && !supported) {
+ || supported != 1) {
printf("Standby is not supported.\n");
ret = -1;
} else {
- if (liblazy_hal_is_caller_privileged("hal-power-standby") != 1)
- privilege_error("hal-power-standby");
+ if (liblazy_hal_is_caller_privileged("org.freedesktop.hal.power-management.standby") != 1)
+ privilege_error("org.freedesktop.hal.power-management.standby");
else if (send_sleep_request("Standby", DBUS_TYPE_INVALID)) {
fprintf(stderr, "Could not send standby request to HAL\n");
ret = -1;
@@ -670,14 +670,14 @@
}
} else if (SUSPEND_TO_DISK) {
int supported;
- if (!liblazy_hal_get_property_bool(HAL_UDI_COMPUTER,
+ if (liblazy_hal_get_property_bool(HAL_UDI_COMPUTER,
"power_management.can_hibernate", &supported)
- && !supported) {
+ || supported != 1) {
printf("Suspend to disk is not supported.\n");
ret = -1;
} else {
- if (liblazy_hal_is_caller_privileged("hal-power-hibernate") != 1)
- privilege_error("hal-power-hibernate");
+ if (liblazy_hal_is_caller_privileged("org.freedesktop.hal.power-management.hibernate") != 1)
+ privilege_error("org.freedesktop.hal.power-management.hibernate");
else if (send_sleep_request("Hibernate", DBUS_TYPE_INVALID)) {
fprintf(stderr, "Could not send suspend to disk request to HAL\n");
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Remember to have fun...
---------------------------------------------------------------------
To unsubscribe, e-mail: opensuse-commit+unsubscribe@opensuse.org
For additional commands, e-mail: opensuse-commit+help@opensuse.org