Lines Matching defs:fds
74 static int ServiceSendFds(const char *serviceName, int *fds, int fdCount, bool doPoll)
94 if (BuildControlMessage(&msghdr, fds, fdCount, true) < 0) {
106 BEGET_LOGE("Failed to send fds to init, err = %d", errno);
120 BEGET_LOGI("Send fds done");
125 int ServiceSaveFd(const char *serviceName, int *fds, int fdCount)
128 if (serviceName == NULL || fds == NULL ||
133 return ServiceSendFds(serviceName, fds, fdCount, false);
136 int ServiceSaveFdWithPoll(const char *serviceName, int *fds, int fdCount)
139 if (serviceName == NULL || fds == NULL ||
144 return ServiceSendFds(serviceName, fds, fdCount, true);
166 BEGET_LOGV("fds = %s", fdBuffer);
171 int *fds = calloc((size_t)fdCount, sizeof(int));
172 BEGET_ERROR_CHECK(fds != NULL, FreeStringVector(fdList, fdCount);
180 fds[i] = (int)strtol(fdList[i], NULL, DECIMAL_BASE);
186 free(fds);
187 fds = NULL;
192 return fds;