Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 18 Feb 2022 01:50:59 GMT
From:      Ed Maste <emaste@FreeBSD.org>
To:        src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org
Subject:   git: 85d997620ea1 - stable/13 - elfctl: error if -e is specified multiple times
Message-ID:  <202202180150.21I1oxhj025977@gitrepo.freebsd.org>

next in thread | raw e-mail | index | archive | help
The branch stable/13 has been updated by emaste:

URL: https://cgit.FreeBSD.org/src/commit/?id=85d997620ea1bfb5d7ac186d3b54107f2b4c16ff

commit 85d997620ea1bfb5d7ac186d3b54107f2b4c16ff
Author:     Ed Maste <emaste@FreeBSD.org>
AuthorDate: 2022-02-15 03:04:29 +0000
Commit:     Ed Maste <emaste@FreeBSD.org>
CommitDate: 2022-02-18 00:31:46 +0000

    elfctl: error if -e is specified multiple times
    
    Reported by:    jrm
    MFC after:      3 days
    Sponsored by:   The FreeBSD Foundation
    
    (cherry picked from commit f0cf9b602dc0375dfc279500e0314b7c55273bf0)
---
 usr.bin/elfctl/elfctl.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/usr.bin/elfctl/elfctl.c b/usr.bin/elfctl/elfctl.c
index 9463372f6740..993349d4ec4c 100644
--- a/usr.bin/elfctl/elfctl.c
+++ b/usr.bin/elfctl/elfctl.c
@@ -116,6 +116,8 @@ main(int argc, char **argv)
 			lflag = true;
 			break;
 		case 'e':
+			if (features != NULL)
+				errx(1, "-e may be specified only once");
 			features = optarg;
 			editfeatures = true;
 			break;



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202202180150.21I1oxhj025977>