]> git.proxmox.com Git - mirror_qemu.git/commit - vl.c
vl: avoid closing stdout with 'writeconfig'
authorChen Gang <gang.chen.5i5j@gmail.com>
Tue, 22 Apr 2014 01:12:34 +0000 (09:12 +0800)
committerMichael Tokarev <mjt@tls.msk.ru>
Mon, 28 Apr 2014 04:55:31 +0000 (08:55 +0400)
commit7fb8b5d9c4ef6a49457155e1b7a002c227cd8bbd
tree71ef421f5dbc691748d259a3cc80d65e2cc48c2f
parent24c12b79235ca8187f6652900c1d25a10cbdac71
vl: avoid closing stdout with 'writeconfig'

'writeconfig' supports output to stdout (with '-'); when that happens,
we must not close stdout, or further command line options that also use
stdout will be impacted. (Although 'writeconfig' was copied from
'readconfig', the latter does not have the problem because it does not
support reading from '-')

Signed-off-by: Chen Gang <gang.chen.5i5j@gmail.com>
Reviewed-by: Eric Blake <eblake@redhat.com>
Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
vl.c