Remove the --limit option from adu.ggo.
authorAndre Noll <maan@systemlinux.org>
Fri, 20 Jun 2008 13:37:02 +0000 (15:37 +0200)
committerAndre Noll <maan@systemlinux.org>
Fri, 20 Jun 2008 13:37:02 +0000 (15:37 +0200)
Use --limit from select.ggo instead.

adu.ggo
select.c

diff --git a/adu.ggo b/adu.ggo
index 1d0729d..4be9373 100644 (file)
--- a/adu.ggo
+++ b/adu.ggo
@@ -160,18 +160,6 @@ details="
        Try --select-options \"-h\"
 "
 
-option "limit" L
-#~~~~~~~~~~~~~~~
-"Limit output"
-int typestr="num"
-default="-1"
-optional
-dependon="select"
-details="
-       Only print num lines of output. If negative (the default),
-       print all lines.
-"
-
 option "size-unit" -
 #~~~~~~~~~~~~~~~~~~~
 "select output format for sizes"
index ab95846..ef63cf3 100644 (file)
--- a/select.c
+++ b/select.c
@@ -451,7 +451,7 @@ static int print_user_list(struct user_info *ui, __a_unused void *data)
                || ula == user_list_arg_both);
 
        if (print_size_list) {
-               usi.count = conf.limit_arg;
+               usi.count = select_conf.limit_arg;
                usi.ui = ui;
                usi.flags = USF_PRINT_DIRNAME | USF_PRINT_BYTES | USF_COMPUTE_SUMMARY;
                if (!conf.no_headers_given)
@@ -469,7 +469,7 @@ static int print_user_list(struct user_info *ui, __a_unused void *data)
                        printf("%s (uid %u), by file count%s:\n",
                                ui->pw_name? ui->pw_name : "?", (unsigned)ui->uid,
                                count_unit_buf);
-               usi.count = conf.limit_arg,
+               usi.count = select_conf.limit_arg,
                usi.ui = ui;
                usi.flags = USF_PRINT_DIRNAME | USF_PRINT_FILES;
                ret = adu_loop_reverse(ui->table, UT_FILES, &usi, user_stats_loop_function,
@@ -479,7 +479,7 @@ static int print_user_list(struct user_info *ui, __a_unused void *data)
                printf("\n");
        }
        if (ula == user_list_arg_none && !conf.no_user_summary_given) {
-               usi.count = conf.limit_arg;
+               usi.count = select_conf.limit_arg;
                usi.ui = ui;
                usi.flags = USF_COMPUTE_SUMMARY;
                ret = adu_loop_reverse(ui->table, UT_FILES, &usi, user_stats_loop_function,
@@ -504,7 +504,7 @@ static int print_global_lists(void)
                || gla == global_list_arg_both);
 
        if (print_size_list) {
-               gsi.count = conf.limit_arg;
+               gsi.count = select_conf.limit_arg;
                gsi.flags = GSF_PRINT_DIRNAME | GSF_PRINT_BYTES | GSF_COMPUTE_SUMMARY;
                if (!conf.no_headers_given)
                        printf("By size%s:\n", size_unit_buf);
@@ -515,7 +515,7 @@ static int print_global_lists(void)
                printf("\n");
        }
        if (gla == global_list_arg_file_count || gla == global_list_arg_both) {
-               gsi.count = conf.limit_arg;
+               gsi.count = select_conf.limit_arg;
                gsi.flags = GSF_PRINT_DIRNAME | GSF_PRINT_FILES;
                if (!print_size_list)
                        gsi.flags |= GSF_COMPUTE_SUMMARY;
@@ -529,7 +529,7 @@ static int print_global_lists(void)
        }
        if (gla == global_list_arg_none && !conf.no_global_summary_given) {
                /* must compute summary */
-               gsi.count = conf.limit_arg;
+               gsi.count = select_conf.limit_arg;
                gsi.flags = GSF_COMPUTE_SUMMARY;
                ret = adu_loop_reverse(dir_table, DT_FILES, &gsi,
                        global_stats_loop_function, &gsi.ret, &gsi.osl_errno);