1
0
mirror of git://sourceware.org/git/lvm2.git synced 2024-12-21 13:34:40 +03:00

config: skip close of stdin

If the used stream has been stdout, do not close it.
This commit is contained in:
Zdenek Kabelac 2013-06-14 23:18:29 +02:00
parent 8fb5f63637
commit a040dd8cfb

View File

@ -916,7 +916,7 @@ int config_write(struct dm_config_tree *cft,
argv++;
}
if (baton.fp && dm_fclose(baton.fp)) {
if (baton.fp && baton.fp != stdout && dm_fclose(baton.fp)) {
stack;
r = 0;
}