FreeBSD Bugzilla – Attachment 42390 Details for
Bug 66115
[MAINTAINER UPDATE] deskutils/gdesklets-0.26.2
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
gdesklets_statvfs2.diff
gdesklets_statvfs2.diff (text/plain), 2.77 KB, created by
Franz Klammer
on 2004-04-30 16:50:20 UTC
(
hide
)
Description:
gdesklets_statvfs2.diff
Filename:
MIME Type:
Creator:
Franz Klammer
Created:
2004-04-30 16:50:20 UTC
Size:
2.77 KB
patch
obsolete
>diff -Nur gdesklets.orig/Makefile gdesklets/Makefile >--- gdesklets.orig/Makefile Mon Apr 5 05:30:17 2004 >+++ gdesklets/Makefile Fri Apr 30 17:24:15 2004 >@@ -6,8 +6,7 @@ > # > > PORTNAME= gdesklets >-PORTVERSION= 0.26.1 >-PORTREVISION= 1 >+PORTVERSION= 0.26.2 > CATEGORIES= deskutils gnome > MASTER_SITES= http://www.pycage.de/download/${PORTNAME}/ > DISTNAME= gDesklets-${PORTVERSION} >diff -Nur gdesklets.orig/distinfo gdesklets/distinfo >--- gdesklets.orig/distinfo Wed Mar 24 00:28:32 2004 >+++ gdesklets/distinfo Fri Apr 30 17:24:27 2004 >@@ -1,2 +1,2 @@ >-MD5 (gDesklets-0.26.1.tar.bz2) = bae8006b869c6fb05064579f7593d449 >-SIZE (gDesklets-0.26.1.tar.bz2) = 339474 >+MD5 (gDesklets-0.26.2.tar.bz2) = c001e527a4ed4fe2b66d71df9b8b21ab >+SIZE (gDesklets-0.26.2.tar.bz2) = 401097 >diff -Nur gdesklets.orig/files/patch-libdesklets::Disk.py gdesklets/files/patch-libdesklets::Disk.py >--- gdesklets.orig/files/patch-libdesklets::Disk.py Tue Feb 24 17:07:10 2004 >+++ gdesklets/files/patch-libdesklets::Disk.py Fri Apr 30 16:07:18 2004 >@@ -1,14 +1,15 @@ >---- libdesklets/Disk.py.orig Mon Feb 23 10:52:50 2004 >-+++ libdesklets/Disk.py Mon Feb 23 10:54:31 2004 >-@@ -1,6 +1,6 @@ >+--- libdesklets/Disk.py.orig Fri Feb 20 14:29:07 2004 >++++ libdesklets/Disk.py Fri Apr 30 15:50:42 2004 >+@@ -1,6 +1,7 @@ > import glibtop > import polling > - > +import os >++import statvfs > > class Disk: > >-@@ -21,14 +21,19 @@ >+@@ -21,14 +22,19 @@ > # > def __poll_partitions(self): > >@@ -35,3 +36,32 @@ > > return partitions > >+@@ -43,15 +49,19 @@ >+ #:/function >+ # >+ def __poll_size(self, partition): >+- >+- blocks, bfree, bavail, files, ffree = glibtop.get_fsusage(partition) >+- free = float(bfree * 512) >+- total = float(blocks * 512) >+- used = total - free >+- >+- return (total, used)#, free) >+- >+- >++ >++ try: >++ statvfs_data = os.statvfs(partition) >++ free = float(statvfs_data[statvfs.F_BFREE] * statvfs_data[statvfs.F_FRSIZE]) >++ total = float(statvfs_data[statvfs.F_BLOCKS] * statvfs_data[statvfs.F_FRSIZE]) >++ except: >++ blocks, bfree, bavail, files, ffree = glibtop.get_fsusage(partition) >++ free = float(bfree * 512) >++ total = float(blocks * 512) >++ >++ used = total - free >++ >++ return (total, used)#, free) >+ >+ # >+ #:function get_fs | partition | Returns the filesystem for the given
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 66115
: 42390