mirror of
https://github.com/Llewellynvdm/conky.git
synced 2024-11-16 18:15:17 +00:00
- Fix if_mounted on FreeBSD
- Mention submitter in AUTHORS Submitted by: Elisey O. Savateev <bio3k at softboard dot ru> git-svn-id: https://conky.svn.sourceforge.net/svnroot/conky/trunk/conky@347 7f574dfc-610e-0410-a909-a81674777703
This commit is contained in:
parent
ce4572300e
commit
ca4dceb2ae
3
AUTHORS
3
AUTHORS
@ -37,6 +37,9 @@ Dennis Frommknecht
|
||||
Dennis Kaandorp <addict at quicknet dot nl>
|
||||
adt746x stuff
|
||||
|
||||
Elisey O. Savateev <bio3k at softboard dot ru>
|
||||
Fixed if_mounted on FreeBSD
|
||||
|
||||
Falk Feuersenger <lumberjack at users dot sourceforge dot net>
|
||||
I2C divisor from a file
|
||||
|
||||
|
12
src/conky.c
12
src/conky.c
@ -303,6 +303,7 @@ static int blockstart[MAX_IF_BLOCK_DEPTH];
|
||||
|
||||
int check_mount(char *s)
|
||||
{
|
||||
#if defined(__linux__)
|
||||
int ret = 0;
|
||||
FILE *mtab = fopen("/etc/mtab", "r");
|
||||
if (mtab) {
|
||||
@ -319,6 +320,17 @@ int check_mount(char *s)
|
||||
ERR("Could not open mtab");
|
||||
}
|
||||
return ret;
|
||||
#elif defined(__FreeBSD__)
|
||||
struct statfs *mntbuf;
|
||||
int i, mntsize;
|
||||
|
||||
mntsize = getmntinfo(&mntbuf, MNT_NOWAIT);
|
||||
for (i = mntsize - 1; i >= 0; i--)
|
||||
if (strcmp(mntbuf[i].f_mntonname, s) == 0)
|
||||
return 1;
|
||||
|
||||
return 0;
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
|
@ -19,6 +19,11 @@
|
||||
#include <locale.h>
|
||||
#include <langinfo.h>
|
||||
#include <wchar.h>
|
||||
#if defined(__FreeBSD__)
|
||||
#include <sys/param.h>
|
||||
#include <sys/mount.h>
|
||||
#include <sys/ucred.h>
|
||||
#endif /* __FreeBSD__ */
|
||||
|
||||
#ifdef X11
|
||||
#if defined(HAVE_CAIRO_H) && defined(HAVE_CAIRO_XLIB_H) && defined(WANT_CAIRO)
|
||||
|
Loading…
Reference in New Issue
Block a user