Searched defs:fds (Results 1 - 25 of 37) sorted by relevance

12

/systemd/src/libsystemd/sd-bus/
H A Dbus-container.c248 int *fds; local
253 fds = (int*) CMSG_DATA(cmsg);
257 close_many(fds, n_fds);
261 fd = fds[0];
H A Dtest-bus-server.c32 int fds[2]; member in struct:context
51 assert_se(sd_bus_set_fd(bus, c->fds[0], c->fds[0]) >= 0);
131 assert_se(sd_bus_set_fd(bus, c->fds[1], c->fds[1]) >= 0);
165 assert_se(socketpair(AF_UNIX, SOCK_STREAM, 0, c.fds) >= 0);
H A Dtest-bus-objects.c36 int fds[2]; member in struct:context
251 assert_se(sd_bus_set_fd(bus, c->fds[0], c->fds[0]) >= 0);
305 assert_se(sd_bus_set_fd(bus, c->fds[1], c->fds[1]) >= 0);
533 assert_se(socketpair(AF_UNIX, SOCK_STREAM, 0, c.fds) >= 0);
H A Dbus-message.h121 int *fds; member in struct:sd_bus_message
205 int *fds,
215 int *fds,
/systemd/src/test/
H A Dtest-fdset.c198 int fds[] = {10, 11, 12, 13}; local
201 assert_se(fdset_new_array(&fdset, fds, 4) >= 0);
/systemd/src/core/
H A Dslice.c210 static int slice_serialize(Unit *u, FILE *f, FDSet *fds) { argument
215 assert(fds);
221 static int slice_deserialize_item(Unit *u, const char *key, const char *value, FDSet *fds) { argument
227 assert(fds);
H A Dtarget.c145 static int target_serialize(Unit *u, FILE *f, FDSet *fds) { argument
150 assert(fds);
156 static int target_deserialize_item(Unit *u, const char *key, const char *value, FDSet *fds) { argument
162 assert(fds);
H A Dscope.c364 static int scope_serialize(Unit *u, FILE *f, FDSet *fds) { argument
369 assert(fds);
375 static int scope_deserialize_item(Unit *u, const char *key, const char *value, FDSet *fds) { argument
381 assert(fds);
H A Ddbus.c1118 int bus_fdset_add_all(Manager *m, FDSet *fds) { argument
1124 assert(fds);
1126 /* When we are about to reexecute we add all D-Bus fds to the
1136 fd = fdset_put_dup(fds, fd);
1145 fd = fdset_put_dup(fds, fd);
H A Ddevice.c159 static int device_serialize(Unit *u, FILE *f, FDSet *fds) { argument
164 assert(fds);
171 static int device_deserialize_item(Unit *u, const char *key, const char *value, FDSet *fds) { argument
177 assert(fds);
H A Dpath.c593 static int path_serialize(Unit *u, FILE *f, FDSet *fds) { argument
598 assert(fds);
606 static int path_deserialize_item(Unit *u, const char *key, const char *value, FDSet *fds) { argument
612 assert(fds);
H A Dtimer.c646 static int timer_serialize(Unit *u, FILE *f, FDSet *fds) { argument
651 assert(fds);
665 static int timer_deserialize_item(Unit *u, const char *key, const char *value, FDSet *fds) { argument
672 assert(fds);
H A Dautomount.c784 static int automount_serialize(Unit *u, FILE *f, FDSet *fds) { argument
792 assert(fds);
803 r = unit_serialize_item_fd(u, f, fds, "pipe-fd", a->pipe_fd);
810 static int automount_deserialize_item(Unit *u, const char *key, const char *value, FDSet *fds) { argument
815 assert(fds);
876 if (safe_atoi(value, &fd) < 0 || fd < 0 || !fdset_contains(fds, fd))
880 a->pipe_fd = fdset_remove(fds, fd);
H A Dbusname.c664 static int busname_serialize(Unit *u, FILE *f, FDSet *fds) { argument
670 assert(fds);
678 r = unit_serialize_item_fd(u, f, fds, "starter-fd", n->starter_fd);
685 static int busname_deserialize_item(Unit *u, const char *key, const char *value, FDSet *fds) { argument
720 if (safe_atoi(value, &fd) < 0 || fd < 0 || !fdset_contains(fds, fd))
724 n->starter_fd = fdset_remove(fds, fd);
H A Djob.c990 int job_serialize(Job *j, FILE *f, FDSet *fds) { argument
1008 int job_deserialize(Job *j, FILE *f, FDSet *fds) { argument
H A Dswap.c876 static int swap_serialize(Unit *u, FILE *f, FDSet *fds) { argument
881 assert(fds);
895 static int swap_deserialize_item(Unit *u, const char *key, const char *value, FDSet *fds) { argument
899 assert(fds);
H A Dexecute.h216 int *fds; member in struct:ExecParameters
285 int exec_runtime_serialize(Unit *unit, ExecRuntime *rt, FILE *f, FDSet *fds);
286 int exec_runtime_deserialize_item(Unit *unit, ExecRuntime **rt, const char *key, const char *value, FDSet *fds);
H A Dmount.c1034 static int mount_serialize(Unit *u, FILE *f, FDSet *fds) { argument
1039 assert(fds);
1054 static int mount_deserialize_item(Unit *u, const char *key, const char *value, FDSet *fds) { argument
1060 assert(fds);
H A Dsocket.c1418 log_unit_warning_errno(UNIT(s), r, "Failed to watch listening fds: %m");
2128 static int socket_serialize(Unit *u, FILE *f, FDSet *fds) { argument
2135 assert(fds);
2153 copy = fdset_put_dup(fds, p->fd);
2184 static int socket_deserialize_item(Unit *u, const char *key, const char *value, FDSet *fds) { argument
2236 if (sscanf(value, "%i %n", &fd, &skip) < 1 || fd < 0 || !fdset_contains(fds, fd))
2247 p->fd = fdset_remove(fds, fd);
2255 if (sscanf(value, "%i %n", &fd, &skip) < 1 || fd < 0 || !fdset_contains(fds, fd))
2266 p->fd = fdset_remove(fds, fd);
2274 if (sscanf(value, "%i %n", &fd, &skip) < 1 || fd < 0 || !fdset_contains(fds, f
2350 socket_distribute_fds(Unit *u, FDSet *fds) argument
2653 socket_collect_fds(Socket *s, int **fds) argument
[all...]
/systemd/src/basic/
H A Dfdset.c43 int fdset_new_array(FDSet **ret, const int *fds, unsigned n_fds) { argument
56 r = fdset_put(s, fds[i]);
77 * connection fds and suchlike are closed here, which
190 /* We won't close the fds here! */
197 int fdset_cloexec(FDSet *fds, bool b) { argument
202 assert(fds);
204 SET_FOREACH(p, MAKE_SET(fds), i) {
245 int fdset_close_others(FDSet *fds) { argument
251 j = 0, m = fdset_size(fds);
253 SET_FOREACH(e, MAKE_SET(fds),
261 fdset_size(FDSet *fds) argument
265 fdset_isempty(FDSet *fds) argument
278 fdset_steal_first(FDSet *fds) argument
[all...]
H A Dfd-util.c60 * unchanged. Is a NOP with negative fds passed, and returns
94 void close_many(const int fds[], unsigned n_fd) { argument
97 assert(fds || n_fd <= 0);
100 safe_close(fds[i]);
270 * have kcmp() this will also return true for two fds of the same
298 /* We consider all device fds different, since two device fds
308 /* The fds refer to the same inode on disk, let's also check
/systemd/src/libsystemd/sd-daemon/
H A Dsd-daemon.c404 _public_ int sd_pid_notify_with_fds(pid_t pid, int unset_environment, const char *state, const int *fds, unsigned n_fds) { argument
427 if (n_fds > 0 && !fds) {
481 memcpy(CMSG_DATA(cmsg), fds, sizeof(int) * n_fds); local
/systemd/src/journal/
H A Djournald-stream.c648 int server_restore_streams(Server *s, FDSet *fds) { argument
670 FDSET_FOREACH(fd, fds, i) {
689 fdset_remove(fds, fd);
H A Dmmap-cache.c79 Hashmap *fds; member in struct:MMapCache
300 assert_se(hashmap_remove(f->cache->fds, FD_TO_PTR(f->fd)));
312 f = hashmap_get(m->fds, FD_TO_PTR(fd));
316 r = hashmap_ensure_allocated(&m->fds, NULL);
327 r = hashmap_put(m->fds, FD_TO_PTR(fd), f);
346 while ((f = hashmap_first(m->fds)))
349 hashmap_free(m->fds);
443 f = hashmap_get(m->fds, FD_TO_PTR(fd));
653 HASHMAP_FOREACH(f, m->fds, i) {
682 HASHMAP_FOREACH(f, m->fds,
[all...]
H A Djournald-server.c1161 int *fds = NULL, v = 0; local
1239 fds = (int*) CMSG_DATA(cmsg);
1257 server_process_native_file(s, fds[0], ucred, tv, label, label_len);
1270 close_many(fds, n_fds);
1717 _cleanup_fdset_free_ FDSet *fds = NULL; local
1817 if (!fds) {
1818 fds = fdset_new();
1819 if (!fds)
1823 r = fdset_put(fds, fd);
1830 (void) server_restore_streams(s, fds);
[all...]

Completed in 72 milliseconds

12