From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:49648) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dVwFf-0007Ge-IK for guix-patches@gnu.org; Fri, 14 Jul 2017 04:47:08 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dVwFa-0006Fq-M5 for guix-patches@gnu.org; Fri, 14 Jul 2017 04:47:07 -0400 Received: from debbugs.gnu.org ([208.118.235.43]:35049) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1dVwFa-0006Fm-I6 for guix-patches@gnu.org; Fri, 14 Jul 2017 04:47:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1dVwFa-00007H-BV for guix-patches@gnu.org; Fri, 14 Jul 2017 04:47:02 -0400 Subject: [bug#27690] [PATCH] build: Allow mounting of entire disks. Resent-Message-ID: Received: from eggs.gnu.org ([2001:4830:134:3::10]:49545) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dVwFK-00071Y-D7 for guix-patches@gnu.org; Fri, 14 Jul 2017 04:46:47 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dVwFF-00065i-Et for guix-patches@gnu.org; Fri, 14 Jul 2017 04:46:46 -0400 Received: from dd1012.kasserver.com ([85.13.128.8]:54430) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1dVwFF-00065I-8L for guix-patches@gnu.org; Fri, 14 Jul 2017 04:46:41 -0400 From: Danny Milosavljevic Date: Fri, 14 Jul 2017 10:32:15 +0200 Message-Id: <20170714083215.9889-1-dannym@scratchpost.org> List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+kyle=kyleam.com@gnu.org Sender: "Guix-patches" To: 27690@debbugs.gnu.org * gnu/build/file-systems.scm (disk-partitions): Also return entire drives. --- gnu/build/file-systems.scm | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/gnu/build/file-systems.scm b/gnu/build/file-systems.scm index b6930497d..462ed9b7f 100644 --- a/gnu/build/file-systems.scm +++ b/gnu/build/file-systems.scm @@ -377,11 +377,14 @@ not valid header was found." (string-ref str (- (string-length str) 1))) (define (partition? name major minor) - ;; Select device names that end in a digit, like libblkid's 'probe_all' - ;; function does. Checking for "/sys/dev/block/MAJOR:MINOR/partition" - ;; doesn't work for partitions coming from mapped devices. - (and (char-set-contains? char-set:digit (last-character name)) - (> major 2))) ;ignore RAM disks and floppy disks + ;; grub-mkrescue does some funny things for EFI support which + ;; makes it a lot more difficult than one would expect to support + ;; booting an ISO-9660 image from an USB flash drive. + ;; For example there's a buggy (too small) hidden partition in it + ;; which Linux rightfully refuses to mount. + ;; In any case, partition tables are supposed to be optional so + ;; here we allow checking entire disks for file systems, too. + (> major 2)) ;ignore RAM disks and floppy disks (call-with-input-file "/proc/partitions" (lambda (port)