public inbox for lvm2-cvs@sourceware.org
help / color / mirror / Atom feed
* LVM2 lib/config/defaults.h lib/report/report.c ...
@ 2008-06-24 21:21 agk
0 siblings, 0 replies; 2+ messages in thread
From: agk @ 2008-06-24 21:21 UTC (permalink / raw)
To: lvm-devel, lvm2-cvs
CVSROOT: /cvs/lvm2
Module name: LVM2
Changes by: agk@sourceware.org 2008-06-24 21:21:04
Modified files:
lib/config : defaults.h
lib/report : report.c report.h
tools : args.h commands.h reporter.c
. : WHATS_NEW
Log message:
Add --unquoted to reporting tools.
Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/lib/config/defaults.h.diff?cvsroot=lvm2&r1=1.40&r2=1.41
http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/lib/report/report.c.diff?cvsroot=lvm2&r1=1.84&r2=1.85
http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/lib/report/report.h.diff?cvsroot=lvm2&r1=1.6&r2=1.7
http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/tools/args.h.diff?cvsroot=lvm2&r1=1.58&r2=1.59
http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/tools/commands.h.diff?cvsroot=lvm2&r1=1.116&r2=1.117
http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/tools/reporter.c.diff?cvsroot=lvm2&r1=1.37&r2=1.38
http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/WHATS_NEW.diff?cvsroot=lvm2&r1=1.914&r2=1.915
--- LVM2/lib/config/defaults.h 2008/04/20 00:15:08 1.40
+++ LVM2/lib/config/defaults.h 2008/06/24 21:21:03 1.41
@@ -103,6 +103,7 @@
#define DEFAULT_REP_BUFFERED 1
#define DEFAULT_REP_HEADINGS 1
#define DEFAULT_REP_PREFIXES 0
+#define DEFAULT_REP_QUOTED 1
#define DEFAULT_REP_SEPARATOR " "
#define DEFAULT_LVS_COLS "lv_name,vg_name,lv_attr,lv_size,origin,snap_percent,move_pv,mirror_log,copy_percent,convert_lv"
--- LVM2/lib/report/report.c 2008/06/06 19:28:34 1.84
+++ LVM2/lib/report/report.c 2008/06/24 21:21:04 1.85
@@ -1077,7 +1077,8 @@
void *report_init(struct cmd_context *cmd, const char *format, const char *keys,
report_type_t *report_type, const char *separator,
- int aligned, int buffered, int headings, int field_prefixes)
+ int aligned, int buffered, int headings, int field_prefixes,
+ int quoted)
{
uint32_t report_flags = 0;
void *rh;
@@ -1094,6 +1095,9 @@
if (field_prefixes)
report_flags |= DM_REPORT_OUTPUT_FIELD_NAME_PREFIX;
+ if (!quoted)
+ report_flags |= DM_REPORT_OUTPUT_FIELD_UNQUOTED;
+
rh = dm_report_init(report_type, _report_types, _fields, format,
separator, report_flags, keys, cmd);
--- LVM2/lib/report/report.h 2008/04/20 00:15:08 1.6
+++ LVM2/lib/report/report.h 2008/06/24 21:21:04 1.7
@@ -28,7 +28,8 @@
void *report_init(struct cmd_context *cmd, const char *format, const char *keys,
report_type_t *report_type, const char *separator,
- int aligned, int buffered, int headings, int field_prefixes);
+ int aligned, int buffered, int headings, int field_prefixes,
+ int quoted);
void report_free(void *handle);
int report_object(void *handle, struct volume_group *vg,
struct logical_volume *lv, struct physical_volume *pv,
--- LVM2/tools/args.h 2008/06/06 19:28:35 1.58
+++ LVM2/tools/args.h 2008/06/24 21:21:04 1.59
@@ -54,6 +54,7 @@
arg(trustcache_ARG, '\0', "trustcache", NULL, 0)
arg(ignoremonitoring_ARG, '\0', "ignoremonitoring", NULL, 0)
arg(nameprefixes_ARG, '\0', "nameprefixes", NULL, 0)
+arg(unquoted_ARG, '\0', "unquoted", NULL, 0)
/* Allow some variations */
arg(resizable_ARG, '\0', "resizable", yes_no_arg, 0)
--- LVM2/tools/commands.h 2008/06/12 13:24:02 1.116
+++ LVM2/tools/commands.h 2008/06/24 21:21:04 1.117
@@ -377,6 +377,7 @@
"\t[--trustcache]\n"
"\t[--unbuffered]\n"
"\t[--units hsbkmgtHKMGT]\n"
+ "\t[--unquoted]\n"
"\t[-v|--verbose]\n"
"\t[--version]" "\n"
"\t[LogicalVolume[Path] [LogicalVolume[Path]...]]\n",
@@ -384,7 +385,7 @@
aligned_ARG, all_ARG, ignorelockingfailure_ARG, nameprefixes_ARG,
noheadings_ARG, nolocking_ARG, nosuffix_ARG, options_ARG, partial_ARG,
segments_ARG, separator_ARG, sort_ARG, trustcache_ARG, unbuffered_ARG,
- units_ARG)
+ units_ARG, unquoted_ARG)
xx(lvscan,
"List all logical volumes in all volume groups",
@@ -586,6 +587,7 @@
"\t[--trustcache]\n"
"\t[--unbuffered]\n"
"\t[--units hsbkmgtHKMGT]\n"
+ "\t[--unquoted]\n"
"\t[-v|--verbose]\n"
"\t[--version]\n"
"\t[PhysicalVolume [PhysicalVolume...]]\n",
@@ -593,7 +595,7 @@
aligned_ARG, all_ARG, ignorelockingfailure_ARG, nameprefixes_ARG,
noheadings_ARG, nolocking_ARG, nosuffix_ARG, options_ARG, partial_ARG,
segments_ARG, separator_ARG, sort_ARG, trustcache_ARG, unbuffered_ARG,
- units_ARG)
+ units_ARG, unquoted_ARG)
xx(pvscan,
"List all physical volumes",
@@ -902,13 +904,15 @@
"\t[--trustcache]\n"
"\t[--unbuffered]\n"
"\t[--units hsbkmgtHKMGT]\n"
+ "\t[--unquoted]\n"
"\t[-v|--verbose]\n"
"\t[--version]\n"
"\t[VolumeGroupName [VolumeGroupName...]]\n",
aligned_ARG, all_ARG, ignorelockingfailure_ARG, nameprefixes_ARG,
noheadings_ARG, nolocking_ARG, nosuffix_ARG, options_ARG, partial_ARG,
- separator_ARG, sort_ARG, trustcache_ARG, unbuffered_ARG, units_ARG)
+ separator_ARG, sort_ARG, trustcache_ARG, unbuffered_ARG, units_ARG,
+ unquoted_ARG)
xx(vgscan,
"Search for all volume groups",
--- LVM2/tools/reporter.c 2008/06/06 19:28:35 1.37
+++ LVM2/tools/reporter.c 2008/06/24 21:21:04 1.38
@@ -158,7 +158,7 @@
char *str;
const char *keys = NULL, *options = NULL, *separator;
int r = ECMD_PROCESSED;
- int aligned, buffered, headings, field_prefixes;
+ int aligned, buffered, headings, field_prefixes, quoted;
unsigned args_are_pvs;
aligned = find_config_tree_int(cmd, "report/aligned",
@@ -171,6 +171,8 @@
DEFAULT_REP_SEPARATOR);
field_prefixes = find_config_tree_int(cmd, "report/prefixes",
DEFAULT_REP_PREFIXES);
+ quoted = find_config_tree_int(cmd, "report/quoted",
+ DEFAULT_REP_QUOTED);
args_are_pvs = (report_type == PVS || report_type == PVSEGS) ? 1 : 0;
@@ -276,10 +278,12 @@
aligned = 0;
field_prefixes = 1;
}
+ if (arg_count(cmd, unquoted_ARG))
+ quoted = 0;
if (!(report_handle = report_init(cmd, options, keys, &report_type,
separator, aligned, buffered,
- headings, field_prefixes))) {
+ headings, field_prefixes, quoted))) {
stack;
return ECMD_FAILED;
}
--- LVM2/WHATS_NEW 2008/06/23 19:26:20 1.914
+++ LVM2/WHATS_NEW 2008/06/24 21:21:04 1.915
@@ -1,17 +1,15 @@
Version 2.02.39 -
================================
- Suppress invalid 'sb_offset' compiler warning with uninitialzed_var().
- Add uninitialzed_var() macro to suppress invalid compiler warnings.
- Suppress 'sb_offset' compiler warning by using enum for md minor sb version.
- lvm2_run: Don't return uninitialized "ret" for _memlock_inc or _memlock_dec.
- Avoid link failure when configuring without --enable-cmdlib.
- Avoid link failure when configuring without --enable-readline.
- Make clvmd return immediately if other nodes are down in an openais cluster.
- Make clvmd return immediately if other nodes are down in a gulm cluster.
- Improve/Fix read ahead 'auto' calculation for stripe_size
- Fix lvchange output for -r auto setting if auto is already set
- Add testcase for read ahead
- Fix ambiguous use of identifier 'error_message_produced'.
+ Add --unquoted to reporting tools.
+ Add and use uninitialized_var() macro to suppress invalid compiler warnings.
+ Introduce enum for md minor sb version to suppress compiler warning.
+ Avoid undefined return value after _memlock manipulation in lvm2_run.
+ Avoid link failure if configured without --enable-cmdlib or --enable-readline.
+ Make clvmd return at once if other nodes down in a gulm or openais cluster.
+ Fix and improve readahead 'auto' calculation for stripe_size.
+ Fix lvchange output for -r auto setting if auto is already set.
+ Add test case for readahead.
+ Fix ambiguous use of identifier error_message_produced.
Begin syncing configure.in for merge/unification with device-mapper.
Fix add_mirror_images not to dereference uninitialized log_lv upon failure.
Don't call openlog for every debug line output by clvmd.
^ permalink raw reply [flat|nested] 2+ messages in thread
* LVM2 lib/config/defaults.h lib/report/report.c ...
@ 2008-06-24 22:48 agk
0 siblings, 0 replies; 2+ messages in thread
From: agk @ 2008-06-24 22:48 UTC (permalink / raw)
To: lvm-devel, lvm2-cvs
CVSROOT: /cvs/lvm2
Module name: LVM2
Changes by: agk@sourceware.org 2008-06-24 22:48:53
Modified files:
lib/config : defaults.h
lib/report : report.c report.h
tools : args.h commands.h reporter.c
. : WHATS_NEW
Log message:
Add --rows to reports.
Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/lib/config/defaults.h.diff?cvsroot=lvm2&r1=1.41&r2=1.42
http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/lib/report/report.c.diff?cvsroot=lvm2&r1=1.85&r2=1.86
http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/lib/report/report.h.diff?cvsroot=lvm2&r1=1.7&r2=1.8
http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/tools/args.h.diff?cvsroot=lvm2&r1=1.59&r2=1.60
http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/tools/commands.h.diff?cvsroot=lvm2&r1=1.117&r2=1.118
http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/tools/reporter.c.diff?cvsroot=lvm2&r1=1.38&r2=1.39
http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/WHATS_NEW.diff?cvsroot=lvm2&r1=1.915&r2=1.916
--- LVM2/lib/config/defaults.h 2008/06/24 21:21:03 1.41
+++ LVM2/lib/config/defaults.h 2008/06/24 22:48:53 1.42
@@ -101,6 +101,7 @@
#define DEFAULT_REP_ALIGNED 1
#define DEFAULT_REP_BUFFERED 1
+#define DEFAULT_REP_COLUMNS_AS_ROWS 0
#define DEFAULT_REP_HEADINGS 1
#define DEFAULT_REP_PREFIXES 0
#define DEFAULT_REP_QUOTED 1
--- LVM2/lib/report/report.c 2008/06/24 21:21:04 1.85
+++ LVM2/lib/report/report.c 2008/06/24 22:48:53 1.86
@@ -1078,7 +1078,7 @@
void *report_init(struct cmd_context *cmd, const char *format, const char *keys,
report_type_t *report_type, const char *separator,
int aligned, int buffered, int headings, int field_prefixes,
- int quoted)
+ int quoted, int columns_as_rows)
{
uint32_t report_flags = 0;
void *rh;
@@ -1098,6 +1098,9 @@
if (!quoted)
report_flags |= DM_REPORT_OUTPUT_FIELD_UNQUOTED;
+ if (columns_as_rows)
+ report_flags |= DM_REPORT_OUTPUT_COLUMNS_AS_ROWS;
+
rh = dm_report_init(report_type, _report_types, _fields, format,
separator, report_flags, keys, cmd);
--- LVM2/lib/report/report.h 2008/06/24 21:21:04 1.7
+++ LVM2/lib/report/report.h 2008/06/24 22:48:53 1.8
@@ -29,7 +29,7 @@
void *report_init(struct cmd_context *cmd, const char *format, const char *keys,
report_type_t *report_type, const char *separator,
int aligned, int buffered, int headings, int field_prefixes,
- int quoted);
+ int quoted, int columns_as_rows);
void report_free(void *handle);
int report_object(void *handle, struct volume_group *vg,
struct logical_volume *lv, struct physical_volume *pv,
--- LVM2/tools/args.h 2008/06/24 21:21:04 1.59
+++ LVM2/tools/args.h 2008/06/24 22:48:53 1.60
@@ -55,6 +55,7 @@
arg(ignoremonitoring_ARG, '\0', "ignoremonitoring", NULL, 0)
arg(nameprefixes_ARG, '\0', "nameprefixes", NULL, 0)
arg(unquoted_ARG, '\0', "unquoted", NULL, 0)
+arg(rows_ARG, '\0', "rows", NULL, 0)
/* Allow some variations */
arg(resizable_ARG, '\0', "resizable", yes_no_arg, 0)
--- LVM2/tools/commands.h 2008/06/24 21:21:04 1.117
+++ LVM2/tools/commands.h 2008/06/24 22:48:53 1.118
@@ -372,6 +372,7 @@
"\t[-o|--options [+]Field[,Field]]\n"
"\t[-O|--sort [+|-]key1[,[+|-]key2[,...]]]\n"
"\t[-P|--partial] " "\n"
+ "\t[--rows]\n"
"\t[--segments]\n"
"\t[--separator Separator]\n"
"\t[--trustcache]\n"
@@ -384,8 +385,8 @@
aligned_ARG, all_ARG, ignorelockingfailure_ARG, nameprefixes_ARG,
noheadings_ARG, nolocking_ARG, nosuffix_ARG, options_ARG, partial_ARG,
- segments_ARG, separator_ARG, sort_ARG, trustcache_ARG, unbuffered_ARG,
- units_ARG, unquoted_ARG)
+ rows_ARG, segments_ARG, separator_ARG, sort_ARG, trustcache_ARG,
+ unbuffered_ARG, units_ARG, unquoted_ARG)
xx(lvscan,
"List all logical volumes in all volume groups",
@@ -582,6 +583,7 @@
"\t[-o|--options [+]Field[,Field]]\n"
"\t[-O|--sort [+|-]key1[,[+|-]key2[,...]]]\n"
"\t[-P|--partial] " "\n"
+ "\t[--rows]\n"
"\t[--segments]\n"
"\t[--separator Separator]\n"
"\t[--trustcache]\n"
@@ -594,8 +596,8 @@
aligned_ARG, all_ARG, ignorelockingfailure_ARG, nameprefixes_ARG,
noheadings_ARG, nolocking_ARG, nosuffix_ARG, options_ARG, partial_ARG,
- segments_ARG, separator_ARG, sort_ARG, trustcache_ARG, unbuffered_ARG,
- units_ARG, unquoted_ARG)
+ rows_ARG, segments_ARG, separator_ARG, sort_ARG, trustcache_ARG,
+ unbuffered_ARG, units_ARG, unquoted_ARG)
xx(pvscan,
"List all physical volumes",
@@ -900,6 +902,7 @@
"\t[-o|--options [+]Field[,Field]]\n"
"\t[-O|--sort [+|-]key1[,[+|-]key2[,...]]]\n"
"\t[-P|--partial] " "\n"
+ "\t[--rows]\n"
"\t[--separator Separator]\n"
"\t[--trustcache]\n"
"\t[--unbuffered]\n"
@@ -911,7 +914,7 @@
aligned_ARG, all_ARG, ignorelockingfailure_ARG, nameprefixes_ARG,
noheadings_ARG, nolocking_ARG, nosuffix_ARG, options_ARG, partial_ARG,
- separator_ARG, sort_ARG, trustcache_ARG, unbuffered_ARG, units_ARG,
+ rows_ARG, separator_ARG, sort_ARG, trustcache_ARG, unbuffered_ARG, units_ARG,
unquoted_ARG)
xx(vgscan,
--- LVM2/tools/reporter.c 2008/06/24 21:21:04 1.38
+++ LVM2/tools/reporter.c 2008/06/24 22:48:53 1.39
@@ -159,6 +159,7 @@
const char *keys = NULL, *options = NULL, *separator;
int r = ECMD_PROCESSED;
int aligned, buffered, headings, field_prefixes, quoted;
+ int columns_as_rows;
unsigned args_are_pvs;
aligned = find_config_tree_int(cmd, "report/aligned",
@@ -173,6 +174,8 @@
DEFAULT_REP_PREFIXES);
quoted = find_config_tree_int(cmd, "report/quoted",
DEFAULT_REP_QUOTED);
+ columns_as_rows = find_config_tree_int(cmd, "report/columns_as_rows",
+ DEFAULT_REP_COLUMNS_AS_ROWS);
args_are_pvs = (report_type == PVS || report_type == PVSEGS) ? 1 : 0;
@@ -280,10 +283,13 @@
}
if (arg_count(cmd, unquoted_ARG))
quoted = 0;
+ if (arg_count(cmd, rows_ARG))
+ columns_as_rows = 1;
if (!(report_handle = report_init(cmd, options, keys, &report_type,
separator, aligned, buffered,
- headings, field_prefixes, quoted))) {
+ headings, field_prefixes, quoted,
+ columns_as_rows))) {
stack;
return ECMD_FAILED;
}
--- LVM2/WHATS_NEW 2008/06/24 21:21:04 1.915
+++ LVM2/WHATS_NEW 2008/06/24 22:48:53 1.916
@@ -1,6 +1,6 @@
Version 2.02.39 -
================================
- Add --unquoted to reporting tools.
+ Add --unquoted and --rows to reporting tools.
Add and use uninitialized_var() macro to suppress invalid compiler warnings.
Introduce enum for md minor sb version to suppress compiler warning.
Avoid undefined return value after _memlock manipulation in lvm2_run.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2008-06-24 22:48 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-06-24 21:21 LVM2 lib/config/defaults.h lib/report/report.c agk
2008-06-24 22:48 agk
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).