From mboxrd@z Thu Jan 1 00:00:00 1970 From: Danny Milosavljevic Subject: bug#27212: [PATCH] file-systems: Improve error handling in the iso9660 case - fixes boot problem. Date: Sat, 3 Jun 2017 20:00:13 +0200 Message-ID: <20170603180013.15853-1-dannym@scratchpost.org> References: <8737bh0zvt.fsf@fastmail.com> Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:40875) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dHDNG-0003bV-He for bug-guix@gnu.org; Sat, 03 Jun 2017 14:02:07 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dHDNC-00071c-J2 for bug-guix@gnu.org; Sat, 03 Jun 2017 14:02:06 -0400 Received: from debbugs.gnu.org ([208.118.235.43]:51415) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1dHDNC-00071Y-G0 for bug-guix@gnu.org; Sat, 03 Jun 2017 14:02:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1dHDNC-0002S7-75 for bug-guix@gnu.org; Sat, 03 Jun 2017 14:02:02 -0400 Sender: "Debbugs-submit" Resent-Message-ID: In-Reply-To: <8737bh0zvt.fsf@fastmail.com> List-Id: Bug reports for GNU Guix List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-guix-bounces+gcggb-bug-guix=m.gmane.org@gnu.org Sender: "bug-Guix" To: 27212@debbugs.gnu.org * gnu/build/file-systems.scm (read-iso9660-superblock): Modify. --- gnu/build/file-systems.scm | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/gnu/build/file-systems.scm b/gnu/build/file-systems.scm index 3e0873377..740c37124 100644 --- a/gnu/build/file-systems.scm +++ b/gnu/build/file-systems.scm @@ -260,7 +260,11 @@ volume descriptor from ~s" "Return the raw contents of DEVICE's iso9660 primary volume descriptor as a bytevector, or #f if DEVICE does not contain an iso9660 file system." ;; Start reading at sector 16. - (read-iso9660-primary-volume-descriptor device (* 2048 16))) + ;; Since we are not sure that the device contains an ISO9660 filesystem, + ;; we have to find that out first. + (if (read-superblock device (* 2048 16) 2048 iso9660-superblock?) + (read-iso9660-primary-volume-descriptor device (* 2048 16)) + #f)) ; Device does not contain an iso9660 filesystem. (define (iso9660-superblock-uuid sblock) "Return the modification time of an iso9660 primary volume descriptor