embed_mfs: correctly test grep return value
Reported by: br MFC with: r326992 Sponsored by: The FreeBSD Foundation
This commit is contained in:
parent
8a7a42bb17
commit
47b5c71929
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=327526
@ -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;
|
||||
|
@ -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.
|
||||
|
Loading…
Reference in New Issue
Block a user