aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEd Maste <emaste@FreeBSD.org>2018-01-03 19:22:10 +0000
committerEd Maste <emaste@FreeBSD.org>2018-01-03 19:22:10 +0000
commit47b5c719290b17a70f86d4b63fd6730cd6c26220 (patch)
tree2131f70aa482306e1dc606bcabc4b6efe60b0e33
parent8a7a42bb173b7b0ff8be934b1b930fd3f1c56791 (diff)
downloadsrc-47b5c719290b17a70f86d4b63fd6730cd6c26220.tar.gz
src-47b5c719290b17a70f86d4b63fd6730cd6c26220.zip
embed_mfs: correctly test grep return value
Reported by: br MFC with: r326992 Sponsored by: The FreeBSD Foundation
Notes
Notes: svn path=/head/; revision=327526
-rw-r--r--sys/dev/ath/if_ath_ioctl.c2
-rw-r--r--sys/tools/embed_mfs.sh2
2 files changed, 2 insertions, 2 deletions
diff --git a/sys/dev/ath/if_ath_ioctl.c b/sys/dev/ath/if_ath_ioctl.c
index a7ba0e42df3e..37122c16fc0b 100644
--- a/sys/dev/ath/if_ath_ioctl.c
+++ b/sys/dev/ath/if_ath_ioctl.c
@@ -197,7 +197,7 @@ ath_ioctl_diag(struct ath_softc *sc, struct ath_diag *ad)
* 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;
diff --git a/sys/tools/embed_mfs.sh b/sys/tools/embed_mfs.sh
index c4fea153d561..012466230884 100644
--- a/sys/tools/embed_mfs.sh
+++ b/sys/tools/embed_mfs.sh
@@ -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.