diff options
Diffstat (limited to 'misc/xdf/files')
| -rw-r--r-- | misc/xdf/files/patch-Makefile | 31 | ||||
| -rw-r--r-- | misc/xdf/files/patch-xdf.H | 21 | ||||
| -rw-r--r-- | misc/xdf/files/patch-xdf.cc | 85 |
3 files changed, 0 insertions, 137 deletions
diff --git a/misc/xdf/files/patch-Makefile b/misc/xdf/files/patch-Makefile deleted file mode 100644 index 090309cc12e3..000000000000 --- a/misc/xdf/files/patch-Makefile +++ /dev/null @@ -1,31 +0,0 @@ ---- Makefile.orig Wed Nov 13 14:06:28 2002 -+++ Makefile Wed Jul 9 17:04:06 2003 -@@ -7,9 +7,7 @@ - # on Linux systems "make ; make install" (run as superuser) should do everything - # - -- --CCFLAGS = -m486 -O2 --CPPFLAGS += $(CCFLAGS) -I /usr/openwin/include -I/usr/lib/g++-include -DMAIN -+CPPFLAGS += $(CCFLAGS) -I/usr/include -I/usr/local/include -I/usr/X11R6/include -I/usr/lib/g++-include -DMAIN - LDFLAGS += -L /usr/openwin/lib -L /usr/X11R6/lib - LDLIBS += -lxview -lX11 -lolgx - -@@ -17,7 +15,7 @@ - - PROGRAM = xdf - SOURCES.cc = xdf.cc --INSTALLPATH = /usr/local/bin -+INSTALLPATH = /usr/X11R6/bin - SOURCES.h = - SOURCES.c = - SOURCES.G = -@@ -110,7 +108,7 @@ - install: - cp $(PROGRAM) $(INSTALLPATH) - cd $(INSTALLPATH) -- chown root.bin $(PROGRAM) -+ chown root:bin $(PROGRAM) - chmod 755 $(PROGRAM) - - run: diff --git a/misc/xdf/files/patch-xdf.H b/misc/xdf/files/patch-xdf.H deleted file mode 100644 index da0f9f5f9445..000000000000 --- a/misc/xdf/files/patch-xdf.H +++ /dev/null @@ -1,21 +0,0 @@ ---- xdf.H Mon Dec 22 00:10:05 1997 -+++ ../xdf/xdf.H Fri Nov 8 21:17:34 2002 -@@ -51,14 +51,14 @@ - - /*{{{ Variables */ - char* prgname; --FILE* fstab; --FILE* mtab; --struct mntent* table; -+struct fstab* fstab; -+struct statfs* mtab; -+struct statfs* table; - struct statfs stat_buffer; - int mountpoints; - Partition* par_table[50]; - struct itimerval timer; -- -+int mntcount; - - #ifdef NO_ISO9660 - int no_iso9660 = TRUE; diff --git a/misc/xdf/files/patch-xdf.cc b/misc/xdf/files/patch-xdf.cc deleted file mode 100644 index 7e0e39d99e65..000000000000 --- a/misc/xdf/files/patch-xdf.cc +++ /dev/null @@ -1,85 +0,0 @@ ---- xdf.cc.orig Thu Nov 14 00:06:28 2002 -+++ xdf.cc Fri Jan 17 00:56:31 2003 -@@ -18,18 +18,18 @@ - #include <stdio.h> - #include <iostream.h> - #include <strstream.h> --#include <syscall.h> -+#include <sys/syscall.h> - #include <sys/param.h> - #include <sys/types.h> --#include <sys/vfs.h> -+// #include <sys/vfs.h> - #include <unistd.h> - #include <ctype.h> - #include <pwd.h> - #include <stdlib.h> - #include <assert.h> --#include <mntent.h> -+//#include <mntent.h> - #include <sys/mount.h> --#include <linux/fs.h> -+#include <fstab.h> - - #include "config.H" - #include "xdf.H" -@@ -74,17 +74,22 @@ - /*{{{ Get Information and create Panel */ - int row = 0; - -- fstab = setmntent( "/etc/fstab", "r"); -+ if (! setfsent()) { -+ perror("Couldn't open /etc/fstab!\n"); -+ return 255; -+ } -+ - - mountpoints=0; -- while ( table = getmntent( fstab ) ) { -- if ( strcmp( "swap", table->mnt_dir) && strcmp( "/proc", table->mnt_dir) -- && ( strcmp( "nfs", table->mnt_type ) || ( ! no_nfs ) ) -- && ( strcmp( "iso9660", table->mnt_type ) || ( ! no_iso9660 ) ) -+ fstab = getfsent(); -+ while ( fstab ) { -+ if ( strcmp( "swap", fstab->fs_file) && strcmp( "/proc", fstab->fs_file) -+ && ( strcmp( "nfs", fstab->fs_vfstype ) || ( ! no_nfs ) ) -+ && ( strcmp( "cd9660", fstab->fs_vfstype ) || ( ! no_iso9660 ) ) - ){ - par_table[mountpoints] = new Partition; -- par_table[mountpoints]->name = new char[ strlen(table->mnt_dir) + 1 ]; -- strcpy(par_table[mountpoints]->name, table->mnt_dir); -+ par_table[mountpoints]->name = new char[ strlen(fstab->fs_file) + 1 ]; -+ strcpy(par_table[mountpoints]->name, fstab->fs_file); - statfs(par_table[mountpoints]->name, &stat_buffer); - par_table[mountpoints]->last_max_value = - par_table[mountpoints]->max_value = ((double)stat_buffer.f_blocks * (double)stat_buffer.f_bsize) / (double) 1024; -@@ -97,8 +102,9 @@ - par_table[mountpoints]->last_value = -1; - mountpoints++; - } -+ fstab = getfsent(); - } -- endmntent( fstab ); -+ endfsent(); - - /*{{{ Title strings */ - -@@ -230,13 +236,13 @@ - par_table[i]->status = TRUE; - } - -- mtab = setmntent( "/etc/mtab", "r"); -- while ( table = getmntent( mtab ) ){ -- for ( int i = 0 ; i < mountpoints ; ++i ){ -- if ( !strcmp(par_table[i]->name, table->mnt_dir) ) par_table[i]->status = FALSE; -+ mntcount = getmntinfo(&mtab, 0); -+ for (int i = 0; i < mntcount; i++) { -+ for (int j = 0; j < mountpoints; j++) { -+ table = &mtab[i]; -+ if (! strcmp(par_table[j]->name, table->f_mntonname)) par_table[j]->status = FALSE; - } - } -- endmntent( mtab ); - - for ( int i = 0 ; i < mountpoints ; ++i ){ - if ( par_table[i]->status == FALSE && par_table[i]->last_status == TRUE) { |
