Date: Thu, 19 Oct 2017 08:15:41 +0000 (UTC) From: Andriy Gapon <avg@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r324750 - stable/11/usr.sbin/i2c Message-ID: <201710190815.v9J8FfpW026595@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: avg Date: Thu Oct 19 08:15:41 2017 New Revision: 324750 URL: https://svnweb.freebsd.org/changeset/base/324750 Log: Really MFC r309357,r309409: Speling fixes and fix line endings for err_msg output Note: somehow these revisions were in mergeinfo but the actual changes were not merged. Modified: stable/11/usr.sbin/i2c/i2c.c Modified: stable/11/usr.sbin/i2c/i2c.c ============================================================================== --- stable/11/usr.sbin/i2c/i2c.c Thu Oct 19 08:00:34 2017 (r324749) +++ stable/11/usr.sbin/i2c/i2c.c Thu Oct 19 08:15:41 2017 (r324750) @@ -350,7 +350,7 @@ i2c_write(char *dev, struct options i2c_opt, char *i2c error = ioctl(fd, I2CWRITE, &cmd); free(buf); if (error == -1) { - err_msg = "ioctl: error when write offset"; + err_msg = "ioctl: error writing offset"; goto err1; } } @@ -375,7 +375,7 @@ i2c_write(char *dev, struct options i2c_opt, char *i2c cmd.last = 0; error = ioctl(fd, I2CWRITE, &cmd); if (error == -1) { - err_msg = "ioctl: error when write"; + err_msg = "ioctl: error writing"; goto err1; } break; @@ -390,7 +390,7 @@ i2c_write(char *dev, struct options i2c_opt, char *i2c error = ioctl(fd, I2CWRITE, &cmd); free(buf); if (error == -1) { - err_msg = "ioctl: error when write offset"; + err_msg = "ioctl: error writing offset"; goto err1; } } @@ -411,7 +411,7 @@ i2c_write(char *dev, struct options i2c_opt, char *i2c cmd.last = 0; error = ioctl(fd, I2CWRITE, &cmd); if (error == -1) { - err_msg = "ioctl: error when write"; + err_msg = "ioctl: error writing"; goto err1; } break; @@ -434,7 +434,7 @@ i2c_write(char *dev, struct options i2c_opt, char *i2c error = ioctl(fd, I2CWRITE, &cmd); free(buf); if (error == -1) { - err_msg = "ioctl: error when write"; + err_msg = "ioctl: error writing"; goto err1; } break; @@ -453,10 +453,10 @@ err1: cmd.slave = i2c_opt.addr; error = ioctl(fd, I2CSTOP, &cmd); if (error == -1) - fprintf(stderr, "error sending stop condtion\n"); + fprintf(stderr, "error sending stop condition\n"); err2: if (err_msg) - fprintf(stderr, "%s", err_msg); + fprintf(stderr, "%s\n", err_msg); close(fd); return (1); @@ -498,7 +498,7 @@ i2c_read(char *dev, struct options i2c_opt, char *i2c_ error = ioctl(fd, I2CWRITE, &cmd); free(buf); if (error == -1) { - err_msg = "ioctl: error when write offset"; + err_msg = "ioctl: error writing offset"; goto err1; } @@ -506,7 +506,7 @@ i2c_read(char *dev, struct options i2c_opt, char *i2c_ cmd.slave = i2c_opt.addr; error = ioctl(fd, I2CSTOP, &cmd); if (error == -1) { - err_msg = "error sending stop condtion\n"; + err_msg = "error sending stop condition"; goto err2; } } @@ -531,7 +531,7 @@ i2c_read(char *dev, struct options i2c_opt, char *i2c_ } error = ioctl(fd, I2CSTOP, &cmd); if (error == -1) { - err_msg = "error sending stop condtion\n"; + err_msg = "error sending stop condition"; goto err2; } @@ -550,10 +550,10 @@ err1: cmd.slave = i2c_opt.addr; error = ioctl(fd, I2CSTOP, &cmd); if (error == -1) - fprintf(stderr, "error sending stop condtion\n"); + fprintf(stderr, "error sending stop condition\n"); err2: if (err_msg) - fprintf(stderr, "%s", err_msg); + fprintf(stderr, "%s\n", err_msg); close(fd); return (1);
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201710190815.v9J8FfpW026595>