Signed-off-by: Milan Broz <mbroz@xxxxxxxxxx> --- misc-utils/findmnt.c | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/misc-utils/findmnt.c b/misc-utils/findmnt.c index 6df2f06..482466b 100644 --- a/misc-utils/findmnt.c +++ b/misc-utils/findmnt.c @@ -1041,6 +1041,7 @@ int main(int argc, char *argv[]) int direction = MNT_ITER_FORWARD; int i, c, rc = -1, timeout = -1; int ntabfiles = 0, tabtype = 0; + char *outarg = NULL; enum { EXCL_NONE, @@ -1150,11 +1151,7 @@ int main(int argc, char *argv[]) disable_columns_truncate(); break; case 'o': - ncolumns = string_to_idarray(optarg, - columns, ARRAY_SIZE(columns), - column_name_to_id); - if (ncolumns < 0) - exit(EXIT_FAILURE); + outarg = optarg; break; case 'O': set_match(COL_OPTIONS, optarg); @@ -1260,6 +1257,10 @@ int main(int argc, char *argv[]) columns[ncolumns++] = COL_OPTIONS; } + if (outarg && string_add_to_idarray(outarg, columns, ARRAY_SIZE(columns), + &ncolumns, column_name_to_id) < 0) + return EXIT_FAILURE; + if (!tabtype) tabtype = TABTYPE_KERNEL; -- 1.7.10.4 -- To unsubscribe from this list: send the line "unsubscribe util-linux" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html