In the linux kernel 2.6.31 and above, device data can either be in
/sys/class/hwmon/hwmonDEV or /sys/class/hwmon/hwmonDEV/device.
Just stat'ing for the latter doesn't work since it can exist but not contain
the required data (see https://bugs.launchpad.net/bugs/435571 for details).
The patch could be improved to keep in memory the right location of the data
on the user's system instead of trying each time, but, is it worth doing it?
* Drop all need_mask alterations (no idea why there were here at all,
but surely not sane since they are missing in the non-linux
functions).
* Drop the update delay for update_meminfo(), as parsing /proc should
not lead to abnormal overhead.
* Check for x_initialised from inside update_x11info(), so we can call
it unconditionally.
All ERR()'s are renamed to NORM_ERR() and box to mbox so that they don't
clash with things in ncurses.h .
Ncurses is enabled by default when building conky but can be disabled with
--disable-ncurses .
At the moment configure doesn't check if ncurses is actually available.
I'm adding support for ncurses so that we can make as much things as possible
that are only available in X11 also available in console in the future.
Added support for X alignment across multi-lined objects (i.e., using
$alignr with $exec). This may be a bit buggy. Disabled OpenMP code
until GCC's implementation stabilizes (it's causing too many problems).
A couple Lua API changes.
Basically, I just added three new process properties (io_read, io_write, io_perc - representing
the amount of I/O done by the process during the update interval) and $top_io, that sorts
processes based on io_perc.
Atm, it's completely #ifdef'd, since it requires kernel support. But that creates some wierd
looking syntax at some places, so it may be better to remove some ifdefs. It even may be
possible to completely remove the ifdefs (ie. convert them to #ifdef linux) since the code will
compile just fine even if the kernel doesn't support I/O accounting. I'll leave that for someone
else to decide.
When you started "$updates|${addr eth0}" displayed "0|No Address",
after the first update you got something normal like "1|192.168.0.1"
This patch should fix this.
This diff moves Linux-specific parts of diskio.c into linux.c and uses
the remaining diskio functions to correctly implement this functionality
for FreeBSD. It also hooks diskio.c to the FreeBSD build.
Signed-off-by: Brenden Matthews <brenden@rty.ca>
Moved interface_up(...) from linux.{c.h} to common.{c,h} and taught it
to check for ENXIO as well to make it work on FreeBSD.
Signed-off-by: Nikos Ntarmos <ntarmos@cs.uoi.gr>
Despite this is actually not much code and could stay inside linux.c as
well, this makes sense as I want to combine smapi and ibm-acpi
functionality. Virtually every user of a notebook made by IBM/Lenovo
will want both, so this should be a feature not a bug.
Besides making the ibm-acpi objects being built optionally, this should
not change anything to the code flow.
This was a bug, not a feature. From the FreeBSD manpage rtentry(9):
| Vt struct sockaddr *rt_gateway;
|
| The "target" of the route, which can either represent a destination in
| its own right (some protocols will put a link-layer address here), or
| some intermediate stop on the way to that destination (if the
| RTF_GATEWAY flag is set).
So for a default route with "dest" and "mask" both zero, either
RTF_GATEWAY is present, or "gate" is zero.
Some statics are now defined by configure.ac.in, conky.h got a lot
smaller, which I see as a positive sign.
This patch should not change any functionality, just change what's
defined where. Some features I did/could not test are probably broken,
also compiling for any other OS surely won't complete now. Though I
think fixing these problems is as easy as including some missing
headers.
I've done compile checks with the following configure options:
./configure --enable-eve --enable-rss --enable-smapi
--enable-wlan --enable-debug --enable-testing
So what needs to be tested is:
- audacious
- BMPx
- xmms2
- nvidia
* reproduce with a config displaying stuff for BAT0 and BAT1
while only BAT0 is installed: the call to get_battery_stuff()
for the existent BAT0 will reset the static variable rep and
the errors for BAT1 will be reported over and over again
* this fix is not perfect: if both batteries are missing, only
the first errors will be reported; but better than flooding the
terminal
git-svn-id: https://conky.svn.sourceforge.net/svnroot/conky/trunk/conky1@1243 7f574dfc-610e-0410-a909-a81674777703