The branch main has been updated by rew:

URL: 
https://cgit.FreeBSD.org/src/commit/?id=67bceb38f463d8a929c55efdcfcfefc9aedfeff6

commit 67bceb38f463d8a929c55efdcfcfefc9aedfeff6
Author:     Martin Birgmeier <[email protected]>
AuthorDate: 2021-10-07 05:20:56 +0000
Commit:     Robert Wing <[email protected]>
CommitDate: 2021-10-07 05:56:20 +0000

    i2c(8): fix option handling
    
    Recognize the '-o' option when processing command line arguments.
    
    Fixes:  9c10d00bf8cd ("i2c(8): Add interpreted mode for batch/scripted...")
    PR:     258572
---
 usr.sbin/i2c/i2c.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/usr.sbin/i2c/i2c.c b/usr.sbin/i2c/i2c.c
index 87bb1f0fe983..2ab7c55772de 100644
--- a/usr.sbin/i2c/i2c.c
+++ b/usr.sbin/i2c/i2c.c
@@ -744,7 +744,7 @@ main(int argc, char** argv)
        struct options i2c_opt;
        const char *dev, *err_msg;
        int fd, error = 0, ch;
-       const char *optflags = "a:f:d:o:w:c:m:n:sbvrh";
+       const char *optflags = "a:f:d:o:iw:c:m:n:sbvrh";
        char do_what = 0;
 
        dev = I2C_DEV;
@@ -763,7 +763,7 @@ main(int argc, char** argv)
 
        /* Find out what we are going to do */
 
-       while ((ch = getopt(argc, argv, "a:f:d:iw:c:m:n:sbvrh")) != -1) {
+       while ((ch = getopt(argc, argv, optflags)) != -1) {
                switch(ch) {
                case 'a':
                case 'i':

Reply via email to