From owner-svn-src-head@freebsd.org Wed Jan 3 19:22:12 2018 Return-Path: Delivered-To: svn-src-head@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 47691EAB287; Wed, 3 Jan 2018 19:22:12 +0000 (UTC) (envelope-from emaste@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 039BC2710; Wed, 3 Jan 2018 19:22:11 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w03JMBk0028336; Wed, 3 Jan 2018 19:22:11 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w03JMAtN028334; Wed, 3 Jan 2018 19:22:10 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <201801031922.w03JMAtN028334@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Wed, 3 Jan 2018 19:22:10 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r327526 - in head/sys: dev/ath tools X-SVN-Group: head X-SVN-Commit-Author: emaste X-SVN-Commit-Paths: in head/sys: dev/ath tools X-SVN-Commit-Revision: 327526 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 03 Jan 2018 19:22:12 -0000 Author: emaste Date: Wed Jan 3 19:22:10 2018 New Revision: 327526 URL: https://svnweb.freebsd.org/changeset/base/327526 Log: embed_mfs: correctly test grep return value Reported by: br MFC with: r326992 Sponsored by: The FreeBSD Foundation Modified: head/sys/dev/ath/if_ath_ioctl.c head/sys/tools/embed_mfs.sh Modified: head/sys/dev/ath/if_ath_ioctl.c ============================================================================== --- head/sys/dev/ath/if_ath_ioctl.c Wed Jan 3 18:19:47 2018 (r327525) +++ head/sys/dev/ath/if_ath_ioctl.c Wed Jan 3 19:22:10 2018 (r327526) @@ -197,7 +197,7 @@ ath_ioctl_diag(struct ath_softc *sc, struct ath_diag * * pointer for us to use below in reclaiming the buffer; * may want to be more defensive. */ - outdata = malloc(outsize, M_TEMP, M_NOWAIT); + outdata = malloc(outsize, M_TEMP, M_NOWAIT | M_ZERO); if (outdata == NULL) { error = ENOMEM; goto bad; Modified: head/sys/tools/embed_mfs.sh ============================================================================== --- head/sys/tools/embed_mfs.sh Wed Jan 3 18:19:47 2018 (r327525) +++ head/sys/tools/embed_mfs.sh Wed Jan 3 19:22:10 2018 (r327526) @@ -49,7 +49,7 @@ mfs_size=`stat -f '%z' $2 2> /dev/null` err_no_mfs="Can't locate mfs section within " -if [ `file -b $1 | grep -q '^ELF ..-bit .SB executable'` ]; then +if file -b $1 | grep -q '^ELF ..-bit .SB executable'; then sec_info=`elfdump -c $1 2> /dev/null | grep -A 5 -E "sh_name: oldmfs$"` # If we can't find the mfs section within the given kernel - bail.