History log of /netbsd-src/usr.bin/find/function.c (Results 1 – 25 of 81)
Revision Date Author Comments
# 82bba4e9 05-Feb-2024 andvar <andvar@NetBSD.org>

fix various typos in comments.


# 7f634697 01-Apr-2023 christos <christos@NetBSD.org>

PR/57313: Timo Buhrmester: Don't bail if "." cannot be opened. From FreeBSD


# 93a814dc 18-Mar-2021 cheusov <cheusov@NetBSD.org>

find: use POSIX strtoll(3) instead of legacy strtoq(3)


# 4e50b167 18-Mar-2021 cheusov <cheusov@NetBSD.org>

find: use POSIX type uint32_t instead of u_int32_t


# 2bdb5be3 04-Sep-2018 kre <kre@NetBSD.org>

Inspired by PR pkg/53543

When calculating the length of the args that can be
appended in a "find .... -exec something {} +"
usage, remember to allow for the arg pointers, which
form part of what is

Inspired by PR pkg/53543

When calculating the length of the args that can be
appended in a "find .... -exec something {} +"
usage, remember to allow for the arg pointers, which
form part of what is allowed in ARG_MAX.

From a fairly empty installation of HEAD on amd64
and with a "/tmp/args" command that simply prints
its arg count, and the length of the arg strings,
with this mod I see ..

netbsd# find / -exec /tmp/args {} +
Argc 5000 Arglen 107645
Argc 5000 Arglen 151324
Argc 5000 Arglen 187725
Argc 5000 Arglen 206591
Argc 5000 Arglen 172909
Argc 5000 Arglen 186264
Argc 5000 Arglen 167906
Argc 2881 Arglen 98260

The upper limit of 5000 args is in the code.

Using the biggest of those, 5000
args, plus 206591 bytes of strings
uses 246591 bytes total (this excludes
the command name, so add a few more).
That's fairly close to the ARG_MAX
of 262144.

On another system (with longer paths) I see:
(this is just a small part of the output, using a
different version of the dummy command, and a
slightly different invocation)

Args: 4546 Len 218030
Args: 4878 Len 217991
Args: 4813 Len 218028
Args: 4803 Len 218029

There, 4878*8 + 217991 == 257015 which is about
as close as we'd want to come to the arg limit.

XXX pullup -8

show more ...


# edba12e9 13-Jun-2017 christos <christos@NetBSD.org>

PR/52295: Anthony Mallet: find -delete: "relative path not safe" with absolute
paths ... Fix from OpenBSD


# fb578285 13-Jun-2016 pgoyette <pgoyette@NetBSD.org>

Fix missing quote. Resolve automated test failure.


# cc610a3c 13-Jun-2016 pgoyette <pgoyette@NetBSD.org>

Add new primaries -asince, -csince, and -since to compare file's
attributes against a user-specified timestamp (rather than the
attributes of a reference file).

Update the parse routines so they hav

Add new primaries -asince, -csince, and -since to compare file's
attributes against a user-specified timestamp (rather than the
attributes of a reference file).

Update the parse routines so they have access to the name of the
option being parsed. This enables accurate error reporting for
"aliases" of primaries.

Now that aliases work, introduce some aliases for consistency with
Gnu findutils.

show more ...


# 9d2811fc 12-Jun-2016 dholland <dholland@NetBSD.org>

Extend the numeric handling for uids with -user to gids with -group, and
document it. Leftover bit of PR 46158.


# 1a3fcd0b 04-May-2013 uebayasi <uebayasi@NetBSD.org>

find(1): Compare timestamp in nsec scale in -anewer/-cnewer/-newer.


# 30cf30e5 26-Aug-2012 wiz <wiz@NetBSD.org>

Make order of words in comment consistent with that within other
comments (helps with search actions).

Patch from Bug Hunting.


# 1d1104dd 05-May-2012 dholland <dholland@NetBSD.org>

rest of previous.
BQS: 1. dholland: 0.


# f88a50da 05-May-2012 dholland <dholland@NetBSD.org>

typo in comment


# d34c2845 20-Mar-2012 matt <matt@NetBSD.org>

Use C89 function definitions


# 8624929e 22-Sep-2011 christos <christos@NetBSD.org>

Fix unchecked malloc, check for overflow (Maksymilian Arciemowicz)
While here, remove unused casts, fix types.


# e816b5f7 24-Feb-2011 jmcneill <jmcneill@NetBSD.org>

Don't error out while searching for empty directories, from FreeBSD:

http://lists.freebsd.org/pipermail/svn-src-head/2010-December/022913.html


# f4f54a9c 06-Jan-2011 dholland <dholland@NetBSD.org>

Fix "-exec blah blah {} +" so it only matches when the {} is last, as
per the standard. Per (brief) discussion on tech-userlevel.

There should really be a form where you can do the equivalent of
"-e

Fix "-exec blah blah {} +" so it only matches when the {} is last, as
per the standard. Per (brief) discussion on tech-userlevel.

There should really be a form where you can do the equivalent of
"-exec blah {} blah +", but I think we're going to need to call it
something other than -exec. As it is it's sort of surprising that the
standards people didn't add a different name -- note what happens if
you try to do something like "find ... -exec expr {} + 2 \;".

show more ...


# 02dcfb17 19-Jul-2007 daniel <daniel@NetBSD.org>

Add the '-E' option to interpret regexes as extended regexes. While we
are here, fix ordering in usage information by putting '-X' in the proper
place.

Addition of '-E' was discussed on tech-userlev

Add the '-E' option to interpret regexes as extended regexes. While we
are here, fix ordering in usage information by putting '-X' in the proper
place.

Addition of '-E' was discussed on tech-userlevel.

show more ...


# b1b89f5d 17-Jul-2007 christos <christos@NetBSD.org>

eliminate MFSNAMELEN


# a706fb09 06-Feb-2007 elad <elad@NetBSD.org>

Add -delete from FreeBSD.


# ca93cf9e 02-Feb-2007 christos <christos@NetBSD.org>

fix spello (from Anon Ymous)


# cb49bddd 14-Dec-2006 he <he@NetBSD.org>

Adapt find to the move of string_to_flags() and flags_to_string() to
libutil.


# 1dcd74fd 09-Nov-2006 christos <christos@NetBSD.org>

eliminate alloca use.


# 7a76839c 12-Oct-2006 tacha <tacha@NetBSD.org>

All members of PLAN should be initialized.


# 2eed134b 11-Oct-2006 apb <apb@NetBSD.org>

De-__P(), remove trailing spaces, sprinkle a few const, WARNS=4.


1234