qemu/scripts/coccinelle
Mao Zhongyi e8d81a61e1 qemu-iotests: convert `pwd` and $(pwd) to $PWD
POSIX requires $PWD to be reliable, and we expect all
shells used by qemu scripts to be relatively close to
POSIX.  Thus, it is smarter to avoid forking the pwd
executable for something that is already available in
the environment.

So replace it with the following:

sed -i 's/\(`pwd`\|\$(pwd)\)/$PWD/g' $(git grep -l pwd)

Then delete a pointless line assigning PWD to itself.

Cc: kwolf@redhat.com
Cc: mreitz@redhat.com
Cc: eblake@redhat.com
Suggested-by: Eric Blake <eblake@redhat.com>
Signed-off-by: Mao Zhongyi <maozhongyi@cmss.chinamobile.com>
Message-Id: <20181024094051.4470-2-maozhongyi@cmss.chinamobile.com>
Reviewed-by: Eric Blake <eblake@redhat.com>
[eblake: touch up commit message, reorder series, tweak a couple more files]
Signed-off-by: Eric Blake <eblake@redhat.com>
2018-11-19 10:08:19 -06:00
..
cpu_restore_state.cocci
err-bad-newline.cocci
error_propagate_null.cocci
inplace-byteswaps.cocci
memory-region-init-ram.cocci
overflow_muldiv64.cocci
qobject.cocci
remove_local_err.cocci
remove_muldiv64.cocci
return_directly.cocci
round.cocci
simplify_muldiv64.cocci
swap_muldiv64.cocci
tcg_gen_extract.cocci qemu-iotests: convert `pwd` and $(pwd) to $PWD 2018-11-19 10:08:19 -06:00
typecast.cocci
use-error_fatal.cocci