summaryrefslogtreecommitdiffstats
path: root/lib/glob.c
Commit message (Collapse)AuthorAgeFilesLines
* glob: use empty globfree when compiling without CONFIG_GLOBAhmad Fatoum2021-03-221-12/+12
| | | | | | | | | | | | | | | | We already return an error code unconditionally when building with !CONFIG_GLOB. We need to do the same for globfree. Otherwise, we run risk of corrupting memory. This issue exists since the code was first added, but it became more acute with 90cde3b9ff46 ("startup: Execute init scripts in alphabetical order"), which added a globfree into the shell init. Configuration without CONFIG_GLOB would from then on experience memory corruption during startup. Reported-by: Antony Pavlov <antonynpavlov@gmail.com> Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* glob: do not unnecessarily opendir() a directorySascha Hauer2018-04-061-7/+8
| | | | | | | opendir() can trigger automounts, so do not use it when the pattern we examine doesn't have any wildcards. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* whole tree: remove trailing whitespacesDu Huanpeng2016-04-211-1/+1
| | | | | Signed-off-by: Du Huanpeng <u74147@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* glob: fix GLOB_SORTSascha Hauer2012-08-031-2/+2
| | | | | | | The arguments to collated_compare are actually pointers to pointers to char, not pointers to char. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* glob: Add sorted output supportSascha Hauer2012-05-141-6/+5
| | | | | | | This allows us for example to execute init scripts in the correct order. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* glob: activate GLOB_NOCHECK flagSascha Hauer2012-04-301-6/+4
| | | | | | Needed for hush. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* glob: sparse fixesSascha Hauer2010-10-211-24/+12
| | | | Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* add globbing supportSascha Hauer2008-03-091-0/+471