diff options
author | Franck Bui <fbui@suse.com> | 2017-06-08 15:41:26 +0200 |
---|---|---|
committer | Franck Bui <fbui@suse.com> | 2017-06-08 16:21:35 +0200 |
commit | 4c47affcf1e501431f3cb567c516ec252dfc4bbc (patch) | |
tree | 18d9c246fb51b5039435616f715e654df048cf0a /src/core/execute.h | |
parent | core: only apply NonBlocking= to fds passed via socket activation (diff) | |
download | systemd-4c47affcf1e501431f3cb567c516ec252dfc4bbc.tar.xz systemd-4c47affcf1e501431f3cb567c516ec252dfc4bbc.zip |
core: remove the redundancy of 'n_fds' and 'n_storage_fds' in ExecParameters struct
'n_fds' field in the ExecParameters structure was counting the total number of
file descriptors to be passed to a unit.
This counter also includes the number of passed socket fds which is counted by
'n_socket_fds' already.
This patch removes that redundancy by replacing 'n_fds' with
'n_storage_fds'. The new field only counts the fds passed via the storage store
mechanism. That way each fd is counted at one place only.
Subsequently the patch makes sure to fix code that used 'n_fds' and also wanted
to iterate through all of them by explicitly adding 'n_socket_fds' + 'n_storage_fds'.
Suggested by Lennart.
Diffstat (limited to 'src/core/execute.h')
-rw-r--r-- | src/core/execute.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/core/execute.h b/src/core/execute.h index dee7af1423..136319359c 100644 --- a/src/core/execute.h +++ b/src/core/execute.h @@ -246,7 +246,7 @@ struct ExecParameters { int *fds; char **fd_names; - unsigned n_fds; + unsigned n_storage_fds; unsigned n_socket_fds; ExecFlags flags; |