-C and -c allow at most one input file. Ensure this is the case when the
input files are specified through --files0-from. Submitted by: tim@OpenBSD Obtained from: OpenBSD MFC after: 1 week
This commit is contained in:
parent
c8b84e5330
commit
a7bc18929d
@ -1168,6 +1168,11 @@ main(int argc, char **argv)
|
|||||||
argc -= optind;
|
argc -= optind;
|
||||||
argv += optind;
|
argv += optind;
|
||||||
|
|
||||||
|
if (argv_from_file0) {
|
||||||
|
argc = argc_from_file0;
|
||||||
|
argv = argv_from_file0;
|
||||||
|
}
|
||||||
|
|
||||||
#ifndef WITHOUT_NLS
|
#ifndef WITHOUT_NLS
|
||||||
catalog = catopen("sort", NL_CAT_LOCALE);
|
catalog = catopen("sort", NL_CAT_LOCALE);
|
||||||
#endif
|
#endif
|
||||||
@ -1205,11 +1210,6 @@ main(int argc, char **argv)
|
|||||||
ks->sm.func = get_sort_func(&(ks->sm));
|
ks->sm.func = get_sort_func(&(ks->sm));
|
||||||
}
|
}
|
||||||
|
|
||||||
if (argv_from_file0) {
|
|
||||||
argc = argc_from_file0;
|
|
||||||
argv = argv_from_file0;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (debug_sort) {
|
if (debug_sort) {
|
||||||
printf("Memory to be used for sorting: %llu\n",available_free_memory);
|
printf("Memory to be used for sorting: %llu\n",available_free_memory);
|
||||||
#if defined(SORT_THREADS)
|
#if defined(SORT_THREADS)
|
||||||
|
Loading…
Reference in New Issue
Block a user