Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 3 Jan 2018 19:22:10 +0000 (UTC)
From:      Ed Maste <emaste@FreeBSD.org>
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
Message-ID:  <201801031922.w03JMAtN028334@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
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.



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