From owner-svn-src-stable@freebsd.org Thu Oct 19 08:15:42 2017 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 992F6E32D5C; Thu, 19 Oct 2017 08:15:42 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 6C64920F; Thu, 19 Oct 2017 08:15:42 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v9J8FffR026596; Thu, 19 Oct 2017 08:15:41 GMT (envelope-from avg@FreeBSD.org) Received: (from avg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v9J8FfpW026595; Thu, 19 Oct 2017 08:15:41 GMT (envelope-from avg@FreeBSD.org) Message-Id: <201710190815.v9J8FfpW026595@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: avg set sender to avg@FreeBSD.org using -f From: Andriy Gapon Date: Thu, 19 Oct 2017 08:15:41 +0000 (UTC) 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 X-SVN-Group: stable-11 X-SVN-Commit-Author: avg X-SVN-Commit-Paths: stable/11/usr.sbin/i2c X-SVN-Commit-Revision: 324750 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 19 Oct 2017 08:15:42 -0000 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);