From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from list by lists.gnu.org with archive (Exim 4.90_1) id 1qOjam-0005Rx-8U for mharc-grub-devel@gnu.org; Wed, 26 Jul 2023 14:50:36 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qOjaj-0005Rh-Ui for grub-devel@gnu.org; Wed, 26 Jul 2023 14:50:34 -0400 Received: from mail-vk1-xa30.google.com ([2607:f8b0:4864:20::a30]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1qOjai-00041z-Jr for grub-devel@gnu.org; Wed, 26 Jul 2023 14:50:33 -0400 Received: by mail-vk1-xa30.google.com with SMTP id 71dfb90a1353d-4864a439e51so54134e0c.1 for ; Wed, 26 Jul 2023 11:50:32 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=efficientek-com.20221208.gappssmtp.com; s=20221208; t=1690397431; x=1691002231; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=sFvZ0iGa3P7UiaXjoxf4cAazGSujW6fvdps2nb+3XPI=; b=w9295g8fYsy/03Uo80JDjxoz/Aa9G11giil1pmhHAlJ3URUAvkuXNOA0byb7PDLDIu 5+Lo9GPZgYdVVJpTB7WPQNyOGZja0GWXKrH5e7zBdiwNUb/MBZVgtFDs1doJG1ZVrAZZ pZfiF0N3ewkZGdF/kOlikx/jtbQEHjgZzJFWKXJbhuQW+qKM5k9jR04EWBe/Xd1/SXIM xPsl0UqV3+FT4ytXBxRXWwhmt6uSCjxdyf1FnEL3D219AwTPDlM1YGNCnQekUUuxIWJ0 vytWZIQoDs9WdzAjdFIYvFDxf05hB8UYSt1aDH8eyW450eqoKdPf1eadMihVpc86TXZ8 MCFA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1690397431; x=1691002231; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=sFvZ0iGa3P7UiaXjoxf4cAazGSujW6fvdps2nb+3XPI=; b=hO2gkFoLDFw1XUSYxPWhn7hRLr/bfbZVUB/FZQ2LJ6U4FRDyl125aBHSvHeNVf2coZ OX2R1xR1vnH+ZGQNTqCNrEBEBdYsaRCdyiFV+xNfrKf8Qo8a9Gsavkg7yl9ghgKus4r4 Ot/XFV/brlPtM6PFfYe2fckohPFb93CjuhUYeJJhZ+52AF8nlssg5psE1a4iOAaGB+QK g32w3osL+f+2qOjpqONjI3JptySxTgDHuphDUSYIvI4miiMcaKKJvp3oekkaTMB3fTk+ HA1YsgCL/KS4FHY8ijvxrA0RiN+m2N7+Thpuz/7mnUmkRR1zRUOpcVCnKHh7hCuE9+QA lneA== X-Gm-Message-State: ABy/qLYT92+aFTbTarctAEHG0OexmGc8uUG/VdbVrXmmIFQN8D4lbxNi QFddlrRrn5qvcFO0D/y+BXh9DHfSMcoIL573qvA= X-Google-Smtp-Source: APBJJlEJcZA4AxJ6qI+o68gp8E69XL9YXbTKMwIX5ng8kFl+180vnf1WvMIb9WMYn/AJZD+cCx5JdQ== X-Received: by 2002:a1f:3f02:0:b0:483:9adf:af19 with SMTP id m2-20020a1f3f02000000b004839adfaf19mr2410392vka.2.1690397431258; Wed, 26 Jul 2023 11:50:31 -0700 (PDT) Received: from localhost.localdomain ([37.218.244.249]) by smtp.gmail.com with ESMTPSA id m24-20020ac5c218000000b00481830391a0sm2153670vkk.34.2023.07.26.11.50.28 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 26 Jul 2023 11:50:30 -0700 (PDT) From: Glenn Washburn To: grub-devel@gnu.org, Daniel Kiper Cc: Glenn Washburn Subject: [PATCH 2/2] docs: A note to cat that hexdump should be used for binary data Date: Wed, 26 Jul 2023 13:50:12 -0500 Message-Id: X-Mailer: git-send-email 2.34.1 In-Reply-To: References: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Received-SPF: pass client-ip=2607:f8b0:4864:20::a30; envelope-from=development@efficientek.com; helo=mail-vk1-xa30.google.com X-Spam_score_int: -18 X-Spam_score: -1.9 X-Spam_bar: - X-Spam_report: (-1.9 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: grub-devel@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: The development of GNU GRUB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 26 Jul 2023 18:50:34 -0000 The cat command should not be used to print binary data because it can show bytes not in the binary data and not show bytes that are in the data, which can lead to confusion. This happens because cat does some processing of the data stream, namely trying to decode substrings as UTF-8. Signed-off-by: Glenn Washburn --- docs/grub.texi | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/docs/grub.texi b/docs/grub.texi index 5f6f0895ef4f..71bd578c7a11 100644 --- a/docs/grub.texi +++ b/docs/grub.texi @@ -4541,6 +4541,12 @@ will be displayed as a simple new line. Otherwise, the carriage return will be displayed as a control character (@samp{}) to make it easier to see when boot problems are caused by a file formatted using DOS-style line endings. + +Note: @command{cat} can be used to view the contents of devices using the +block list syntax (@pxref{Block list syntax}). However, it is not advised +to view binary data because it will try to decode UTF-8 strings, which can +lead to some bytes missing or added in the output. Instead, use the +@command{hexdump} command (@pxref{hexdump}). @end deffn -- 2.34.1