aboutsummaryrefslogtreecommitdiff
path: root/guix/scripts/gc.scm
diff options
context:
space:
mode:
authorTaylan Kammer <taylanbayirli@gmail.com>2018-06-22 21:55:26 +0200
committerTaylan Kammer <taylanbayirli@gmail.com>2018-06-28 00:29:46 +0200
commit0925c0ea771b949d58be084444fa2c2370f6d74e (patch)
tree2c0de4d8fec600806ef062c6076a8cedaf229722 /guix/scripts/gc.scm
parent3785ccd201129bfb6240cbe920d049377d2cb1e7 (diff)
downloadgnu-guix-0925c0ea771b949d58be084444fa2c2370f6d74e.tar
gnu-guix-0925c0ea771b949d58be084444fa2c2370f6d74e.tar.gz
scripts: gc: Report size in MiBs instead of bytes.
* guix/scripts/gc.scm (guix-gc): Show info in MiBs not bytes.
Diffstat (limited to 'guix/scripts/gc.scm')
-rw-r--r--guix/scripts/gc.scm10
1 files changed, 5 insertions, 5 deletions
diff --git a/guix/scripts/gc.scm b/guix/scripts/gc.scm
index e4ed7227ff..6f37b767ff 100644
--- a/guix/scripts/gc.scm
+++ b/guix/scripts/gc.scm
@@ -199,10 +199,10 @@ Invoke the garbage collector.\n"))
;; Attempt to have at least SPACE bytes available in STORE.
(let ((free (free-disk-space (%store-prefix))))
(if (> free space)
- (info (G_ "already ~h bytes available on ~a, nothing to do~%")
- free (%store-prefix))
+ (info (G_ "already ~h MiBs available on ~a, nothing to do~%")
+ (/ free 1024. 1024.) (%store-prefix))
(let ((to-free (- space free)))
- (info (G_ "freeing ~h bytes~%") to-free)
+ (info (G_ "freeing ~h MiBs~%") (/ to-free 1024. 1024.))
(collect-garbage store to-free)))))
(with-error-handling
@@ -234,10 +234,10 @@ Invoke the garbage collector.\n"))
(ensure-free-space store free-space))
(min-freed
(let-values (((paths freed) (collect-garbage store min-freed)))
- (info (G_ "freed ~h bytes~%") freed)))
+ (info (G_ "freed ~h MiBs~%") (/ freed 1024. 1024.))))
(else
(let-values (((paths freed) (collect-garbage store)))
- (info (G_ "freed ~h bytes~%") freed))))))
+ (info (G_ "freed ~h MiBs~%") (/ freed 1024. 1024.)))))))
((delete)
(delete-paths store (map direct-store-path paths)))
((list-references)