Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F147913495
D31634.1784771168.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Flag For Later
Award Token
Size
774 B
Referenced Files
None
Subscribers
None
D31634.1784771168.diff
View Options
Index: usr.bin/find/main.c
===================================================================
--- usr.bin/find/main.c
+++ usr.bin/find/main.c
@@ -53,6 +53,7 @@
#include <locale.h>
#include <regex.h>
#include <stdio.h>
+#include <stdbool.h>
#include <stdlib.h>
#include <time.h>
#include <unistd.h>
@@ -73,6 +74,18 @@
static void usage(void);
+static void
+do_sort_from_env(void)
+{
+ const char *p;
+
+ p = getenv("FINDSORT");
+ if (p != NULL && *p != '\0')
+ issort = 1;
+}
+
+
+
int
main(int argc, char *argv[])
{
@@ -132,6 +145,8 @@
ftsoptions |= FTS_LOGICAL;
}
+ do_sort_from_env();
+
/*
* Find first option to delimit the file list. The first argument
* that starts with a -, or is a ! or a ( must be interpreted as a
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Thu, Jul 23, 1:46 AM (19 h, 18 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
29233687
Default Alt Text
D31634.1784771168.diff (774 B)
Attached To
Mode
D31634: find(1): check environment to enable sorting
Attached
Detach File
Event Timeline
Log In to Comment