summaryrefslogtreecommitdiff
path: root/ovsdb
diff options
context:
space:
mode:
authorBen Pfaff <blp@nicira.com>2010-02-10 14:38:05 -0800
committerBen Pfaff <blp@nicira.com>2010-02-15 11:28:39 -0800
commit0c65cde9db1d0586ae9d9c5abec0bef978ff86a5 (patch)
tree24cb505e4170899f5d39fd0705c36ff7ed951c1c /ovsdb
parent88942565730a0f7e9abed2b26c00d1bae1392d7d (diff)
downloadopenvswitch-0c65cde9db1d0586ae9d9c5abec0bef978ff86a5.tar.gz
ovsdb-client: Remove --wide option.
This option just confused people, since no one really expected the output to be truncated at 79 columns by default.
Diffstat (limited to 'ovsdb')
-rw-r--r--ovsdb/ovsdb-client.1.in6
-rw-r--r--ovsdb/ovsdb-client.c19
2 files changed, 4 insertions, 21 deletions
diff --git a/ovsdb/ovsdb-client.1.in b/ovsdb/ovsdb-client.1.in
index 64a08119d..119add3f6 100644
--- a/ovsdb/ovsdb-client.1.in
+++ b/ovsdb/ovsdb-client.1.in
@@ -29,7 +29,6 @@ ovsdb\-client \- command-line interface to \fBovsdb-server\fR(1)
\fBovsdb\-client help\fR
.IP "Output formatting options:"
[\fB--format=\fIformat\fR]
-[\fB--wide\fR]
[\fB--no-heading\fR]
.so lib/daemon-syn.man
.so lib/vlog-syn.man
@@ -112,11 +111,6 @@ HTML tables.
Comma-separated values as defined in RFC 4180.
.RE
.
-.IP "\fB--wide\fR"
-In \fBtable\fR output (the default), when standard output is a
-terminal device, by default lines are truncated at a width of 79
-characters. Specifying this option prevents line truncation.
-.
.IP "\fB--no-heading\fR"
This option suppresses the heading row that otherwise appears in the
first row of table output.
diff --git a/ovsdb/ovsdb-client.c b/ovsdb/ovsdb-client.c
index acc418542..0900a6752 100644
--- a/ovsdb/ovsdb-client.c
+++ b/ovsdb/ovsdb-client.c
@@ -50,9 +50,6 @@ static enum {
FMT_CSV /* Comma-separated lines. */
} output_format;
-/* --wide: For --format=table, the maximum output width. */
-static int output_width;
-
/* --no-headings: Whether table output should include headings. */
static int output_headings = true;
@@ -84,7 +81,6 @@ parse_options(int argc, char *argv[])
OPT_BOOTSTRAP_CA_CERT = UCHAR_MAX + 1
};
static struct option long_options[] = {
- {"wide", no_argument, &output_width, INT_MAX},
{"format", required_argument, 0, 'f'},
{"no-headings", no_argument, &output_headings, 0},
{"pretty", no_argument, &json_flags, JSSF_PRETTY | JSSF_SORT},
@@ -100,7 +96,6 @@ parse_options(int argc, char *argv[])
};
char *short_options = long_options_to_short_options(long_options);
- output_width = isatty(fileno(stdout)) ? 79 : INT_MAX;
for (;;) {
int c;
@@ -122,10 +117,6 @@ parse_options(int argc, char *argv[])
}
break;
- case 'w':
- output_width = INT_MAX;
- break;
-
case 'h':
usage();
@@ -186,7 +177,6 @@ usage(void)
printf("\nOutput formatting options:\n"
" -f, --format=FORMAT set output formatting to FORMAT\n"
" (\"table\", \"html\", or \"csv\"\n"
- " --wide don't limit TTY lines to 79 bytes\n"
" --no-headings omit table heading row\n"
" --pretty pretty-print JSON in output");
daemon_usage();
@@ -404,9 +394,8 @@ table_add_cell(struct table *table, const char *format, ...)
}
static void
-table_print_table_line__(struct ds *line, size_t max_width)
+table_print_table_line__(struct ds *line)
{
- ds_truncate(line, max_width);
puts(ds_cstr(line));
ds_clear(line);
}
@@ -425,7 +414,7 @@ table_print_table__(const struct table *table)
}
ds_put_format(&line, "%-*s", column->width, column->heading);
}
- table_print_table_line__(&line, output_width);
+ table_print_table_line__(&line);
for (x = 0; x < table->n_columns; x++) {
const struct column *column = &table->columns[x];
@@ -438,7 +427,7 @@ table_print_table__(const struct table *table)
ds_put_char(&line, '-');
}
}
- table_print_table_line__(&line, output_width);
+ table_print_table_line__(&line);
}
for (y = 0; y < table->n_rows; y++) {
@@ -449,7 +438,7 @@ table_print_table__(const struct table *table)
}
ds_put_format(&line, "%-*s", table->columns[x].width, cell);
}
- table_print_table_line__(&line, output_width);
+ table_print_table_line__(&line);
}
ds_destroy(&line);