diff options
author | Alasdair Kergon <agk@redhat.com> | 2008-06-24 20:16:47 +0000 |
---|---|---|
committer | Alasdair Kergon <agk@redhat.com> | 2008-06-24 20:16:47 +0000 |
commit | f1839ac87c92a0d87141e3c7474d7c60930dc300 (patch) | |
tree | 20bdd6ce61faac0115527367a9dcbde34149ed9d /libdm/libdm-report.c | |
parent | 15db00b53e8f2e136d3f3c0c7fc68fcc48ba0b06 (diff) | |
download | lvm2-f1839ac87c92a0d87141e3c7474d7c60930dc300.tar.gz lvm2-f1839ac87c92a0d87141e3c7474d7c60930dc300.tar.xz lvm2-f1839ac87c92a0d87141e3c7474d7c60930dc300.zip |
dmsetup --unquoted
Diffstat (limited to 'libdm/libdm-report.c')
-rw-r--r-- | libdm/libdm-report.c | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/libdm/libdm-report.c b/libdm/libdm-report.c index d6ae27db..8f8bc1f6 100644 --- a/libdm/libdm-report.c +++ b/libdm/libdm-report.c @@ -845,7 +845,13 @@ int dm_report_output(struct dm_report *rh) free(field_id); - if (!dm_pool_grow_object(rh->mem, "=\'", 2)) { + if (!dm_pool_grow_object(rh->mem, "=", 1)) { + log_error("dm_report: Unable to extend output line"); + goto bad; + } + + if (!(rh->flags & DM_REPORT_OUTPUT_FIELD_UNQUOTED) && + !dm_pool_grow_object(rh->mem, "\'", 1)) { log_error("dm_report: Unable to extend output line"); goto bad; } @@ -885,7 +891,8 @@ int dm_report_output(struct dm_report *rh) } } - if (rh->flags & DM_REPORT_OUTPUT_FIELD_NAME_PREFIX) + if ((rh->flags & DM_REPORT_OUTPUT_FIELD_NAME_PREFIX) && + !(rh->flags & DM_REPORT_OUTPUT_FIELD_UNQUOTED)) if (!dm_pool_grow_object(rh->mem, "\'", 1)) { log_error("dm_report: Unable to extend output line"); goto bad; |