Received: from list by lists.gnu.org with archive (Exim 4.90_1) id 1nQ1eu-00023s-Rt for mharc-grub-devel@gnu.org; Fri, 04 Mar 2022 01:43:24 -0500 Received: from eggs.gnu.org ([209.51.188.92]:52200) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nQ1eU-0001sS-7m for grub-devel@gnu.org; Fri, 04 Mar 2022 01:43:07 -0500 Received: from smtp26.services.sfr.fr ([93.17.128.192]:18222) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nQ1eQ-0005RD-DY for grub-devel@gnu.org; Fri, 04 Mar 2022 01:42:57 -0500 X-mail-filterd: {"version":"1.3.4", "queueID":"4K8yw065JLz1LQKdV", "contextId":"a97fd984-ea97-484f-8cfb-dd068e748ee4"} Received: from debian.numericable.fr (89-156-196-228.rev.numericable.fr [89.156.196.228]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by msfrf2606.sfr.fr (SMTP Server) with ESMTPS id 4K8yw065JLz1LQKdV; Fri, 4 Mar 2022 07:42:40 +0100 (CET) X-mail-filterd: {"version":"1.3.4", "queueID":"4K8yw056ZTz1LQKdR", "contextId":"cf228358-dc02-45f5-bf4e-ef4fccdf44e8"} X-sfr-mailing: LEGIT X-sfr-spamrating: 40 X-sfr-spam: not-spam DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=noos.fr; s=202006; t=1646376160; h=From:To:Cc:Subject:Date:In-Reply-To:References; bh=yZRip/5S+i Rcb00ILciO4+v3GiTRaQWj/IYTZA403ew=; b=deEaZOcYBOZryoq1c5fXU524SzOA4q31WfD9AS 2N/bJGtyx8SpXtkK1WsTrnygXvyu2cjiEpB8FBAqcfgOucyNjXlxNFxh1+LA333R7WRBEnv2Ko/t nKj9IFDj8ggQ24jJGGqRr365NjfbtKMhciVZaolhRunw9GNA9LvZ1SfFUTQLzAoSvCJloL6Thj12 LKH++XEMYEH3+BasJ0MI9tAYO4XsR1tyzp/Kl1dhQopnxc08JxDmHhDHmflvXhgFwDNmrmuTqvsa HaQsShqGsB/Xab9N9ZMMk0OddXVVD7RnBAGf9KiEvzej2VtHLvBuP5fUErSQi99M0Dr9d7RKskPw == Received: from debian.numericable.fr (89-156-196-228.rev.numericable.fr [89.156.196.228]) by msfrf2606.sfr.fr (SMTP Server) with ESMTP id 4K8yw056ZTz1LQKdR; Fri, 4 Mar 2022 07:42:40 +0100 (CET) Received: from debian.numericable.fr (89-156-196-228.rev.numericable.fr [89.156.196.228]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) (Authenticated sender: ehaouas@noos.fr) by msfrf2606.sfr.fr (SMTP Server) with ESMTPSA; Fri, 4 Mar 2022 07:42:40 +0100 (CET) Authentication-Results: sfr.fr; auth=pass (LOGIN) smtp.auth=ehaouas@noos.fr From: Elyes Haouas To: grub-devel@gnu.org Cc: Elyes Haouas Subject: [PATCH 15/21] partmap: Remove trailing whitespaces Date: Fri, 4 Mar 2022 07:42:09 +0100 Message-Id: <20220304064215.2474-15-ehaouas@noos.fr> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20220304064215.2474-1-ehaouas@noos.fr> References: <20220304064215.2474-1-ehaouas@noos.fr> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Received-SPF: pass client-ip=93.17.128.192; envelope-from=ehaouas@noos.fr; helo=smtp26.services.sfr.fr X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-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: Fri, 04 Mar 2022 06:43:10 -0000 Signed-off-by: Elyes Haouas --- grub-core/partmap/bsdlabel.c | 4 ++-- grub-core/partmap/dvh.c | 4 ++-- grub-core/partmap/msdos.c | 4 ++-- grub-core/partmap/sun.c | 2 +- grub-core/partmap/sunpc.c | 4 ++-- 5 files changed, 9 insertions(+), 9 deletions(-) diff --git a/grub-core/partmap/bsdlabel.c b/grub-core/partmap/bsdlabel.c index 1d785906b..4e93faf1c 100644 --- a/grub-core/partmap/bsdlabel.c +++ b/grub-core/partmap/bsdlabel.c @@ -132,14 +132,14 @@ bsdlabel_partition_map_iterate (grub_disk_t disk, return iterate_real (disk, GRUB_PC_PARTITION_BSD_LABEL_SECTOR, 1, &grub_bsdlabel_partition_map, hook, hook_data); - if (disk->partition + if (disk->partition && (grub_strcmp (disk->partition->partmap->name, "msdos") == 0 || disk->partition->partmap == &grub_bsdlabel_partition_map || disk->partition->partmap == &grub_netbsdlabel_partition_map || disk->partition->partmap == &grub_openbsdlabel_partition_map)) return grub_error (GRUB_ERR_BAD_PART_TABLE, "no embedding supported"); - return iterate_real (disk, GRUB_PC_PARTITION_BSD_LABEL_SECTOR, 0, + return iterate_real (disk, GRUB_PC_PARTITION_BSD_LABEL_SECTOR, 0, &grub_bsdlabel_partition_map, hook, hook_data); } diff --git a/grub-core/partmap/dvh.c b/grub-core/partmap/dvh.c index 95c96186c..b25ae0d3b 100644 --- a/grub-core/partmap/dvh.c +++ b/grub-core/partmap/dvh.c @@ -33,7 +33,7 @@ struct grub_dvh_partition_descriptor { grub_uint32_t length; grub_uint32_t start; - grub_uint32_t type; + grub_uint32_t type; } GRUB_PACKED; struct grub_dvh_block @@ -86,7 +86,7 @@ dvh_partition_map_iterate (grub_disk_t disk, if (! grub_dvh_is_valid (block.raw)) return grub_error (GRUB_ERR_BAD_PART_TABLE, "invalid checksum"); - + /* Maybe another error value would be better, because partition table _is_ recognized but invalid. */ for (partnum = 0; partnum < ARRAY_SIZE (block.dvh.parts); partnum++) diff --git a/grub-core/partmap/msdos.c b/grub-core/partmap/msdos.c index 58c3626c6..c85bb74be 100644 --- a/grub-core/partmap/msdos.c +++ b/grub-core/partmap/msdos.c @@ -55,7 +55,7 @@ const char message_warn[][200] = { " avoiding it. " "This software may cause boot or other problems in " "future. Please ask its authors not to store data " - "in the boot track") + "in the boot track") }; @@ -312,7 +312,7 @@ pc_partition_map_embed (struct grub_disk *disk, unsigned int *nsectors, if (grub_msdos_partition_is_extended (e->type)) { - offset = ext_offset + offset = ext_offset + ((grub_disk_addr_t)grub_le_to_cpu32 (e->start) << (disk->log_sector_size - GRUB_DISK_SECTOR_BITS)); if (! ext_offset) diff --git a/grub-core/partmap/sun.c b/grub-core/partmap/sun.c index aac30a320..12bf5ba29 100644 --- a/grub-core/partmap/sun.c +++ b/grub-core/partmap/sun.c @@ -108,7 +108,7 @@ sun_partition_map_iterate (grub_disk_t disk, if (! grub_sun_is_valid (block.raw)) return grub_error (GRUB_ERR_BAD_PART_TABLE, "invalid checksum"); - + /* Maybe another error value would be better, because partition table _is_ recognized but invalid. */ for (partnum = 0; partnum < GRUB_PARTMAP_SUN_MAX_PARTS; partnum++) diff --git a/grub-core/partmap/sunpc.c b/grub-core/partmap/sunpc.c index 73a430c14..fe9552e21 100644 --- a/grub-core/partmap/sunpc.c +++ b/grub-core/partmap/sunpc.c @@ -91,11 +91,11 @@ sun_pc_partition_map_iterate (grub_disk_t disk, grub_free (p); return err; } - + if (GRUB_PARTMAP_SUN_PC_MAGIC != grub_le_to_cpu16 (block.sun_block.magic)) { grub_free (p); - return grub_error (GRUB_ERR_BAD_PART_TABLE, + return grub_error (GRUB_ERR_BAD_PART_TABLE, "not a sun_pc partition table"); } -- 2.35.1