Received: from mailman by lists.gnu.org with archive (Exim 4.43) id 1MZrrh-0004H7-3e for mharc-grub-devel@gnu.org; Sat, 08 Aug 2009 15:46:05 -0400 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1MZrrf-0004FZ-DD for grub-devel@gnu.org; Sat, 08 Aug 2009 15:46:03 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1MZrra-0004BF-Mb for grub-devel@gnu.org; Sat, 08 Aug 2009 15:46:02 -0400 Received: from [199.232.76.173] (port=48914 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MZrra-0004BB-Ar for grub-devel@gnu.org; Sat, 08 Aug 2009 15:45:58 -0400 Received: from xvm-190-8.ghst.net ([217.70.190.8]:43160 helo=aybabtu.com) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1MZrrZ-0000zR-Rc for grub-devel@gnu.org; Sat, 08 Aug 2009 15:45:58 -0400 Received: from [192.168.10.10] (helo=thorin) by aybabtu.com with esmtp (Exim 4.69) (envelope-from ) id 1MZrrX-0003lw-6B for grub-devel@gnu.org; Sat, 08 Aug 2009 21:45:55 +0200 Received: from rmh by thorin with local (Exim 4.69) (envelope-from ) id 1MZrrW-00031Z-JT for grub-devel@gnu.org; Sat, 08 Aug 2009 21:45:54 +0200 Date: Sat, 8 Aug 2009 21:45:54 +0200 From: Robert Millan To: grub-devel@gnu.org Message-ID: <20090808194554.GA11564@thorin> References: MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="IS0zKkzwUGydFO0o" Content-Disposition: inline In-Reply-To: Organization: free as in freedom X-Message-Flag: Worried about Outlook viruses? Switch to Thunderbird! www.mozilla.com/thunderbird X-Debbugs-No-Ack: true User-Agent: Mutt/1.5.18 (2008-05-17) X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6 (newer, 3) Subject: grub-dumpdevtree X-BeenThere: grub-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: The development of GRUB 2 List-Id: The development of GRUB 2 List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 08 Aug 2009 19:46:03 -0000 --IS0zKkzwUGydFO0o Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Hi, I just committed this to grub-dumpdevtree. Fortunately, Vladimir explained on IRC that those cryptic numbers are actually hexified versions of ASCII strings. Without that information, this code would be unmaintainable, and to some extent it compromises freedom 1 (the freedom to study how a program works). Please note that committing undecipherable chunks of bytes without explicit maintainer approval is forbidden. If this happens again, the person who does this will lose commit access. -- Robert Millan The DRM opt-in fallacy: "Your data belongs to us. We will decide when (and how) you may access your data; but nobody's threatening your freedom: we still allow you to remove your data and not access it at all." --IS0zKkzwUGydFO0o Content-Type: text/x-diff; charset=us-ascii Content-Disposition: attachment; filename="hexify.diff" Index: util/grub-dumpdevtree =================================================================== --- util/grub-dumpdevtree (revision 2485) +++ util/grub-dumpdevtree (working copy) @@ -1,3 +1,25 @@ -echo "656669{ 6465766963652d70726f70657274696573:" +#!/bin/sh +# +# Copyright (C) 2009 Free Software Foundation, Inc. +# +# GRUB is free software: you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# GRUB is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with GRUB. If not, see . + +hexify() +{ + echo -n "$@" | od -A n -t x1 - | sed -e 's/ //g' | tr '\n' '\0' +} + +echo "`hexify efi`{ `hexify device-properties`:" ioreg -lw0 -p IODeviceTree -n efi -r -x |grep device-properties | sed 's/.*.*//;' echo ";}" --IS0zKkzwUGydFO0o--