pkgsrc-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[pkgsrc/trunk]: pkgsrc/sysutils/gworkspace Use getfsstat on DragonFly. Older ...



details:   https://anonhg.NetBSD.org/pkgsrc/rev/ed7d04d59f35
branches:  trunk
changeset: 510089:ed7d04d59f35
user:      joerg <joerg%pkgsrc.org@localhost>
date:      Fri Mar 24 19:05:31 2006 +0000

description:
Use getfsstat on DragonFly. Older NetBSD should most likely use it
as well.

diffstat:

 sysutils/gworkspace/distinfo         |   4 ++--
 sysutils/gworkspace/patches/patch-aa |  28 +++++++++++++++++++++-------
 2 files changed, 23 insertions(+), 9 deletions(-)

diffs (107 lines):

diff -r 4ea24c064dd6 -r ed7d04d59f35 sysutils/gworkspace/distinfo
--- a/sysutils/gworkspace/distinfo      Fri Mar 24 18:50:55 2006 +0000
+++ b/sysutils/gworkspace/distinfo      Fri Mar 24 19:05:31 2006 +0000
@@ -1,7 +1,7 @@
-$NetBSD: distinfo,v 1.6 2005/05/02 06:35:55 rh Exp $
+$NetBSD: distinfo,v 1.7 2006/03/24 19:05:31 joerg Exp $
 
 SHA1 (gworkspace-0.7.1.tar.gz) = f1679a2d507e2ccc35e1cb06bbdea7e2864c4528
 RMD160 (gworkspace-0.7.1.tar.gz) = 5fb43c7faaf0a2a46a150011a34ac21ab074bb39
 Size (gworkspace-0.7.1.tar.gz) = 1412129 bytes
-SHA1 (patch-aa) = dc897d3e32a1e020557e489e36781088e8767a3e
+SHA1 (patch-aa) = 0e9cb7923f161796ca5426252928335289229cbd
 SHA1 (patch-ab) = 421fdbb920f5efc4c91969a6391e098e489dd1ce
diff -r 4ea24c064dd6 -r ed7d04d59f35 sysutils/gworkspace/patches/patch-aa
--- a/sysutils/gworkspace/patches/patch-aa      Fri Mar 24 18:50:55 2006 +0000
+++ b/sysutils/gworkspace/patches/patch-aa      Fri Mar 24 19:05:31 2006 +0000
@@ -1,21 +1,23 @@
-$NetBSD: patch-aa,v 1.4 2005/05/02 06:35:55 rh Exp $
+$NetBSD: patch-aa,v 1.5 2006/03/24 19:05:31 joerg Exp $
 
 --- GWorkspace/Desktop/GWDesktopManager.m.orig 2005-04-01 09:43:39.000000000 +1000
 +++ GWorkspace/Desktop/GWDesktopManager.m
-@@ -31,6 +31,12 @@
+@@ -31,6 +31,14 @@
  #include "GWorkspace.h"
  #include "GWViewersManager.h"
  #include "TShelf/TShelfWin.h"
 +#include <sys/types.h>
 +#include <sys/param.h>
 +
-+#if (defined(BSD) && BSD >= 199306)
++#if defined(__DragonFly__)
++#include <sys/mount.h>
++#elif (defined(BSD) && BSD >= 199306)
 +#include <sys/statvfs.h>
 +#endif
  
  #define RESV_MARGIN 10
  
-@@ -748,9 +754,31 @@ static GWDesktopManager *desktopManager 
+@@ -748,9 +756,39 @@ static GWDesktopManager *desktopManager 
    }
  
    if (removables == nil) {
@@ -27,7 +29,11 @@
    }
    
 +#if (defined(BSD) && BSD >= 199306)
++#if defined(__DragonFly__)
++  struct statfs *mntbuf;
++#else
 +  struct statvfs *mntbuf;
++#endif
 +  int mntsize = getmntinfo(&mntbuf, MNT_NOWAIT);
 +
 +  for (i = 0; i < mntsize; i++) {
@@ -35,7 +41,11 @@
 +        strcmp(mntbuf[i].f_mntonname,   [fullPath cString]) == 0) {
 +      *removableFlag = [removables containsObject:
 +                        [NSString stringWithCString: mntbuf[i].f_mntonname]];
++#if defined(__DragonFly__)
++      *writableFlag = ( mntbuf[i].f_flags & MNT_RDONLY ) ? NO : YES;
++#else
 +      *writableFlag = ( mntbuf[i].f_flag & MNT_RDONLY ) ? NO : YES;
++#endif
 +      *unmountableFlag = YES;
 +      *fileSystemType = [NSString stringWithCString: mntbuf[i].f_fstypename];
 +      *description = *fileSystemType;
@@ -47,7 +57,7 @@
    mtab = [NSString stringWithContentsOfFile: mtabpath];
    mounts = [mtab componentsSeparatedByString: @"\n"];
  
-@@ -782,6 +810,7 @@ static GWDesktopManager *desktopManager 
+@@ -782,6 +820,7 @@ static GWDesktopManager *desktopManager 
        }
      }
    }
@@ -55,7 +65,7 @@
  
    return NO;
  }
-@@ -801,11 +830,27 @@ static GWDesktopManager *desktopManager 
+@@ -801,11 +840,31 @@ static GWDesktopManager *desktopManager 
    }
  
    if (reserved == nil) {
@@ -70,7 +80,11 @@
  
 +#if (defined(BSD) && BSD >= 199306)
 +  names = [NSMutableArray array];
++#if defined(__DragonFly__)
++  struct statfs *mntbuf;
++#else
 +  struct statvfs *mntbuf;
++#endif
 +  int mntsize = getmntinfo(&mntbuf, MNT_NOWAIT);
 +
 +  for (i = 0; i < mntsize; i++) {
@@ -83,7 +97,7 @@
    mtab = [NSString stringWithContentsOfFile: mtabpath];
    mounts = [mtab componentsSeparatedByString: @"\n"];
    names = [NSMutableArray array];
-@@ -825,6 +870,7 @@ static GWDesktopManager *desktopManager 
+@@ -825,6 +884,7 @@ static GWDesktopManager *desktopManager 
        }
      } 
    }



Home | Main Index | Thread Index | Old Index