Proposed-by: Karel Zak <kzak@xxxxxxxxxx> References: http://www.spinics.net/lists/util-linux-ng/msg07301.html Signed-off-by: Sami Kerola <kerolasa@xxxxxx> --- sys-utils/swapon.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/sys-utils/swapon.c b/sys-utils/swapon.c index 176be42..7310767 100644 --- a/sys-utils/swapon.c +++ b/sys-utils/swapon.c @@ -786,7 +786,7 @@ int main(int argc, char *argv[]) } argv += optind; - if (show) { + if (show || (!all && !numof_labels() && !numof_uuids() && *argv == NULL)) { if (!ncolumns) { /* default columns */ columns[ncolumns++] = COL_PATH; @@ -799,9 +799,6 @@ int main(int argc, char *argv[]) return status; } - if (!all && !numof_labels() && !numof_uuids() && *argv == NULL) - usage(stderr); - if (ifexists && !all) usage(stderr); -- 1.8.0.3 -- 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