summaryrefslogtreecommitdiff
path: root/guix/scripts/gc.scm
diff options
context:
space:
mode:
authorMarius Bakke <mbakke@fastmail.com>2017-06-03 17:51:21 +0200
committerMarius Bakke <mbakke@fastmail.com>2017-06-03 17:51:21 +0200
commitd0c45d2d822fdf31b8a8edc73fe7be12a0676705 (patch)
tree04ae8108a67013fce99273db4582c29e7845f0a7 /guix/scripts/gc.scm
parent0b70f7d557181febd80b16c8e3a03887df3871af (diff)
parentac1560f18c25e4312c1f32c001405c176daa1764 (diff)
downloadguix-patches-d0c45d2d822fdf31b8a8edc73fe7be12a0676705.tar
guix-patches-d0c45d2d822fdf31b8a8edc73fe7be12a0676705.tar.gz
Merge branch 'master' into core-updates
Conflicts: gnu/packages/image.scm (incorporated libtiff graft)
Diffstat (limited to 'guix/scripts/gc.scm')
-rw-r--r--guix/scripts/gc.scm8
1 files changed, 3 insertions, 5 deletions
diff --git a/guix/scripts/gc.scm b/guix/scripts/gc.scm
index 221467a108..0a9719d259 100644
--- a/guix/scripts/gc.scm
+++ b/guix/scripts/gc.scm
@@ -1,5 +1,5 @@
;;; GNU Guix --- Functional package management for GNU
-;;; Copyright © 2012, 2013, 2015, 2016 Ludovic Courtès <ludo@gnu.org>
+;;; Copyright © 2012, 2013, 2015, 2016, 2017 Ludovic Courtès <ludo@gnu.org>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -20,7 +20,7 @@
#:use-module (guix ui)
#:use-module (guix scripts)
#:use-module (guix store)
- #:autoload (guix build syscalls) (statfs)
+ #:autoload (guix build syscalls) (free-disk-space)
#:use-module (ice-9 match)
#:use-module (ice-9 regex)
#:use-module (srfi srfi-1)
@@ -184,9 +184,7 @@ Invoke the garbage collector.\n"))
(define (ensure-free-space store space)
;; Attempt to have at least SPACE bytes available in STORE.
- (let* ((fs (statfs (%store-prefix)))
- (free (* (file-system-block-size fs)
- (file-system-blocks-available fs))))
+ (let ((free (free-disk-space (%store-prefix))))
(if (> free space)
(info (G_ "already ~h bytes available on ~a, nothing to do~%")
free (%store-prefix))