Thanks to Chris Debenham <chris.debenham@aus.sun.com>, the LCDproc server

process LCDd now compiles and runs properly on Solaris! Additionally, he
has provided a new driver for a 16x2 LCD made by an Australian company.

I've compiled and executed this new code on a Solaris 2.6 box, and while I
don't have the display the new driver uses, LCDd tries to use it anyway,
fails (since the device isn't installed), and continues running, so this
looks solid!
This commit is contained in:
William Ferrell committed 2000-11-29 18:48:53 +00:00
1 parent f150f213bf
commit 82764f08e3
14 files changed
+683 -5

No files matched your search

+20
View File
@@ -15,6 +15,11 @@
#include "mode.h"
#include "mem.h"
#ifdef SOLARIS
#include <strings.h>
#endif
struct meminfo {
int total, cache, buffers, free, shared;
};
@@ -27,7 +32,9 @@ static void
get_mem_info (struct meminfo *result)
{
// int i, res; char *bufptr;
int pagesize,page,i;
#ifndef SOLARIS
reread (meminfo_fd, "get_meminfo:");
result[0].total = getentry ("MemTotal:", buffer);
result[0].free = getentry ("MemFree:", buffer);
@@ -36,26 +43,39 @@ get_mem_info (struct meminfo *result)
result[0].cache = getentry ("Cached:", buffer);
result[1].total = getentry ("SwapTotal:", buffer);
result[1].free = getentry ("SwapFree:", buffer);
#else
result[0].total = 0;
result[0].free = 0;
result[0].shared = 0;
result[0].buffers = 0;
result[0].cache = 0;
result[1].total = 0;
result[1].free = 0;
#endif
}
int
mem_init ()
{
#ifndef SOLARIS
if (!meminfo_fd) {
meminfo_fd = open ("/proc/meminfo", O_RDONLY);
}
#endif
return 0;
}
int
mem_close ()
{
#ifndef SOLARIS
if (meminfo_fd)
meminfo_fd = open ("/proc/meminfo", O_RDONLY);
meminfo_fd = 0;
#endif
return 0;
}