svn commit: r327526 - in head/sys: dev/ath tools
Ed Maste
emaste at FreeBSD.org
Wed Jan 3 19:22:12 UTC 2018
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.
More information about the svn-src-all
mailing list