diff options
author | cvs2svn <cvs2svn@FreeBSD.org> | 2002-01-29 04:56:35 +0000 |
---|---|---|
committer | cvs2svn <cvs2svn@FreeBSD.org> | 2002-01-29 04:56:35 +0000 |
commit | b315e20b06b5067b11496cbfb4744f5cf16a9639 (patch) | |
tree | 3fe761c428249a06677cf9f97eb9badee0732a6a /x11/kde4-baseapps/files | |
parent | 7f06f7b43a65cd1bd87825a1886b0e08e87f38e3 (diff) |
This commit was manufactured by cvs2svn to create tag 'RELEASE_4_5_0'.release/4.5.0
Notes
Notes:
svn path=/head/; revision=53938
svn path=/tags/RELEASE_4_5_0/; revision=53939; tag=release/4.5.0
Diffstat (limited to 'x11/kde4-baseapps/files')
-rw-r--r-- | x11/kde4-baseapps/files/patch-apm.c | 101 | ||||
-rw-r--r-- | x11/kde4-baseapps/files/patch-apm.h | 37 | ||||
-rw-r--r-- | x11/kde4-baseapps/files/patch-conf.c | 136 | ||||
-rw-r--r-- | x11/kde4-baseapps/files/patch-conf.h | 37 | ||||
-rw-r--r-- | x11/kde4-baseapps/files/patch-diskstat.c | 260 | ||||
-rw-r--r-- | x11/kde4-baseapps/files/patch-diskstat.h | 44 | ||||
-rw-r--r-- | x11/kde4-baseapps/files/patch-kdm::kfrontend::Makefile.am | 15 | ||||
-rw-r--r-- | x11/kde4-baseapps/files/patch-kdm::kfrontend::genkdmconf.c | 42 | ||||
-rw-r--r-- | x11/kde4-baseapps/files/patch-ksysguardd.c | 11 | ||||
-rw-r--r-- | x11/kde4-baseapps/files/patch-ksysguardd.h | 37 | ||||
-rw-r--r-- | x11/kde4-baseapps/files/patch-loadavg.c | 100 | ||||
-rw-r--r-- | x11/kde4-baseapps/files/patch-loadavg.h | 39 | ||||
-rw-r--r-- | x11/kde4-baseapps/files/patch-logfile.c | 184 | ||||
-rw-r--r-- | x11/kde4-baseapps/files/patch-logfile.h | 40 | ||||
-rw-r--r-- | x11/kde4-baseapps/files/patch-netdev.c | 322 | ||||
-rw-r--r-- | x11/kde4-baseapps/files/patch-netdev.h | 39 |
16 files changed, 0 insertions, 1444 deletions
diff --git a/x11/kde4-baseapps/files/patch-apm.c b/x11/kde4-baseapps/files/patch-apm.c deleted file mode 100644 index 08925da1dee5..000000000000 --- a/x11/kde4-baseapps/files/patch-apm.c +++ /dev/null @@ -1,101 +0,0 @@ ---- /dev/null Mon Nov 19 17:14:17 2001 -+++ ksysguard/ksysguardd/FreeBSD/apm.c Mon Nov 19 17:06:33 2001 -@@ -0,0 +1,98 @@ -+/* -+ KSysGuard, the KDE System Guard -+ -+ Copyright (c) 2001 Tobias Koenig <tokoe82@yahoo.de> -+ -+ This program is free software; you can redistribute it and/or -+ modify it under the terms of version 2 of the GNU General Public -+ License as published by the Free Software Foundation. -+ -+ 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., 675 Mass Ave, Cambridge, MA 02139, USA. -+ -+ $Id: apm.c,v 1.2 2001/09/18 14:03:53 tokoe Exp $ -+*/ -+ -+#include <fcntl.h> -+#include <machine/apm_bios.h> -+#include <stdio.h> -+ -+#include "Command.h" -+#include "apm.h" -+#include "ksysguardd.h" -+ -+static int ApmFD, BattFill, BattTime; -+ -+#define APMDEV "/dev/apm" -+ -+/* -+================================ public part ================================= -+*/ -+ -+void -+initApm(void) -+{ -+ if ((ApmFD = open(APMDEV, O_RDONLY)) < 0) -+ return; -+ -+ if (updateApm() < 0) -+ return; -+ -+ registerMonitor("apm/batterycharge", "integer", printApmBatFill, -+ printApmBatFillInfo); -+ registerMonitor("apm/remainingtime", "integer", printApmBatTime, -+ printApmBatTimeInfo); -+} -+ -+void -+exitApm(void) -+{ -+ removeMonitor("apm/batterycharge"); -+ removeMonitor("apm/remainingtime"); -+ -+ close(ApmFD); -+} -+ -+int -+updateApm(void) -+{ -+ struct apm_info info; -+ int retval; -+ -+ retval = ioctl(ApmFD, APMIO_GETINFO, &info); -+ -+ BattFill = info.ai_batt_life; -+ BattTime = info.ai_batt_time; -+ -+ return retval; -+} -+ -+void -+printApmBatFill(const char* c) -+{ -+ fprintf(CurrentClient, "%d\n", BattFill); -+} -+ -+void -+printApmBatFillInfo(const char* c) -+{ -+ fprintf(CurrentClient, "Battery charge\t0\t100\t%%\n"); -+} -+ -+void -+printApmBatTime(const char* c) -+{ -+ fprintf(CurrentClient, "%d\n", BattTime); -+} -+ -+void -+printApmBatTimeInfo(const char* c) -+{ -+ fprintf(CurrentClient, "Remaining battery time\t0\t0\tmin\n"); -+} diff --git a/x11/kde4-baseapps/files/patch-apm.h b/x11/kde4-baseapps/files/patch-apm.h deleted file mode 100644 index 73e509bdd61b..000000000000 --- a/x11/kde4-baseapps/files/patch-apm.h +++ /dev/null @@ -1,37 +0,0 @@ ---- /dev/null Mon Nov 19 17:14:17 2001 -+++ ksysguard/ksysguardd/FreeBSD/apm.h Mon Nov 19 17:06:33 2001 -@@ -0,0 +1,34 @@ -+/* -+ KSysGuard, the KDE System Guard -+ -+ Copyright (c) 2001 Tobias Koenig <tokoe82@yahoo.de> -+ -+ This program is free software; you can redistribute it and/or -+ modify it under the terms of version 2 of the GNU General Public -+ License as published by the Free Software Foundation. -+ -+ 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., 675 Mass Ave, Cambridge, MA 02139, USA. -+ -+ $Id: apm.h,v 1.2 2001/09/18 14:03:53 tokoe Exp $ -+*/ -+ -+#ifndef _apm_h_ -+#define _apm_h_ -+ -+void initApm(void); -+void exitApm(void); -+int updateApm(void); -+ -+void printApmBatFill(const char*); -+void printApmBatFillInfo(const char*); -+void printApmBatTime(const char*); -+void printApmBatTimeInfo(const char*); -+ -+#endif diff --git a/x11/kde4-baseapps/files/patch-conf.c b/x11/kde4-baseapps/files/patch-conf.c deleted file mode 100644 index a4de97379b10..000000000000 --- a/x11/kde4-baseapps/files/patch-conf.c +++ /dev/null @@ -1,136 +0,0 @@ ---- /dev/null Mon Nov 19 17:14:17 2001 -+++ ksysguard/ksysguardd/FreeBSD/conf.c Mon Nov 19 17:06:50 2001 -@@ -0,0 +1,133 @@ -+/* -+ KSysGuard, the KDE System Guard -+ -+ Copyright (c) 2001 Tobias Koenig <tokoe82@yahoo.de> -+ -+ This program is free software; you can redistribute it and/or -+ modify it under the terms of version 2 of the GNU General Public -+ License as published by the Free Software Foundation. -+ -+ 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., 675 Mass Ave, Cambridge, MA 02139, USA. -+ -+ $Id: conf.c,v 1.3 2001/11/05 23:24:19 tokoe Exp $ -+*/ -+ -+#include <stdio.h> -+#include <stdlib.h> -+#include <string.h> -+ -+#include "Command.h" -+#include "ccont.h" -+#include "conf.h" -+ -+CONTAINER LogFileList = 0; -+CONTAINER SensorList = 0; -+ -+void parseConfigFile(const char *filename) -+{ -+ FILE* config; -+ char line[2048]; -+ char *begin, *token, *tmp, *confSensor; -+ ConfigLogFile *confLog; -+ -+ -+ if (LogFileList) -+ destr_ctnr(LogFileList, free); -+ -+ if (SensorList) -+ destr_ctnr(SensorList, free); -+ -+ LogFileList = new_ctnr(CT_DLL); -+ SensorList = new_ctnr(CT_DLL); -+ -+ if ((config = fopen(filename, "r")) == NULL) { -+ log_error("can't open config file '%s'", filename); -+ -+ /* if we can't open a config file we have to add the -+ available sensors manually -+ */ -+ -+ confSensor = strdup("ProcessList"); -+ push_ctnr(SensorList, confSensor); -+ confSensor = strdup("Memory"); -+ push_ctnr(SensorList, confSensor); -+ confSensor = strdup("Stat"); -+ push_ctnr(SensorList, confSensor); -+ confSensor = strdup("NetDev"); -+ push_ctnr(SensorList, confSensor); -+ confSensor = strdup("NetStat"); -+ push_ctnr(SensorList, confSensor); -+ confSensor = strdup("CpuInfo"); -+ push_ctnr(SensorList, confSensor); -+ confSensor = strdup("LoadAvg"); -+ push_ctnr(SensorList, confSensor); -+ confSensor = strdup("DiskStat"); -+ push_ctnr(SensorList, confSensor); -+ confSensor = strdup("LogFile"); -+ push_ctnr(SensorList, confSensor); -+ -+ return; -+ } -+ -+ while (fgets(line, sizeof(line), config) != NULL) { -+ if ((line[0] == '#') || (strlen(line) == 0)) { -+ continue; -+ } -+ -+ if (strchr(line, '#')) -+ *(strchr(line, '#')) = '\0'; -+ -+ if (line[strlen(line) - 1] == '\n') -+ line[strlen(line) - 1] = '\0'; -+ -+ if (!strncmp(line, "LogFiles", 8)) { -+ begin = strchr(line, '='); -+ begin++; -+ -+ for (token = strtok(begin, ","); token; token = strtok(NULL, ",")) { -+ if ((confLog = (ConfigLogFile *)malloc(sizeof(ConfigLogFile))) == NULL) { -+ log_error("malloc() no free memory avail"); -+ continue; -+ } -+ confLog->name = strdup(token); -+ tmp = strchr(confLog->name, ':'); -+ *tmp = '\0'; -+ confLog->path = tmp; -+ confLog->path++; -+ -+ push_ctnr(LogFileList, confLog); -+ } -+ } -+ if (!strncmp(line, "Sensors", 7)) { -+ begin = strchr(line, '='); -+ begin++; -+ -+ for (token = strtok(begin, ","); token; token = strtok(NULL, ",")) { -+ confSensor = strdup(token); -+ push_ctnr(SensorList, confSensor); -+ } -+ } -+ } -+ -+ fclose(config); -+} -+ -+int sensorAvailable(const char *sensor) -+{ -+ int i; -+ -+ for (i = 0; i < level_ctnr(SensorList); i++) { -+ char* name = get_ctnr(SensorList, i); -+ if (!strcmp(name, sensor)) -+ return 1; -+ } -+ -+ return 0; -+} diff --git a/x11/kde4-baseapps/files/patch-conf.h b/x11/kde4-baseapps/files/patch-conf.h deleted file mode 100644 index 8aba2e520205..000000000000 --- a/x11/kde4-baseapps/files/patch-conf.h +++ /dev/null @@ -1,37 +0,0 @@ ---- /dev/null Mon Nov 19 17:14:17 2001 -+++ ksysguard/ksysguardd/FreeBSD/conf.h Mon Nov 19 17:06:50 2001 -@@ -0,0 +1,34 @@ -+/* -+ KSysGuard, the KDE System Guard -+ -+ Copyright (c) 2001 Tobias Koenig <tokoe82@yahoo.de> -+ -+ This program is free software; you can redistribute it and/or -+ modify it under the terms of version 2 of the GNU General Public -+ License as published by the Free Software Foundation. -+ -+ 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., 675 Mass Ave, Cambridge, MA 02139, USA. -+ -+ $Id: conf.h,v 1.2 2001/09/18 14:03:53 tokoe Exp $ -+*/ -+ -+#ifndef _conf_h_ -+#define _conf_h_ -+ -+typedef struct { -+ char *name; -+ char *path; -+} ConfigLogFile; -+ -+void parseConfigFile(const char *filename); -+ -+int sensorAvailable(const char* sensor); -+ -+#endif diff --git a/x11/kde4-baseapps/files/patch-diskstat.c b/x11/kde4-baseapps/files/patch-diskstat.c deleted file mode 100644 index 5535e580a673..000000000000 --- a/x11/kde4-baseapps/files/patch-diskstat.c +++ /dev/null @@ -1,260 +0,0 @@ ---- /dev/null Mon Nov 19 17:14:17 2001 -+++ ksysguard/ksysguardd/FreeBSD/diskstat.c Mon Nov 19 17:07:01 2001 -@@ -0,0 +1,257 @@ -+/* -+ KSysGuard, the KDE System Guard -+ -+ Copyright (c) 2001 Tobias Koenig <tokoe82@yahoo.de> -+ -+ This program is free software; you can redistribute it and/or -+ modify it under the terms of version 2 of the GNU General Public -+ License as published by the Free Software Foundation. -+ -+ 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., 675 Mass Ave, Cambridge, MA 02139, USA. -+ -+ $Id: diskstat.c,v 1.2 2001/09/18 14:03:53 tokoe Exp $ -+*/ -+ -+#include <stdio.h> -+#include <stdlib.h> -+#include <string.h> -+#include <sys/param.h> -+#include <sys/stat.h> -+#include <sys/ucred.h> -+#include <sys/mount.h> -+#include <time.h> -+#include <unistd.h> -+ -+#include "Command.h" -+#include "ccont.h" -+#include "diskstat.h" -+#include "ksysguardd.h" -+ -+typedef struct { -+ char device[256]; -+ char mntpnt[256]; -+ long blocks; -+ long bfree; -+ long bused; -+ int bused_percent; -+} DiskInfo; -+ -+static CONTAINER DiskStatList = 0; -+ -+char *getMntPnt(const char *cmd) -+{ -+ static char device[1024]; -+ char *ptr; -+ -+ memset(device, 0, sizeof(device)); -+ sscanf(cmd, "partitions%1024s", device); -+ -+ ptr = (char *)rindex(device, '/'); -+ *ptr = '\0'; -+ -+ return (char *)device; -+} -+ -+int numMntPnt(void) -+{ -+ struct statfs *fs_info; -+ int i, n, counter = 0; -+ -+ n = getmntinfo(&fs_info, MNT_WAIT); -+ for (i = 0; i < n; i++) -+ if (strcmp(fs_info[i].f_fstypename, "procfs") && strcmp(fs_info[i].f_fstypename, "swap") && strcmp(fs_info[i].f_fstypename, "devfs")) -+ counter++; -+ -+ return counter; -+} -+ -+/* ------------------------------ public part --------------------------- */ -+ -+void initDiskStat(void) -+{ -+ char monitor[1024]; -+ int i; -+ -+ DiskStatList = new_ctnr(CT_DLL); -+ -+ updateDiskStat(); -+ -+ registerMonitor("partitions/list", "listview", printDiskStat, printDiskStatInfo); -+ -+ for (i = 0; i < level_ctnr(DiskStatList); i++) { -+ DiskInfo* disk_info = get_ctnr(DiskStatList, i); -+ snprintf(monitor, sizeof(monitor), "partitions%s/usedspace", disk_info->mntpnt); -+ registerMonitor(monitor, "integer", printDiskStatUsed, printDiskStatUsedInfo); -+ snprintf(monitor, sizeof(monitor), "partitions%s/freespace", disk_info->mntpnt); -+ registerMonitor(monitor, "integer", printDiskStatFree, printDiskStatFreeInfo); -+ snprintf(monitor, sizeof(monitor), "partitions%s/filllevel", disk_info->mntpnt); -+ registerMonitor(monitor, "integer", printDiskStatPercent, printDiskStatPercentInfo); -+ } -+} -+ -+void checkDiskStat(void) -+{ -+ if (numMntPnt() != level_ctnr(DiskStatList)) { -+ /* a filesystem was mounted or unmounted -+ so we do a reset */ -+ exitDiskStat(); -+ initDiskStat(); -+ } -+} -+ -+void exitDiskStat(void) -+{ -+ DiskInfo *disk_info; -+ char monitor[1024]; -+ int i; -+ -+ removeMonitor("partitions/list"); -+ -+ for (i = 0; i < level_ctnr(DiskStatList); i++) { -+ disk_info = remove_ctnr(DiskStatList, i--); -+ -+ snprintf(monitor, sizeof(monitor), "partitions%s/usedspace", disk_info->mntpnt); -+ removeMonitor(monitor); -+ snprintf(monitor, sizeof(monitor), "partitions%s/freespace", disk_info->mntpnt); -+ removeMonitor(monitor); -+ snprintf(monitor, sizeof(monitor), "partitions%s/filllevel", disk_info->mntpnt); -+ removeMonitor(monitor); -+ -+ free(disk_info); -+ } -+ -+ if (DiskStatList) -+ destr_ctnr(DiskStatList, free); -+} -+ -+int updateDiskStat(void) -+{ -+ struct statfs *fs_info; -+ struct statfs fs; -+ float percent; -+ int i, mntcount; -+ DiskInfo *disk_info; -+ -+ /* let's hope there is no difference between the DiskStatList and -+ the number of mounted filesystems */ -+ for (i = 0; i < level_ctnr(DiskStatList); i++) -+ free(remove_ctnr(DiskStatList, i--)); -+ -+ mntcount = getmntinfo(&fs_info, MNT_WAIT); -+ -+ for (i = 0; i < mntcount; i++) { -+ fs = fs_info[i]; -+ if (strcmp(fs.f_fstypename, "procfs") && strcmp(fs.f_fstypename, "devfs") && strcmp(fs.f_fstypename, "devfs")) { -+ percent = (((float)fs.f_blocks - (float)fs.f_bfree)/(float)fs.f_blocks); -+ percent = percent * 100; -+ if ((disk_info = (DiskInfo *)malloc(sizeof(DiskInfo))) == NULL) { -+ continue; -+ } -+ memset(disk_info, 0, sizeof(DiskInfo)); -+ strncpy(disk_info->device, fs.f_mntfromname, 255); -+ if (!strcmp(fs.f_mntonname, "/")) { -+ strncpy(disk_info->mntpnt, "/root", 6); -+ } else { -+ strncpy(disk_info->mntpnt, fs.f_mntonname, 255); -+ } -+ disk_info->blocks = fs.f_blocks; -+ disk_info->bfree = fs.f_bfree; -+ disk_info->bused = (fs.f_blocks - fs.f_bfree); -+ disk_info->bused_percent = (int)percent; -+ -+ push_ctnr(DiskStatList, disk_info); -+ } -+ } -+ -+ return 0; -+} -+ -+void printDiskStat(const char* cmd) -+{ -+ int i; -+ -+ for (i = 0; i < level_ctnr(DiskStatList); i++) { -+ DiskInfo* disk_info = get_ctnr(DiskStatList, i); -+ fprintf(CurrentClient, "%s\t%ld\t%ld\t%ld\t%d\t%s\n", -+ disk_info->device, -+ disk_info->blocks, -+ disk_info->bused, -+ disk_info->bfree, -+ disk_info->bused_percent, -+ disk_info->mntpnt); -+ } -+ -+ fprintf(CurrentClient, "\n"); -+} -+ -+void printDiskStatInfo(const char* cmd) -+{ -+ fprintf(CurrentClient, "Device\tBlocks\tUsed\tAvailable\tUsed %%\tMountPoint\n"); -+} -+ -+void printDiskStatUsed(const char* cmd) -+{ -+ int i; -+ char *mntpnt = (char *)getMntPnt(cmd); -+ -+ for (i = 0; i < level_ctnr(DiskStatList); i++) { -+ DiskInfo* disk_info = get_ctnr(DiskStatList, i); -+ if (!strcmp(mntpnt, disk_info->mntpnt)) { -+ fprintf(CurrentClient, "%ld\n", disk_info->bused); -+ } -+ } -+ -+ fprintf(CurrentClient, "\n"); -+} -+ -+void printDiskStatUsedInfo(const char* cmd) -+{ -+ fprintf(CurrentClient, "Used Blocks\t0\t-\tBlocks\n"); -+} -+ -+void printDiskStatFree(const char* cmd) -+{ -+ int i; -+ char *mntpnt = (char *)getMntPnt(cmd); -+ -+ for (i = 0; i < level_ctnr(DiskStatList); i++) { -+ DiskInfo* disk_info = get_ctnr(DiskStatList, i); -+ if (!strcmp(mntpnt, disk_info->mntpnt)) { -+ fprintf(CurrentClient, "%ld\n", disk_info->bfree); -+ } -+ } -+ -+ fprintf(CurrentClient, "\n"); -+} -+ -+void printDiskStatFreeInfo(const char* cmd) -+{ -+ fprintf(CurrentClient, "Free Blocks\t0\t-\tBlocks\n"); -+} -+ -+void printDiskStatPercent(const char* cmd) -+{ -+ int i; -+ char *mntpnt = (char *)getMntPnt(cmd); -+ -+ for (i = 0; i < level_ctnr(DiskStatList); i++) { -+ DiskInfo* disk_info = get_ctnr(DiskStatList, i); -+ if (!strcmp(mntpnt, disk_info->mntpnt)) { -+ fprintf(CurrentClient, "%d\n", disk_info->bused_percent); -+ } -+ } -+ -+ fprintf(CurrentClient, "\n"); -+} -+ -+void printDiskStatPercentInfo(const char* cmd) -+{ -+ fprintf(CurrentClient, "Used Blocks\t0\t100\t%%\n"); -+} diff --git a/x11/kde4-baseapps/files/patch-diskstat.h b/x11/kde4-baseapps/files/patch-diskstat.h deleted file mode 100644 index 3b5bf11b89c7..000000000000 --- a/x11/kde4-baseapps/files/patch-diskstat.h +++ /dev/null @@ -1,44 +0,0 @@ ---- /dev/null Mon Nov 19 17:14:17 2001 -+++ ksysguard/ksysguardd/FreeBSD/diskstat.h Mon Nov 19 17:07:01 2001 -@@ -0,0 +1,41 @@ -+/* -+ KSysGuard, the KDE System Guard -+ -+ Copyright (c) 2001 Tobias Koenig <tokoe82@yahoo.de> -+ -+ This program is free software; you can redistribute it and/or -+ modify it under the terms of version 2 of the GNU General Public -+ License as published by the Free Software Foundation. -+ -+ 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., 675 Mass Ave, Cambridge, MA 02139, USA. -+ -+ $Id: diskstat.h,v 1.2 2001/09/18 14:03:53 tokoe Exp $ -+*/ -+ -+#ifndef _diskstat_h_ -+#define _diskstat_h_ -+ -+void initDiskStat(void); -+void exitDiskStat(void); -+ -+int updateDiskStat(void); -+void checkDiskStat(void); -+ -+void printDiskStat(const char* cmd); -+void printDiskStatInfo(const char* cmd); -+ -+void printDiskStatUsed(const char* cmd); -+void printDiskStatUsedInfo(const char* cmd); -+void printDiskStatFree(const char* cmd); -+void printDiskStatFreeInfo(const char* cmd); -+void printDiskStatPercent(const char* cmd); -+void printDiskStatPercentInfo(const char* cmd); -+ -+#endif diff --git a/x11/kde4-baseapps/files/patch-kdm::kfrontend::Makefile.am b/x11/kde4-baseapps/files/patch-kdm::kfrontend::Makefile.am deleted file mode 100644 index c5274c1096ac..000000000000 --- a/x11/kde4-baseapps/files/patch-kdm::kfrontend::Makefile.am +++ /dev/null @@ -1,15 +0,0 @@ ---- kdm/kfrontend/Makefile.am.~1.21.~ Sun Jul 29 00:56:28 2001 -+++ kdm/kfrontend/Makefile.am Mon Dec 10 01:08:15 2001 -@@ -25,10 +25,8 @@ - genkdmconf_LDADD = $(LIB_X11) - - install-data-local: -- @if test ! -d $(DESTDIR)$(kde_confdir)/kdm; then \ -- $(mkinstalldirs) $(DESTDIR)$(kde_confdir)/kdm; \ -- ./genkdmconf --in $(DESTDIR)$(kde_confdir)/kdm; \ -- fi -+ -$(mkinstalldirs) $(DESTDIR)$(kde_confdir)/kdm -+ ./genkdmconf --no-old --in $(DESTDIR)$(kde_confdir)/kdm - - messages: - $(XGETTEXT) $(kdm_greet_SOURCES) -o $(podir)/kdmgreet.pot diff --git a/x11/kde4-baseapps/files/patch-kdm::kfrontend::genkdmconf.c b/x11/kde4-baseapps/files/patch-kdm::kfrontend::genkdmconf.c deleted file mode 100644 index d520f23414ba..000000000000 --- a/x11/kde4-baseapps/files/patch-kdm::kfrontend::genkdmconf.c +++ /dev/null @@ -1,42 +0,0 @@ ---- kdm/kfrontend/genkdmconf.c.orig Mon Nov 5 21:40:03 2001 -+++ kdm/kfrontend/genkdmconf.c Sat Jan 5 23:49:40 2002 -@@ -212,7 +212,7 @@ - */ - - #ifndef HALT_CMD --# ifdef BSD -+# if defined(BSD) || defined(__FreeBSD__) - # define HALT_CMD "/sbin/shutdown -h now" - # define REBOOT_CMD "/sbin/shutdown -r now" - # elif defined(__SVR4) -@@ -1605,8 +1605,8 @@ - "chown $USER /dev/console\n" - #endif - "\n" --"#exec sessreg -a -l $DISPLAY " --#ifdef BSD -+"exec sessreg -a -l $DISPLAY " -+#if defined(BSD) || defined(__FreeBSD__) - "-x " KDMCONF "/Xservers " - #endif - "$USER\n" -@@ -1627,8 +1627,8 @@ - "chmod 622 /dev/console\n" - #endif - "\n" --"#exec sessreg -d -l $DISPLAY " --#ifdef BSD -+"exec sessreg -d -l $DISPLAY " -+#if defined(BSD) || defined(__FreeBSD__) - "-x " KDMCONF "/Xservers " - #endif - "$USER\n" -@@ -1781,7 +1781,7 @@ - } - addKdePath ("UserPath", DEF_USER_PATH); - addKdePath ("SystemPath", DEF_SYSTEM_PATH); -- ASPrintf (&newkdmrc, "%s/kdmrc", newdir); -+ ASPrintf (&newkdmrc, "%s/kdmrc.dist", newdir); - f = Create (newkdmrc, kdmrcmode); - wrconf (f); - fclose (f); diff --git a/x11/kde4-baseapps/files/patch-ksysguardd.c b/x11/kde4-baseapps/files/patch-ksysguardd.c deleted file mode 100644 index e7a37616b367..000000000000 --- a/x11/kde4-baseapps/files/patch-ksysguardd.c +++ /dev/null @@ -1,11 +0,0 @@ ---- ksysguard/ksysguardd/FreeBSD/ksysguardd.c.orig Sat Nov 10 00:17:04 2001 -+++ ksysguard/ksysguardd/FreeBSD/ksysguardd.c Sun Dec 9 22:26:48 2001 -@@ -37,6 +37,8 @@ - #include <sys/wait.h> - #include <unistd.h> - -+#include "config.h" -+ - #include "CPU.h" - #include "Command.h" - #include "Memory.h" diff --git a/x11/kde4-baseapps/files/patch-ksysguardd.h b/x11/kde4-baseapps/files/patch-ksysguardd.h deleted file mode 100644 index 1545b83d39d7..000000000000 --- a/x11/kde4-baseapps/files/patch-ksysguardd.h +++ /dev/null @@ -1,37 +0,0 @@ ---- /dev/null Mon Nov 19 17:14:17 2001 -+++ ksysguard/ksysguardd/FreeBSD/ksysguardd.h Mon Nov 19 17:07:38 2001 -@@ -0,0 +1,34 @@ -+/* -+ KSysGuard, the KDE System Guard -+ -+ Copyright (c) 1999-2001 Chris Schlaeger <cs@kde.org> -+ -+ This program is free software; you can redistribute it and/or -+ modify it under the terms of version 2 of the GNU General Public -+ License as published by the Free Software Foundation. -+ -+ 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., 675 Mass Ave, Cambridge, MA 02139, USA. -+ -+ $Id: ksysguardd.h,v 1.2 2001/11/08 10:52:55 tokoe Exp $ -+*/ -+ -+#ifndef _ksysguardd_h_ -+#define _ksysguardd_h_ -+ -+#include <stdio.h> -+ -+extern int QuitApp; -+extern int RunAsDaemon; -+extern FILE* CurrentClient; -+ -+void updateModules(void); -+void checkModules(void); -+ -+#endif diff --git a/x11/kde4-baseapps/files/patch-loadavg.c b/x11/kde4-baseapps/files/patch-loadavg.c deleted file mode 100644 index ced78fa5ad68..000000000000 --- a/x11/kde4-baseapps/files/patch-loadavg.c +++ /dev/null @@ -1,100 +0,0 @@ ---- /dev/null Mon Nov 19 17:14:17 2001 -+++ ksysguard/ksysguardd/FreeBSD/loadavg.c Mon Nov 19 17:07:47 2001 -@@ -0,0 +1,97 @@ -+/* -+ KSysGuard, the KDE System Guard -+ -+ Copyright (c) 2001 Tobias Koenig <tokoe82@yahoo.de> -+ -+ This program is free software; you can redistribute it and/or -+ modify it under the terms of version 2 of the GNU General Public -+ License as published by the Free Software Foundation. -+ -+ 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., 675 Mass Ave, Cambridge, MA 02139, USA. -+ -+ $Id: loadavg.c,v 1.2 2001/09/18 14:03:53 tokoe Exp $ -+*/ -+ -+#include <stdio.h> -+#include <stdlib.h> -+ -+#include "Command.h" -+#include "ksysguardd.h" -+#include "loadavg.h" -+ -+static double LoadAvg[3]; -+ -+/* -+================================ public part ================================= -+*/ -+ -+void -+initLoadAvg(void) -+{ -+ if (updateLoadAvg() < 0) -+ return; -+ -+ registerMonitor("cpu/loadavg1", "float", printLoadAvg1, -+ printLoadAvg1Info); -+ registerMonitor("cpu/loadavg5", "float", printLoadAvg5, -+ printLoadAvg5Info); -+ registerMonitor("cpu/loadavg15", "float", printLoadAvg15, -+ printLoadAvg15Info); -+} -+ -+void -+exitLoadAvg(void) -+{ -+ removeMonitor("cpu/loadavg1"); -+ removeMonitor("cpu/loadavg5"); -+ removeMonitor("cpu/loadavg15"); -+} -+ -+int -+updateLoadAvg(void) -+{ -+ return getloadavg(LoadAvg, 3); -+} -+ -+void -+printLoadAvg1(const char* c) -+{ -+ fprintf(CurrentClient, "%f\n", LoadAvg[0]); -+} -+ -+void -+printLoadAvg1Info(const char* c) -+{ -+ fprintf(CurrentClient, "Load average 1 min\t0\t0\t\n"); -+} -+ -+void -+printLoadAvg5(const char* c) -+{ -+ fprintf(CurrentClient, "%f\n", LoadAvg[1]); -+} -+ -+void -+printLoadAvg5Info(const char* c) -+{ -+ fprintf(CurrentClient, "Load average 5 min\t0\t0\t\n"); -+} -+ -+void -+printLoadAvg15(const char* c) -+{ -+ fprintf(CurrentClient, "%f\n", LoadAvg[2]); -+} -+ -+void -+printLoadAvg15Info(const char* c) -+{ -+ fprintf(CurrentClient, "Load average 15 min\t0\t0\t\n"); -+} diff --git a/x11/kde4-baseapps/files/patch-loadavg.h b/x11/kde4-baseapps/files/patch-loadavg.h deleted file mode 100644 index cdc680cbd492..000000000000 --- a/x11/kde4-baseapps/files/patch-loadavg.h +++ /dev/null @@ -1,39 +0,0 @@ ---- /dev/null Mon Nov 19 17:14:17 2001 -+++ ksysguard/ksysguardd/FreeBSD/loadavg.h Mon Nov 19 17:07:47 2001 -@@ -0,0 +1,36 @@ -+/* -+ KSysGuard, the KDE System Guard -+ -+ Copyright (c) 2001 Tobias Koenig <tokoe82@yahoo.de> -+ -+ This program is free software; you can redistribute it and/or -+ modify it under the terms of version 2 of the GNU General Public -+ License as published by the Free Software Foundation. -+ -+ 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., 675 Mass Ave, Cambridge, MA 02139, USA. -+ -+ $Id: loadavg.h,v 1.2 2001/09/18 14:03:53 tokoe Exp $ -+*/ -+ -+#ifndef _loadavg_h_ -+#define _loadavg_h_ -+ -+void initLoadAvg(void); -+void exitLoadAvg(void); -+int updateLoadAvg(void); -+ -+void printLoadAvg1(const char*); -+void printLoadAvg1Info(const char*); -+void printLoadAvg5(const char*); -+void printLoadAvg5Info(const char*); -+void printLoadAvg15(const char*); -+void printLoadAvg15Info(const char*); -+ -+#endif diff --git a/x11/kde4-baseapps/files/patch-logfile.c b/x11/kde4-baseapps/files/patch-logfile.c deleted file mode 100644 index 5fd3def1ae6b..000000000000 --- a/x11/kde4-baseapps/files/patch-logfile.c +++ /dev/null @@ -1,184 +0,0 @@ ---- /dev/null Mon Nov 19 17:14:17 2001 -+++ ksysguard/ksysguardd/FreeBSD/logfile.c Mon Nov 19 17:07:55 2001 -@@ -0,0 +1,181 @@ -+/* -+ KSysGuard, the KDE System Guard -+ -+ Copyright (c) 2001 Tobias Koenig <tokoe82@yahoo.de> -+ -+ This program is free software; you can redistribute it and/or -+ modify it under the terms of version 2 of the GNU General Public -+ License as published by the Free Software Foundation. -+ -+ 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., 675 Mass Ave, Cambridge, MA 02139, USA. -+ -+ $Id: logfile.c,v 1.2 2001/09/18 14:03:53 tokoe Exp $ -+*/ -+ -+#include <stdio.h> -+#include <stdlib.h> -+#include <string.h> -+ -+#include "Command.h" -+#include "ccont.h" -+#include "conf.h" -+#include "ksysguardd.h" -+#include "logfile.h" -+ -+static CONTAINER LogFiles = 0; -+static unsigned long counter = 1; -+ -+typedef struct { -+ char name[256]; -+ FILE* fh; -+ unsigned long id; -+} LogFileEntry; -+ -+extern CONTAINER LogFileList; -+ -+/* -+================================ public part ================================= -+*/ -+ -+void initLogFile(void) -+{ -+ int i; -+ char monitor[1024]; -+ -+ registerCommand("logfile_register", registerLogFile); -+ registerCommand("logfile_unregister", unregisterLogFile); -+ registerCommand("logfile_registered", printRegistered); -+ -+ for (i = 0; i < level_ctnr(LogFileList); i++) -+ { -+ FILE* fp; -+ ConfigLogFile *entry = get_ctnr(LogFileList, i); -+ /* register the log file if we can actually read the file. */ -+ if ((fp = fopen(entry->path, "r")) != NULL) -+ { -+ fclose(fp); -+ snprintf(monitor, 1024, "logfiles/%s", entry->name); -+ registerMonitor(monitor, "logfile", printLogFile, -+ printLogFileInfo); -+ } -+ } -+ -+ LogFiles = new_ctnr(CT_DLL); -+} -+ -+void exitLogFile(void) -+{ -+ if (LogFiles) -+ destr_ctnr(LogFiles, free); -+} -+ -+void printLogFile(const char* cmd) -+{ -+ char line[1024]; -+ unsigned long id; -+ int i; -+ char ch; -+ -+ sscanf(cmd, "%*s %lu", &id); -+ -+ for (i = 0; i < level_ctnr(LogFiles); i++) { -+ LogFileEntry *entry = get_ctnr(LogFiles, i); -+ -+ if (entry->id == id) { -+ while (fgets(line, sizeof(line), entry->fh) != NULL) { -+ fprintf(CurrentClient, "%s", line); -+ } -+ clearerr(entry->fh); -+ } -+ } -+ -+ fprintf(CurrentClient, "\n"); -+} -+ -+void printLogFileInfo(const char* cmd) -+{ -+ fprintf(CurrentClient, "LogFile\n"); -+} -+ -+void registerLogFile(const char* cmd) -+{ -+ char name[256]; -+ FILE* file; -+ LogFileEntry *entry; -+ int i; -+ -+ memset(name, 0, sizeof(name)); -+ sscanf(cmd, "%*s %256s", name); -+ -+ for (i = 0; i < level_ctnr(LogFileList); i++) { -+ ConfigLogFile *conf = get_ctnr(LogFileList, i); -+ if (!strcmp(conf->name, name)) { -+ if ((file = fopen(conf->path, "r")) == NULL) { -+ print_error("fopen()"); -+ fprintf(CurrentClient, "0\n"); -+ return; -+ } -+ -+ fseek(file, 0, SEEK_END); -+ -+ if ((entry = (LogFileEntry *)malloc(sizeof(LogFileEntry))) == NULL) { -+ print_error("malloc()"); -+ fprintf(CurrentClient, "0\n"); -+ return; -+ } -+ -+ entry->fh = file; -+ strncpy(entry->name, conf->name, 256); -+ entry->id = counter; -+ -+ push_ctnr(LogFiles, entry); -+ -+ fprintf(CurrentClient, "%lu\n", counter); -+ counter++; -+ -+ return; -+ } -+ } -+ -+ fprintf(CurrentClient, "0\n"); -+} -+ -+void unregisterLogFile(const char* cmd) -+{ -+ unsigned long id; -+ int i; -+ -+ sscanf(cmd, "%*s %lu", &id); -+ -+ for (i = 0; i < level_ctnr(LogFiles); i++) { -+ LogFileEntry *entry = get_ctnr(LogFiles, i); -+ -+ if (entry->id == id) { -+ fclose(entry->fh); -+ free(remove_ctnr(LogFiles, i)); -+ fprintf(CurrentClient, "\n"); -+ return; -+ } -+ } -+ -+ fprintf(CurrentClient, "\n"); -+} -+ -+void printRegistered(const char* cmd) -+{ -+ int i; -+ -+ for (i = 0; i < level_ctnr(LogFiles); i++) { -+ LogFileEntry *entry = get_ctnr(LogFiles, i); -+ fprintf(CurrentClient, "%s:%lu\n", entry->name, entry->id); -+ } -+ -+ fprintf(CurrentClient, "\n"); -+} diff --git a/x11/kde4-baseapps/files/patch-logfile.h b/x11/kde4-baseapps/files/patch-logfile.h deleted file mode 100644 index 69b8d6ed1ca6..000000000000 --- a/x11/kde4-baseapps/files/patch-logfile.h +++ /dev/null @@ -1,40 +0,0 @@ ---- /dev/null Mon Nov 19 17:14:17 2001 -+++ ksysguard/ksysguardd/FreeBSD/logfile.h Mon Nov 19 17:07:55 2001 -@@ -0,0 +1,37 @@ -+/* -+ KSysGuard, the KDE System Guard -+ -+ Copyright (c) 2001 Tobias Koenig <tokoe82@yahoo.de> -+ -+ This program is free software; you can redistribute it and/or -+ modify it under the terms of version 2 of the GNU General Public -+ License as published by the Free Software Foundation. -+ -+ 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., 675 Mass Ave, Cambridge, MA 02139, USA. -+ -+ $Id: logfile.h,v 1.2 2001/09/18 14:03:53 tokoe Exp $ -+*/ -+ -+#ifndef _logfile_h_ -+#define _logfile_h_ -+ -+void initLogFile(void); -+void exitLogFile(void); -+ -+void printLogFile(const char* cmd); -+void printLogFileInfo(const char* cmd); -+ -+void registerLogFile(const char* cmd); -+void unregisterLogFile(const char* cmd); -+ -+/* debug command */ -+void printRegistered(const char* cmd); -+ -+#endif diff --git a/x11/kde4-baseapps/files/patch-netdev.c b/x11/kde4-baseapps/files/patch-netdev.c deleted file mode 100644 index 2c0f473ebbcf..000000000000 --- a/x11/kde4-baseapps/files/patch-netdev.c +++ /dev/null @@ -1,322 +0,0 @@ ---- /dev/null Mon Nov 19 17:14:17 2001 -+++ ksysguard/ksysguardd/FreeBSD/netdev.c Mon Nov 19 17:08:04 2001 -@@ -0,0 +1,319 @@ -+/* -+ KSysGuard, the KDE System Guard -+ -+ Copyright (c) 2001 Tobias Koenig <tokoe82@yahoo.de> -+ -+ This program is free software; you can redistribute it and/or -+ modify it under the terms of version 2 of the GNU General Public -+ License as published by the Free Software Foundation. -+ -+ 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., 675 Mass Ave, Cambridge, MA 02139, USA. -+ -+ $Id: netdev.c,v 1.2 2001/09/18 14:03:53 tokoe Exp $ -+*/ -+ -+#include <fcntl.h> -+#include <sys/socket.h> -+#include <net/if.h> -+#include <net/if_mib.h> -+#include <stdio.h> -+#include <string.h> -+#include <sys/sysctl.h> -+#include <sys/time.h> -+#include <sys/types.h> -+#include <unistd.h> -+ -+ -+#include "Command.h" -+#include "ksysguardd.h" -+#include "netdev.h" -+ -+ -+typedef struct { -+ char name[32]; -+ u_long recBytes; -+ u_long recPacks; -+ u_long recErrs; -+ u_long recDrop; -+ u_long recMulticast; -+ u_long sentBytes; -+ u_long sentPacks; -+ u_long sentErrs; -+ u_long sentMulticast; -+ u_long sentColls; -+} NetDevInfo; -+ -+#define MAXNETDEVS 64 -+static NetDevInfo NetDevs[MAXNETDEVS]; -+static int NetDevCnt = 0; -+ -+char **parseCommand(const char *cmd) -+{ -+ char tmp_cmd[1024]; -+ char *begin; -+ static char sensor[100]; -+ static char interface[100]; -+ static char* retval[2]; -+ -+ strncpy(tmp_cmd, cmd, 1024); -+ -+ begin = rindex(tmp_cmd, '/'); -+ *begin = '\0'; -+ begin++; -+ strcpy(sensor, begin); -+ retval[1] = sensor; -+ -+ begin = rindex(tmp_cmd, '/'); -+ *begin = '\0'; -+ begin = rindex(tmp_cmd, '/'); -+ begin++; -+ strcpy(interface, begin); -+ retval[0] = interface; -+ -+ return retval; -+} -+ -+int numActivIfaces(void) -+{ -+ int counter = 0; -+ int name[6]; -+ int num_iface, i; -+ size_t len; -+ struct ifmibdata ifmd; -+ -+ len = sizeof(num_iface); -+ sysctlbyname("net.link.generic.system.ifcount", &num_iface, &len, NULL, 0); -+ -+ for (i = 1; i < num_iface + 1; i++) { -+ name[0] = CTL_NET; -+ name[1] = PF_LINK; -+ name[2] = NETLINK_GENERIC; -+ name[3] = IFMIB_IFDATA; -+ name[4] = i; -+ name[5] = IFDATA_GENERAL; -+ -+ len = sizeof(ifmd); -+ sysctl(name, 6, &ifmd, &len, NULL, 0); -+ if (ifmd.ifmd_flags & IFF_UP) -+ counter++; -+ } -+ -+ return counter; -+} -+ -+/* ------------------------------ public part --------------------------- */ -+ -+void initNetDev(void) -+{ -+ int i; -+ char monitor[1024]; -+ -+ updateNetDev(); -+ -+ for (i = 0; i < NetDevCnt; i++) { -+ snprintf(monitor, sizeof(monitor), "network/interfaces/%s/receiver/data", NetDevs[i].name); -+ registerMonitor(monitor, "integer", printNetDevRecBytes, printNetDevRecBytesInfo); -+ snprintf(monitor, sizeof(monitor), "network/interfaces/%s/receiver/packets", NetDevs[i].name); -+ registerMonitor(monitor, "integer", printNetDevRecBytes, printNetDevRecBytesInfo); -+ snprintf(monitor, sizeof(monitor), "network/interfaces/%s/receiver/errors", NetDevs[i].name); -+ registerMonitor(monitor, "integer", printNetDevRecBytes, printNetDevRecBytesInfo); -+ snprintf(monitor, sizeof(monitor), "network/interfaces/%s/receiver/drops", NetDevs[i].name); -+ registerMonitor(monitor, "integer", printNetDevRecBytes, printNetDevRecBytesInfo); -+ snprintf(monitor, sizeof(monitor), "network/interfaces/%s/receiver/multicast", NetDevs[i].name); -+ registerMonitor(monitor, "integer", printNetDevRecBytes, printNetDevRecBytesInfo); -+ -+ snprintf(monitor, sizeof(monitor), "network/interfaces/%s/transmitter/data", NetDevs[i].name); -+ registerMonitor(monitor, "integer", printNetDevSentBytes, printNetDevSentBytesInfo); -+ snprintf(monitor, sizeof(monitor), "network/interfaces/%s/transmitter/packets", NetDevs[i].name); -+ registerMonitor(monitor, "integer", printNetDevSentBytes, printNetDevSentBytesInfo); -+ snprintf(monitor, sizeof(monitor), "network/interfaces/%s/transmitter/errors", NetDevs[i].name); -+ registerMonitor(monitor, "integer", printNetDevSentBytes, printNetDevSentBytesInfo); -+ snprintf(monitor, sizeof(monitor), "network/interfaces/%s/transmitter/multicast", NetDevs[i].name); -+ registerMonitor(monitor, "integer", printNetDevSentBytes, printNetDevSentBytesInfo); -+ snprintf(monitor, sizeof(monitor), "network/interfaces/%s/transmitter/collisions", NetDevs[i].name); -+ registerMonitor(monitor, "integer", printNetDevSentBytes, printNetDevSentBytesInfo); -+ } -+} -+ -+void exitNetDev(void) -+{ -+ int i; -+ char monitor[1024]; -+ -+ for (i = 0; i < NetDevCnt; i++) { -+ snprintf(monitor, sizeof(monitor), "network/interfaces/%s/receiver/data", NetDevs[i].name); -+ removeMonitor(monitor); -+ snprintf(monitor, sizeof(monitor), "network/interfaces/%s/receiver/packets", NetDevs[i].name); -+ removeMonitor(monitor); -+ snprintf(monitor, sizeof(monitor), "network/interfaces/%s/receiver/errors", NetDevs[i].name); -+ removeMonitor(monitor); -+ snprintf(monitor, sizeof(monitor), "network/interfaces/%s/receiver/drops", NetDevs[i].name); -+ removeMonitor(monitor); -+ snprintf(monitor, sizeof(monitor), "network/interfaces/%s/receiver/multicast", NetDevs[i].name); -+ removeMonitor(monitor); -+ -+ snprintf(monitor, sizeof(monitor), "network/interfaces/%s/transmitter/data", NetDevs[i].name); -+ removeMonitor(monitor); -+ snprintf(monitor, sizeof(monitor), "network/interfaces/%s/transmitter/packets", NetDevs[i].name); -+ removeMonitor(monitor); -+ snprintf(monitor, sizeof(monitor), "network/interfaces/%s/transmitter/errors", NetDevs[i].name); -+ removeMonitor(monitor); -+ snprintf(monitor, sizeof(monitor), "network/interfaces/%s/transmitter/multicast", NetDevs[i].name); -+ removeMonitor(monitor); -+ snprintf(monitor, sizeof(monitor), "network/interfaces/%s/transmitter/collisions", NetDevs[i].name); -+ removeMonitor(monitor); -+ } -+} -+ -+void updateNetDev(void) -+{ -+ int name[6]; -+ int num_iface, i; -+ size_t len; -+ struct ifmibdata ifmd; -+ -+ len = sizeof(num_iface); -+ sysctlbyname("net.link.generic.system.ifcount", &num_iface, &len, NULL, 0); -+ -+ NetDevCnt = 0; -+ for (i = 1; i < num_iface + 1; i++) { -+ name[0] = CTL_NET; -+ name[1] = PF_LINK; -+ name[2] = NETLINK_GENERIC; -+ name[3] = IFMIB_IFDATA; -+ name[4] = i; -+ name[5] = IFDATA_GENERAL; -+ -+ len = sizeof(ifmd); -+ sysctl(name, 6, &ifmd, &len, NULL, 0); -+ if (ifmd.ifmd_flags & IFF_UP) { -+ strncpy(NetDevs[NetDevCnt].name, ifmd.ifmd_name, 32); -+ NetDevs[NetDevCnt].recBytes = ifmd.ifmd_data.ifi_ibytes - NetDevs[NetDevCnt].recBytes; -+ NetDevs[NetDevCnt].recPacks = ifmd.ifmd_data.ifi_ipackets - NetDevs[NetDevCnt].recPacks; -+ NetDevs[NetDevCnt].recErrs = ifmd.ifmd_data.ifi_ierrors - NetDevs[NetDevCnt].recErrs; -+ NetDevs[NetDevCnt].recDrop = ifmd.ifmd_data.ifi_iqdrops - NetDevs[NetDevCnt].recDrop; -+ NetDevs[NetDevCnt].recMulticast = ifmd.ifmd_data.ifi_imcasts - NetDevs[NetDevCnt].recMulticast; -+ NetDevs[NetDevCnt].sentBytes = ifmd.ifmd_data.ifi_obytes - NetDevs[NetDevCnt].sentBytes; -+ NetDevs[NetDevCnt].sentPacks = ifmd.ifmd_data.ifi_opackets - NetDevs[NetDevCnt].sentPacks; -+ NetDevs[NetDevCnt].sentErrs = ifmd.ifmd_data.ifi_oerrors - NetDevs[NetDevCnt].sentErrs; -+ NetDevs[NetDevCnt].sentMulticast = ifmd.ifmd_data.ifi_omcasts - NetDevs[NetDevCnt].sentMulticast; -+ NetDevs[NetDevCnt].sentColls = ifmd.ifmd_data.ifi_collisions - NetDevs[NetDevCnt].sentColls; -+ NetDevCnt++; -+ } -+ } -+} -+ -+void checkNetDev(void) -+{ -+ if (numActivIfaces() != NetDevCnt) { -+ /* interface has been added or removed -+ so we do a reset */ -+ exitNetDev(); -+ initNetDev(); -+ } -+} -+ -+void printNetDevRecBytes(const char *cmd) -+{ -+ int i; -+ char **retval; -+ -+ retval = parseCommand(cmd); -+ -+ if (retval[0] == NULL || retval[1] == NULL) -+ return; -+ -+ for (i = 0; i < NetDevCnt; i++) { -+ if (!strcmp(NetDevs[i].name, retval[0])) { -+ if (!strncmp(retval[1], "data", 4)) -+ fprintf(CurrentClient, "%lu", NetDevs[i].recBytes); -+ if (!strncmp(retval[1], "packets", 7)) -+ fprintf(CurrentClient, "%lu", NetDevs[i].recPacks); -+ if (!strncmp(retval[1], "errors", 6)) -+ fprintf(CurrentClient, "%lu", NetDevs[i].recErrs); -+ if (!strncmp(retval[1], "drops", 5)) -+ fprintf(CurrentClient, "%lu", NetDevs[i].recDrop); -+ if (!strncmp(retval[1], "multicast", 9)) -+ fprintf(CurrentClient, "%lu", NetDevs[i].recMulticast); -+ } -+ } -+ -+ fprintf(CurrentClient, "\n"); -+} -+ -+void printNetDevRecBytesInfo(const char *cmd) -+{ -+ char **retval; -+ -+ retval = parseCommand(cmd); -+ -+ if (retval[1] == NULL) -+ return; -+ -+ if (!strncmp(retval[1], "data", 4)) -+ fprintf(CurrentClient, "Received Data\t0\t0\tkBytes/s\n"); -+ if (!strncmp(retval[1], "packets", 7)) -+ fprintf(CurrentClient, "Received Packets\t0\t0\t1/s\n"); -+ if (!strncmp(retval[1], "errors", 6)) -+ fprintf(CurrentClient, "Receiver Errors\t0\t0\t1/s\n"); -+ if (!strncmp(retval[1], "drops", 5)) -+ fprintf(CurrentClient, "Receiver Drops\t0\t0\t1/s\n"); -+ if (!strncmp(retval[1], "multicast", 9)) -+ fprintf(CurrentClient, "Received Multicast Packets\t0\t0\t1/s\n"); -+} -+ -+void printNetDevSentBytes(const char *cmd) -+{ -+ int i; -+ char **retval; -+ -+ retval = parseCommand(cmd); -+ -+ if (retval[0] == NULL || retval[1] == NULL) -+ return; -+ -+ for (i = 0; i < NetDevCnt; i++) { -+ if (!strcmp(NetDevs[i].name, retval[0])) { -+ if (!strncmp(retval[1], "data", 4)) -+ fprintf(CurrentClient, "%lu", NetDevs[i].sentBytes); -+ if (!strncmp(retval[1], "packets", 7)) -+ fprintf(CurrentClient, "%lu", NetDevs[i].sentPacks); -+ if (!strncmp(retval[1], "errors", 6)) -+ fprintf(CurrentClient, "%lu", NetDevs[i].sentErrs); -+ if (!strncmp(retval[1], "multicast", 9)) -+ fprintf(CurrentClient, "%lu", NetDevs[i].sentMulticast); -+ if (!strncmp(retval[1], "collisions", 10)) -+ fprintf(CurrentClient, "%lu", NetDevs[i].sentColls); -+ } -+ } -+ -+ fprintf(CurrentClient, "\n"); -+} -+ -+void printNetDevSentBytesInfo(const char *cmd) -+{ -+ char **retval; -+ -+ retval = parseCommand(cmd); -+ -+ if (retval[1] == NULL) -+ return; -+ -+ if (!strncmp(retval[1], "data", 4)) -+ fprintf(CurrentClient, "Sent Data\t0\t0\tkBytes/s\n"); -+ if (!strncmp(retval[1], "packets", 7)) -+ fprintf(CurrentClient, "Sent Packets\t0\t0\t1/s\n"); -+ if (!strncmp(retval[1], "errors", 6)) -+ fprintf(CurrentClient, "Transmitter Errors\t0\t0\t1/s\n"); -+ if (!strncmp(retval[1], "multicast", 9)) -+ fprintf(CurrentClient, "Sent Multicast Packets\t0\t0\t1/s\n"); -+ if (!strncmp(retval[1], "collisions", 10)) -+ fprintf(CurrentClient, "Transmitter Collisions\t0\t0\t1/s\n"); -+} diff --git a/x11/kde4-baseapps/files/patch-netdev.h b/x11/kde4-baseapps/files/patch-netdev.h deleted file mode 100644 index 3c291f85dc9e..000000000000 --- a/x11/kde4-baseapps/files/patch-netdev.h +++ /dev/null @@ -1,39 +0,0 @@ ---- /dev/null Mon Nov 19 17:14:17 2001 -+++ ksysguard/ksysguardd/FreeBSD/netdev.h Mon Nov 19 17:08:04 2001 -@@ -0,0 +1,36 @@ -+/* -+ KSysGuard, the KDE System Guard -+ -+ Copyright (c) 2001 Tobias Koenig <tokoe82@yahoo.de> -+ -+ This program is free software; you can redistribute it and/or -+ modify it under the terms of version 2 of the GNU General Public -+ License as published by the Free Software Foundation. -+ -+ 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., 675 Mass Ave, Cambridge, MA 02139, USA. -+ -+ $Id: netdev.h,v 1.2 2001/09/18 14:03:53 tokoe Exp $ -+*/ -+ -+#ifndef _netdev_h_ -+#define _netdev_h_ -+ -+void initNetDev(void); -+void exitNetDev(void); -+ -+void updateNetDev(void); -+void checkNetDev(void); -+ -+void printNetDevRecBytes(const char* cmd); -+void printNetDevRecBytesInfo(const char* cmd); -+void printNetDevSentBytes(const char* cmd); -+void printNetDevSentBytesInfo(const char* cmd); -+ -+#endif |