Edward O'Callaghan submitted this change.

View Change



1 is the latest approved patch-set.
No files were changed between the latest approved patch-set and the submitted one.

Approvals: build bot (Jenkins): Verified Felix Singer: Looks good to me, approved
layout: Rename find_romentry() -> romentry_exists()

The functions purpose is to test for existence not to
actually return the entry, therefore rename accordingly.

Change-Id: Ibf14357c00717d1a7b6bc9c83e797fac125559c4
Signed-off-by: Edward O'Callaghan <quasisec@google.com>
Reviewed-on: https://review.coreboot.org/c/flashrom/+/70893
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Felix Singer <felixsinger@posteo.net>
---
M layout.c
1 file changed, 18 insertions(+), 2 deletions(-)

diff --git a/layout.c b/layout.c
index 6af0e41..4f02be6 100644
--- a/layout.c
+++ b/layout.c
@@ -209,7 +209,7 @@
}

/* returns -1 if an entry is not found, 0 if found. */
-static int find_romentry(struct flashrom_layout *const l, char *name, char *file)
+static int romentry_exists(struct flashrom_layout *const l, char *name, char *file)
{
if (!l->head)
return -1;
@@ -244,7 +244,7 @@

tmp = args;
while (tmp) {
- if (find_romentry(l, tmp->name, tmp->file) < 0) {
+ if (romentry_exists(l, tmp->name, tmp->file) < 0) {
msg_gerr("Invalid region specified: \"%s\".\n",
tmp->name);
return 1;

To view, visit change 70893. To unsubscribe, or for help writing mail filters, visit settings.

Gerrit-Project: flashrom
Gerrit-Branch: master
Gerrit-Change-Id: Ibf14357c00717d1a7b6bc9c83e797fac125559c4
Gerrit-Change-Number: 70893
Gerrit-PatchSet: 3
Gerrit-Owner: Edward O'Callaghan <quasisec@chromium.org>
Gerrit-Reviewer: Edward O'Callaghan <quasisec@chromium.org>
Gerrit-Reviewer: Felix Singer <felixsinger@posteo.net>
Gerrit-Reviewer: build bot (Jenkins) <no-reply@coreboot.org>
Gerrit-MessageType: merged