Commit Graph

186 Commits

Author SHA1 Message Date
Stefan Gehn b9f24e8c80 Use g_strdup instead of standard strdup
The remaining codebase uses g_strdup() already so do the same for the
chime command too. This fixes a gcc warning caused by a missing include
for strdup().
2014-07-09 22:23:41 +02:00
Stefan Gehn cfc573790e Disable unused X11 SM code parts
Move all variable and struct init code into if 0 blocks like the code
that is supposed to use this. Eventually this whole cruft can be
dropped altogether in case GKrellM can be ported to use Gtk+ session
management.
2014-07-09 22:23:41 +02:00
Stefan Gehn b279d76837 Remove set but unread variables
- Adding a sensor in the mbmon support stored the added sensor in a
  pointer but never used it afterwards
- Drop pixbuf width in draw_left_frame_overlap, the code unlike other
  drawing helpers does not use the pixbuf width
- Remove unused scroll selection from net_stats_page

This fixes several set but unread warnings when compiling with a recent
gcc (encountered with gcc 4.8.2).
2014-07-09 22:23:41 +02:00
Stefan Gehn 720ac43b8c Add support for GPU-Z sensor information on Windows
Read sensor information from the GPU-Z shared memory area if present.
As with all sensor backends on Windows this needs the GPU-Z tool
running in the background.
2014-07-09 22:06:19 +02:00
Stefan Gehn d712ce32ce Wait as short as possible after starting win32 sensor app
Do not use a fixed 5 second delay after having a started a windows
sensor application, instead try to access the shared memory area
repeatedly and only give up after 10 seconds. Please note that for this
feature to be usable the sensor app must be found in PATH.
2014-07-09 22:06:19 +02:00
Stefan Gehn ff5cd65678 Simplify win32 shared memory access
- Move opening and closing of a win32 shared memory area into helper
  functions. shm_open ensures that the data pointer is valid and
  otherwise gets rid of the opened file handle right away. shm_close
  cleans up both the handle and the data pointer if needed.

- Redo the initial check for presence of a sensor tool that uses a
  shared memory area for its sensor data by using the above two
  functions

- Port all sensor value reading to use shm_open/shm_close as well

This gets rid of some code duplication and also lowers the indentation
level in several areas which hopefully makes the code a bit easier to
read. Additionally all the win32 API calls are limited to two functions.
2014-07-09 22:06:19 +02:00
Stefan Gehn 4991b98879 Move win32 sensor code into own file
The window sysdep code is quite long by now and since I plan to add
more to it let's split things up to have smaller portions of code to
work on.
2014-07-09 22:06:18 +02:00
Stefan Gehn d33190cc0b Remove unsupported linker flags for windows builds
Do not use the default LINK_FLAGS value for windows builds, the default
"-E" linker option only causes warnings for MinGW since it's essentially
ignored by the linker.

The flag is also unneeded since linking plugins against the gkrellm
binary is not done on win32 so none of the gkrellm/gkrellmd functions
need to be exported, the API is manually exposed via the win32-specific
libgkrellm/libgkrellmd static libs.
2014-07-09 22:04:42 +02:00
Stefan Gehn da95bca5c5 Simplify setting default installation prefix
Just setting a default value for PREFIX should have the same result as
an explicit check for an empty INSTALLROOT variable.
2014-04-18 09:29:57 +02:00
Stefan Gehn eb0ded8d55 Use binary extension during gkrellm build
Honor the BINEXT variable in the gkrellm and gkrellmd target to enforce
building with the correct extension. This is needed for recent mingw-w64
cross toolchains since those do not automatically append ".exe" when
linking.
2014-04-18 09:29:27 +02:00
Stefan Gehn 3a487e3271 Check all battery variants when polling
On Thinkpads T410s sysfs may switch between energy_full/_now and
charge_full/_now files across suspend/resume. Instead of polling only
one set of files always try all variants when checking battery levels.
This fixes a battery level of 0 in GKrellM after resume.

Thanks to Joern Engel for tracking this down and for providing a patch
via the Debian bugtracker.

See also http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=630117
2013-07-29 20:23:15 +02:00
Stefan Gehn 9693241883 Updated fr.po translation from Jerome UZEL 2013-07-21 13:00:30 +02:00
Stefan Gehn b378f14f8d Changelog: Mention last patch 2013-07-20 14:15:56 +02:00
Stefan Gehn 8abd662cd6 Add missing include and link args for gmodule
Explicitely add needed include arguments as well as linker arguments
for gmodule. Before this change we relied on gmodule being an implicit
dependency pulled in via the gtk+-2.0 module, this does not seem to be
the case anymore with >=gdk-pixbuf-2.24 and >=pango-1.30.

Thanks for Alexandre Rostovtsev for bringing this up on the mailinglist
and for providing a first patch.

See also https://bugs.gentoo.org/show_bug.cgi?id=428532
2013-07-20 14:08:38 +02:00
Stefan Gehn 956bd11b50 Treat cifs as remote filesystem
Mark mount points of type cifs as remote filesystems to make gkrellm use
nfs-timeout as polling interval instead of the standard fs-timeout which
should only be used to poll local filesystems.

Thanks to Gerard Neil for submitting this patch.
2013-07-20 14:02:15 +02:00
Stefan Gehn 0db8bfd07a Do not scan autofs mount points
Accessing mount points to determine free space actually triggers a
mounting operation of autofs mounts. This results in all autofs mount
points to be always-mounted while gkrellm is running, something which
is hardly desirable.

Thanks to Gerard Neil for submitting this patch.
2013-07-20 14:02:07 +02:00
Stefan Gehn 1d11384131 Abort gkrellmd detaching if chdir fails
Handle the return value for chdir() and abort daemonizing of gkrellmd in
case chdir failed.
2012-02-22 19:58:39 +01:00
Stefan Gehn cdbeeb9b17 Fix syslog function call (missing format string)
Add proper format-string to call to syslog() function.

Fixes Debian Bug #646262
2012-02-22 19:41:29 +01:00
Stefan Gehn 207a0519ac Do not free nullpointer in Darwin disk reading
Calling CFRelease() on a NULL value is wrong and causes crashes.
This should fix MacPorts ticket #29565.
2011-12-05 17:12:28 +01:00
Stefan Gehn fdc17315b7 Do not include gcrypt.h for newer GnuTLS versions
Not linking against Libgcrypt is not enough, we also should not try to
include headers. This fixes GnuTLS >= 2.12 detection when Libgcrypt
headers are not installed/found.
2011-11-26 20:00:53 +01:00
Stefan Gehn 752e5965b1 Only use Libgcrypt for GnuTLS < 2.12
Only initialize Libgcrypt threading functions on GnuTLS < 2.12 which
does not do this automatically. Also drop explicit linking against
Libgcrypt on newer GnuTLS version.

This should allow GKrellM to work with a GnuTLS that uses Nettle instead
of Libgcrypt as its cryptographic backend.
2011-08-27 16:51:46 +02:00
Bill Wilson 50b126e085 Patch from Neil Booth: Add multiple CPU capability to CPU monitor for
Dragonfly.  Acquired dragonfly.c from web so could apply patch.
I have no clue why I never had a dragonfly.c.
2011-08-08 16:06:26 -05:00
Bill Wilson 40c7cb01ce Store lockfiles under /var/lock/gkrellm-UID directories to make
lockfiles work for multiple users.
2011-08-08 15:53:14 -05:00
Bill Wilson 6365d18ad0 And some more Jindrich Makovicka patch changes for GTK3 compatibility. 2011-08-08 15:48:18 -05:00
Bill Wilson 7fee71d39f More GTK3 compatibility changes in mail.c from Jindrich Makovich 2011-08-08 15:44:46 -05:00
Bill Wilson 873fed3c1e Patch from Jindrich Makovicka: update multiple GKrellM files to compile
with -DGTK_DISABLE_DEPRECATED -DGSEAL_ENABLE for GTK3 compatibility.
Replaces GtkItemFactory and GtkTooltips.
2011-08-08 15:39:22 -05:00
Bill Wilson 421cb3102e Add nvidia-smi interface to linux.c for getting nvidia GPU temperatures 2011-08-08 15:13:31 -05:00
Bill Wilson 4c85ad6913 New pt.po translation from Ze (based on pt_BR.po) 2011-08-03 20:59:01 -05:00
Bill Wilson 0daeae71a5 New uk.po translation from Roman Savochenko 2011-08-03 20:55:07 -05:00
Bill Wilson d2e5858153 Updated ru.po translation from Roman Savochenko 2011-08-03 20:41:29 -05:00
Stefan Gehn f1d238478d Fix reading of speedfan shared memory area on win64, make the "handle" field a 32bit signed integer instead of a void pointer (whose length differs depending on the arch gkrellm was built for) 2010-10-09 16:14:11 +00:00
Stefan Gehn 065787f24f Merge with gkrellm-2.3.5.tar.bz2 (release tarball) 2010-10-08 06:55:09 +00:00
Stefan Gehn bf3d25c568 Merge with gkrellm-2.3.5-pre2.tar.bz2 2010-10-06 21:38:56 +00:00
Stefan Gehn 6bd26e8401 Allow disk paths of (almost) any length in both gkrellm and gkrellmd.
monitor.c: serve_disk_data() now uses a dynamic buffer for to-be-sent disk-lines instead of relying on a very short static array.
client.c: read_server_setup() now uses a static read buffer that is as big/small as the global server_buf. client_disk_line_from_server() now uses a dynamic string for disk names.
2010-10-06 20:50:45 +00:00
Stefan Gehn 3450feee97 Update svn:ignore properties 2010-09-23 15:32:30 +00:00
Stefan Gehn c67cf611a6 - gkrellm.h. Bump maximum line-/item-length for config to 512 (needed for long disk names on Darwin).
- src/disk.c, server/monitor.c: Add gkrellm_disk_add_by_name() that allows creating disks with a custom label from sysdep code.
- src/Makefile, server/Makefile: Cleanup of darwin/darwin9/macosx targets. All custom variables are now set in src/Makefile and server/Makefile to allow easy building inside these subdirs. Removed very old link-flags which were used before OS X 10.3.
- All Makefiles: Remove unused GTK_CONFIG definitions, they were neither passed as an argument nor executed anywhere.
- Makefile: Update comments documenting Darwin and OS X targets (darwin, darwin9 and macosx)
- src/sysdeps/darwin.c: Use utmpx instead of deprecated utmp.
- src/sysdeps/darwin.c: Fix possible leak in gkrellm_sys_cpu_init(), pinfo was never free'd.
- src/sysdeps/darwin.c: Rewrite disk device enumeration and performance gathering. The previous implementation failed as soon as a single device contained no medium, resulting in no/wrong performance data for all subsequent devices. Also provides labels for krells based on real device-names (uses new gkrellm_disk_add_by_name()).
2010-09-23 15:31:24 +00:00
Stefan Gehn d36c3ec662 Fix missing format-strings to avoid compiler warnings 2010-09-23 15:06:21 +00:00
Stefan Gehn 8dbee76730 win32.c: Drop current working directory from DLL search path by calling SetDllDirectory() with an empty string. Avoids possible security problems, especially when loading plugins.
Makefile, win32.c: Load ntdll.dll and lookup used functions at runtime (safer for future windows version and fixes unintended linking against sscanf() from ntdll)
win32.c: Add gkrellm_sys_inet_cleanup() for proper unloading of iphlpapi.dll
2010-09-20 20:53:48 +00:00
Stefan Gehn a457f7a3e1 INSTALL: Slightly update win32 build instructions
ChangeLog: Add and clarify win32-related changes
win32-resource.rc: Bump version number to 2.3.5
2010-09-15 16:14:11 +00:00
Stefan Gehn d72d689c4c Merge with changes from gkrellm-2.3.5-pre.tar.bz2 2010-09-15 15:32:14 +00:00
Stefan Gehn 1cce0cd3c9 Improve fix for building with mingw-w64 environment (#ifdef check for mingw-w64 env did not work for 32 bit builds) 2010-06-30 07:55:33 +00:00
Stefan Gehn 915d03ad66 Do not link against liblargeint on windows anymore. Allow overriding windres via environment variables (preparation for win64 builds) 2010-06-21 14:49:40 +00:00
Stefan Gehn 61ef995a7c Fix building with mingw-w64 environment which contains some updated windows-heeaders. Remove dependency on liblargeint which does not exist on win64 and is unneeded as gcc has native 64bit integer support. 2010-06-21 14:47:25 +00:00
Stefan Gehn f3c095a4f6 Correct email address 2010-06-13 17:54:28 +00:00
Stefan Gehn 07551c6fe9 Fix enumeration of fstab-entries in gkrellmd (fstab entries were only sent to a client if fstab was marked as modified, unfortunately this is never the case on win32). Fixes #3.
Remove parsing of "--debug-level" in get_args(), it is already parsed in parse_config()
Make "-d" commandline option the short version for "--detach" only. Before it was also used as a short version for "--debug-level"
2010-06-13 13:40:20 +00:00
Stefan Gehn 7e86c76f32 Switch from printf() to GLib/GKrellM logging (gkrellm_debug(), g_warning(), g_message())
Replace sprintf() calls with snprintf() for security reasons.
2010-06-12 19:41:22 +00:00
Stefan Gehn 4ff5bbfeb9 Switch from printf() to gkrellm_debug() and add more debug logging for client-connections 2010-06-12 19:39:28 +00:00
Stefan Gehn 22fd09df22 Fix time formatting on win32 for monthly stats. Switch to glib/gkrellm debug logging. 2010-06-12 19:34:04 +00:00
Stefan Gehn ce0158f031 Support monitoring of active IPv6 TCP connections on windows vista or newer now that GKrellM can be built with IPv6 support on win32 2010-06-12 19:32:16 +00:00
Stefan Gehn 836310c392 Enable IPv6-support on win32 if target os is windows xp or newer (win2k lacks needed functions) 2010-06-12 19:26:34 +00:00