guix-commits
[Top][All Lists]
Advanced

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

02/02: guix system: Pretty-print device UUIDs.


From: Ludovic Courtès
Subject: 02/02: guix system: Pretty-print device UUIDs.
Date: Tue, 12 Sep 2017 02:58:38 -0400 (EDT)

civodul pushed a commit to branch master
in repository guix.

commit fc2de6ce134fb012373387ff9d73c75c449c5cc9
Author: Ludovic Courtès <address@hidden>
Date:   Tue Sep 12 08:46:05 2017 +0200

    guix system: Pretty-print device UUIDs.
    
    * guix/scripts/system.scm (display-system-generation): Check if
    ROOT-DEVICE is a UUID and pretty-print it if it is.
---
 guix/scripts/system.scm | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/guix/scripts/system.scm b/guix/scripts/system.scm
index 7737793..ea35fcd 100644
--- a/guix/scripts/system.scm
+++ b/guix/scripts/system.scm
@@ -41,6 +41,7 @@
   #:use-module (gnu bootloader)
   #:use-module (gnu system file-systems)
   #:use-module (gnu system linux-container)
+  #:use-module (gnu system uuid)
   #:use-module (gnu system vm)
   #:use-module (gnu services)
   #:use-module (gnu services shepherd)
@@ -530,7 +531,10 @@ list of services."
       ;; TRANSLATORS: Please preserve the two-space indentation.
       (format #t (G_ "  label: ~a~%") label)
       (format #t (G_ "  bootloader: ~a~%") bootloader-name)
-      (format #t (G_ "  root device: ~a~%") root-device)
+      (format #t (G_ "  root device: ~a~%")
+              (if (uuid? root-device)
+                  (uuid->string root-device)
+                  root-device))
       (format #t (G_ "  kernel: ~a~%") kernel))))
 
 (define* (list-generations pattern #:optional (profile %system-profile))



reply via email to

[Prev in Thread] Current Thread [Next in Thread]