From patchwork Sun May 5 21:43:54 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Danny Milosavljevic X-Patchwork-Id: 13907 Return-Path: X-Original-To: patchwork@mira.cbaines.net Delivered-To: patchwork@mira.cbaines.net Received: by mira.cbaines.net (Postfix, from userid 113) id 8FB7216FA0; Sun, 5 May 2019 22:45:09 +0100 (BST) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.0 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mira.cbaines.net (Postfix) with ESMTP id D755616F26 for ; Sun, 5 May 2019 22:45:06 +0100 (BST) Received: from localhost ([127.0.0.1]:46166 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hNOwU-0004fS-8s for patchwork@mira.cbaines.net; Sun, 05 May 2019 17:45:06 -0400 Received: from eggs.gnu.org ([209.51.188.92]:56980) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hNOwR-0004f2-Av for guix-patches@gnu.org; Sun, 05 May 2019 17:45:04 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hNOwQ-0003YE-5Y for guix-patches@gnu.org; Sun, 05 May 2019 17:45:03 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:41527) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1hNOwQ-0003XY-1F for guix-patches@gnu.org; Sun, 05 May 2019 17:45:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1hNOwP-0006yW-Up for guix-patches@gnu.org; Sun, 05 May 2019 17:45:01 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#35593] [PATCH] uuid: Pad resulting FAT uuid string with leading zeroes. Resent-From: Danny Milosavljevic Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Sun, 05 May 2019 21:45:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 35593 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 35593@debbugs.gnu.org X-Debbugs-Original-To: guix-patches@gnu.org Received: via spool by submit@debbugs.gnu.org id=B.155709265826726 (code B ref -1); Sun, 05 May 2019 21:45:01 +0000 Received: (at submit) by debbugs.gnu.org; 5 May 2019 21:44:18 +0000 Received: from localhost ([127.0.0.1]:55071 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hNOvh-0006x0-UX for submit@debbugs.gnu.org; Sun, 05 May 2019 17:44:18 -0400 Received: from eggs.gnu.org ([209.51.188.92]:42475) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hNOvf-0006wn-VG for submit@debbugs.gnu.org; Sun, 05 May 2019 17:44:16 -0400 Received: from lists.gnu.org ([209.51.188.17]:58868) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1hNOvZ-0000HV-Pe for submit@debbugs.gnu.org; Sun, 05 May 2019 17:44:09 -0400 Received: from eggs.gnu.org ([209.51.188.92]:56821) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hNOvX-0004WS-Ln for guix-patches@gnu.org; Sun, 05 May 2019 17:44:08 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hNOvV-00008b-Ov for guix-patches@gnu.org; Sun, 05 May 2019 17:44:06 -0400 Received: from dd26836.kasserver.com ([85.13.145.193]:55116) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1hNOvT-00089d-N9 for guix-patches@gnu.org; Sun, 05 May 2019 17:44:05 -0400 Received: from dayas.3.home (178.113.194.41.wireless.dyn.drei.com [178.113.194.41]) by dd26836.kasserver.com (Postfix) with ESMTPSA id E89B533602A1; Sun, 5 May 2019 23:43:57 +0200 (CEST) From: Danny Milosavljevic Date: Sun, 5 May 2019 23:43:54 +0200 Message-Id: <20190505214354.24882-1-dannym@scratchpost.org> X-Mailer: git-send-email 2.20.1 MIME-Version: 1.0 Tags: patch X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 209.51.188.43 X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org Sender: "Guix-patches" X-getmail-retrieved-from-mailbox: Patches Fixes . Reported by sirgazil . * gnu/system/uuid.scm (fat-uuid->string): Pad resulting string with leading zeroes. --- gnu/system/uuid.scm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gnu/system/uuid.scm b/gnu/system/uuid.scm index f13960c3e9..7204d163d0 100644 --- a/gnu/system/uuid.scm +++ b/gnu/system/uuid.scm @@ -175,7 +175,7 @@ ISO9660 UUID representation." "Convert FAT32/FAT16 UUID, a 4-byte bytevector, to its string representation." (let ((high (bytevector-uint-ref uuid 0 %fat-endianness 2)) (low (bytevector-uint-ref uuid 2 %fat-endianness 2))) - (format #f "~:@(~x-~x~)" low high))) + (format #f "~:@(~4,'0x-~4,'0x~)" low high))) (define %fat-uuid-rx (make-regexp "^([[:xdigit:]]{4})-([[:xdigit:]]{4})$"))