aboutsummaryrefslogtreecommitdiff
path: root/debianutils
diff options
context:
space:
mode:
authorRon Yorston <rmy@pobox.com>2020-11-12 08:27:51 +0000
committerRon Yorston <rmy@pobox.com>2020-11-12 08:27:51 +0000
commitead8b92e3d66ab45235e137f85fb3a529dcc64ef (patch)
treeaf268270382dad969218063d4a8120fc91a9e631 /debianutils
parent567728c22dddea4ed33b8a69641ba2e0c3f1f600 (diff)
parent64981b4c8e88812c322bee3832f1d421ff670ed5 (diff)
downloadbusybox-w32-ead8b92e3d66ab45235e137f85fb3a529dcc64ef.tar.gz
busybox-w32-ead8b92e3d66ab45235e137f85fb3a529dcc64ef.tar.bz2
busybox-w32-ead8b92e3d66ab45235e137f85fb3a529dcc64ef.zip
Merge branch 'busybox' into merge
Diffstat (limited to 'debianutils')
-rw-r--r--debianutils/run_parts.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/debianutils/run_parts.c b/debianutils/run_parts.c
index c80cc863f..585a4b58f 100644
--- a/debianutils/run_parts.c
+++ b/debianutils/run_parts.c
@@ -131,12 +131,13 @@ static int bb_alphasort(const void *p1, const void *p2)
131 return (option_mask32 & OPT_r) ? -r : r; 131 return (option_mask32 & OPT_r) ? -r : r;
132} 132}
133 133
134static int FAST_FUNC act(const char *file, struct stat *statbuf, void *args UNUSED_PARAM, int depth) 134static int FAST_FUNC act(struct recursive_state *state,
135 const char *file, struct stat *statbuf)
135{ 136{
136 if (depth == 1) 137 if (state->depth == 0)
137 return TRUE; 138 return TRUE;
138 139
139 if (depth == 2 140 if (state->depth == 1
140 && ( !(statbuf->st_mode & (S_IFREG | S_IFLNK)) 141 && ( !(statbuf->st_mode & (S_IFREG | S_IFLNK))
141 || invalid_name(file) 142 || invalid_name(file)
142 || (!(option_mask32 & OPT_l) && access(file, X_OK) != 0)) 143 || (!(option_mask32 & OPT_l) && access(file, X_OK) != 0))
@@ -199,9 +200,8 @@ int run_parts_main(int argc UNUSED_PARAM, char **argv)
199 ACTION_RECURSE|ACTION_FOLLOWLINKS, 200 ACTION_RECURSE|ACTION_FOLLOWLINKS,
200 act, /* file action */ 201 act, /* file action */
201 act, /* dir action */ 202 act, /* dir action */
202 NULL, /* user data */ 203 NULL /* user data */
203 1 /* depth */ 204 );
204 );
205 205
206 if (!names) 206 if (!names)
207 return 0; 207 return 0;