Bug 256390 - [PATCH] boot loader: Fix __elfN(loadimage) return value
Summary: [PATCH] boot loader: Fix __elfN(loadimage) return value
Status: Closed FIXED
Alias: None
Product: Base System
Classification: Unclassified
Component: misc (show other bugs)
Version: CURRENT
Hardware: Any Any
: --- Affects Some People
Assignee: Mark Johnston
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2021-06-02 20:00 UTC by David Sebek
Modified: 2021-06-20 19:05 UTC (History)
1 user (show)

See Also:


Attachments
[PATCH] boot loader: Fix __elfN(loadimage) return value (1.01 KB, patch)
2021-06-02 20:00 UTC, David Sebek
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description David Sebek 2021-06-02 20:00:47 UTC
Created attachment 225510 [details]
[PATCH] boot loader: Fix __elfN(loadimage) return value

Caller functions expect __elfN(loadimage) to return
a value of zero on failure and the file size on success.
Returning ENOENT on failure does not seem correct to me.
Comment 1 Mark Johnston freebsd_committer freebsd_triage 2021-06-04 22:26:13 UTC
Thanks, I'll commit this patch.
Comment 2 commit-hook freebsd_committer freebsd_triage 2021-06-06 20:45:56 UTC
A commit in branch main references this bug:

URL: https://cgit.FreeBSD.org/src/commit/?id=1ea87e2a70c31454a8696ab2979d13d21c5575d2

commit 1ea87e2a70c31454a8696ab2979d13d21c5575d2
Author:     Mark Johnston <markj@FreeBSD.org>
AuthorDate: 2021-06-06 20:40:25 +0000
Commit:     Mark Johnston <markj@FreeBSD.org>
CommitDate: 2021-06-06 20:44:46 +0000

    stand: Fix __elfN(loadimage) return value

    Caller functions expect __elfN(loadimage) to return a value of zero on
    failure and the file size on success.

    PR:             256390
    Reviewed by:    markj
    MFC after:      2 weeks

 stand/common/load_elf.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
Comment 3 commit-hook freebsd_committer freebsd_triage 2021-06-20 19:03:27 UTC
A commit in branch stable/12 references this bug:

URL: https://cgit.FreeBSD.org/src/commit/?id=7242b5c6d2165f7c6141e5edc878f36f3ab43e40

commit 7242b5c6d2165f7c6141e5edc878f36f3ab43e40
Author:     Mark Johnston <markj@FreeBSD.org>
AuthorDate: 2021-06-06 20:40:25 +0000
Commit:     Mark Johnston <markj@FreeBSD.org>
CommitDate: 2021-06-20 19:02:47 +0000

    stand: Fix __elfN(loadimage) return value

    Caller functions expect __elfN(loadimage) to return a value of zero on
    failure and the file size on success.

    PR:             256390
    Reviewed by:    markj

    (cherry picked from commit 1ea87e2a70c31454a8696ab2979d13d21c5575d2)

 stand/common/load_elf.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
Comment 4 commit-hook freebsd_committer freebsd_triage 2021-06-20 19:03:28 UTC
A commit in branch stable/13 references this bug:

URL: https://cgit.FreeBSD.org/src/commit/?id=765c6eb3953c0e9e95543bfb9e7352772ace030c

commit 765c6eb3953c0e9e95543bfb9e7352772ace030c
Author:     Mark Johnston <markj@FreeBSD.org>
AuthorDate: 2021-06-06 20:40:25 +0000
Commit:     Mark Johnston <markj@FreeBSD.org>
CommitDate: 2021-06-20 19:00:54 +0000

    stand: Fix __elfN(loadimage) return value

    Caller functions expect __elfN(loadimage) to return a value of zero on
    failure and the file size on success.

    PR:             256390
    Reviewed by:    markj

    (cherry picked from commit 1ea87e2a70c31454a8696ab2979d13d21c5575d2)

 stand/common/load_elf.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
Comment 5 Mark Johnston freebsd_committer freebsd_triage 2021-06-20 19:05:05 UTC
Thanks for the patch.