hwpoison.sh: add -p option with e2fsck command

When mce-test is used along with ltp, the "pipe" will be used
between them. "fsck" will do nothing under this situation
because it is not an interactive terminal environment.

To make mce-test worked for this situation, add a "-p" option to
fix this issue.

For example:
[root@localhost tmp]# fsck.ext4 /dev/sdb1
e2fsck 1.42.11 (09-Jul-2014)
ALLEN: clean, 11/610800 files, 76472/2441216 blocks
[root@localhost tmp]# fsck.ext4 /dev/sdb1 | tee -a tmp
e2fsck 1.42.11 (09-Jul-2014)
e2fsck: need terminal for interactive repairs
[root@localhost tmp]# fsck.ext4 /dev/sdb1 -p  | tee -a tmp
ALLEN: clean, 11/610800 files, 76472/2441216 blocks
[root@localhost tmp]#

comments massaged by Gong.

Signed-off-by: Yilong Ren <yilongx.ren@intel.com>
Signed-off-by: Chen, Gong <gong.chen@linux.intel.com>
Signed-off-by: Andi Kleen <ak@linux.intel.com>
1 file changed