Lines Matching refs:fd
272 int fd;
278 fd = try_open_executable(pathList, pathEnd - pathList, name,
281 if (fd >= 0) {
284 status = _kern_read_stat(fd, NULL, true, &stat, sizeof(struct stat));
287 return fd;
290 _kern_close(fd);
307 int fd = B_ENTRY_NOT_FOUND;
311 fd = _kern_open(-1, name, O_RDONLY, 0);
312 if (fd >= 0 || type == B_APP_IMAGE)
313 return fd;
317 return fd;
344 fd = search_executable_in_path_list(name, firstList,
348 if (fd < 0) {
349 fd = search_executable_in_path_list(name, secondList,
357 if (fd < 0) {
359 fd = search_executable_in_path_list(name, paths, strlen(paths),
364 if (fd >= 0) {
370 return fd;
403 int fd;
410 fd = open_executable(path, B_APP_IMAGE, NULL, NULL, NULL, NULL, NULL);
411 if (fd < B_OK)
412 return fd;
421 length = _kern_read(fd, 0, buffer, sizeof(buffer));
475 _kern_close(fd);
481 determine_x86_abi(int fd, const Elf32_Ehdr& elfHeader, bool& _isGcc2)
496 if (_kern_read_stat(fd, NULL, true, &st, sizeof(st)) != B_OK)
502 fd, 0);
637 get_executable_architecture(int fd, const char** _architecture)
643 ssize_t bytesRead = _kern_read(fd, 0, &elfHeader, sizeof(elfHeader));
664 if (determine_x86_abi(fd, elfHeader, isGcc2) && isGcc2)
701 int fd = _kern_open(-1, path, O_RDONLY, 0);
702 if (fd < 0)
703 return fd;
705 status_t error = get_executable_architecture(fd, _architecture);
707 _kern_close(fd);