Update to fix free space calculation on a hard drive on NetBSD.
This commit is contained in:
parent
0163fa74c5
commit
291a028c2f
3 changed files with 18 additions and 6 deletions
|
@ -1,6 +1,6 @@
|
|||
# $NetBSD: Makefile,v 1.42 2018/04/16 14:35:13 wiz Exp $
|
||||
# $NetBSD: Makefile,v 1.43 2018/05/28 23:41:52 youri Exp $
|
||||
|
||||
PKGREVISION= 3
|
||||
PKGREVISION= 4
|
||||
.include "../../meta-pkgs/xfce4/Makefile.common"
|
||||
|
||||
DISTNAME= xfce4-fsguard-plugin-1.1.0
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
$NetBSD: distinfo,v 1.11 2017/06/20 21:49:03 youri Exp $
|
||||
$NetBSD: distinfo,v 1.12 2018/05/28 23:41:52 youri Exp $
|
||||
|
||||
SHA1 (xfce4-fsguard-plugin-1.1.0.tar.bz2) = f96bec79e6dcac6f1a5ab576f78bc5b6b8986369
|
||||
RMD160 (xfce4-fsguard-plugin-1.1.0.tar.bz2) = 9aa79cf084663319d818436b9982fb81ee99318e
|
||||
SHA512 (xfce4-fsguard-plugin-1.1.0.tar.bz2) = c5e49a045f1987d57c6e6d120ad25785d2f9ad4e97d07af3d40ab88c268b5b8417deba40e0277ecc1725092063fa2a7f94aa163579f04a419aad5b4e47c79d7d
|
||||
Size (xfce4-fsguard-plugin-1.1.0.tar.bz2) = 360463 bytes
|
||||
SHA1 (patch-panel-plugin_fsguard.c) = 05ec59240563a208fc3cb23d49c8b4321d680c47
|
||||
SHA1 (patch-panel-plugin_fsguard.c) = 813ab6c5f61591039c4b8d8a817183dbe1c9505e
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
$NetBSD: patch-panel-plugin_fsguard.c,v 1.2 2017/06/20 21:49:03 youri Exp $
|
||||
$NetBSD: patch-panel-plugin_fsguard.c,v 1.3 2018/05/28 23:41:53 youri Exp $
|
||||
|
||||
Fix NetBSD support.
|
||||
Add SunOS, OS X and DragonFlyBSD support.
|
||||
|
||||
--- panel-plugin/fsguard.c.orig 2012-06-30 09:07:55.000000000 +0000
|
||||
--- panel-plugin/fsguard.c.orig 2016-10-29 06:43:10.000000000 +0000
|
||||
+++ panel-plugin/fsguard.c
|
||||
@@ -38,13 +38,18 @@
|
||||
#include <string.h>
|
||||
|
@ -25,3 +25,15 @@ Add SunOS, OS X and DragonFlyBSD support.
|
|||
#include <gtk/gtk.h>
|
||||
#include <libxfce4util/libxfce4util.h>
|
||||
#include <libxfce4ui/libxfce4ui.h>
|
||||
@@ -277,7 +282,11 @@ fsguard_check_fs (FsGuard *fsguard)
|
||||
err = statfs (fsguard->path, &fsd);
|
||||
|
||||
if (err != -1) {
|
||||
+#ifdef __NetBSD__
|
||||
+ blocksize = fsd.f_frsize;
|
||||
+#else
|
||||
blocksize = fsd.f_bsize;
|
||||
+#endif
|
||||
freeblocks = fsd.f_bavail;
|
||||
totalblocks = fsd.f_blocks;
|
||||
freespace = (freeblocks * blocksize) / 1048576;
|
||||
|
|
Loading…
Reference in a new issue