Lines Matching defs:fd

457 	int fd, ret;
463 fd = open(buffer, O_RDONLY);
464 if (fd < 0)
465 return fd;
467 ret = read(fd, &online, sizeof(online));
468 close(fd);
484 int fd, ret;
495 fd = open(buffer, O_WRONLY);
496 if (fd < 0) {
507 ret = write(fd, "1\n", 2);
509 ret = write(fd, "0\n", 2);
514 close(fd);
751 int i, fd = 0;
759 fd = open(pathname, O_RDWR);
760 if (fd < 0 && !is_clx_n_platform())
794 if (fd >= 0) {
799 if (ioctl(fd, ISST_IF_GET_PHY_ID, &map) == -1) {
824 if (fd >= 0)
825 close(fd);
885 int fd, ret;
887 fd = open("/sys/fs/cgroup/cgroup.subtree_control", O_RDWR, 0);
888 if (fd < 0) {
891 return fd;
894 ret = write(fd, " +cpuset", strlen(" +cpuset"));
895 close(fd);
907 int i, first, curr_index, index, ret, fd;
927 fd = open(cpuset_cpus, O_RDWR, 0);
928 if (fd < 0) {
929 return fd;
932 ret = write(fd, "member", strlen("member"));
981 fd = open(cpuset_cpus, O_RDWR, 0);
982 if (fd < 0) {
983 return fd;
986 ret = write(fd, str, strlen(str));
987 close(fd);
996 fd = open(cpuset_cpus, O_RDWR, 0);
997 if (fd < 0) {
998 return fd;
1001 ret = write(fd, "isolated", strlen("isolated"));
1004 ret = write(fd, "root", strlen("root"));
1009 close(fd);
1019 int fd, fd1, len, ret;
1032 fd = open("/sys/fs/cgroup/0-0-0/cpuset.cpus", O_RDONLY, 0);
1033 if (fd < 0)
1036 len = read(fd, str, sizeof(str));
1044 close(fd);
1051 close(fd);
1059 close(fd);
1064 close(fd);
1088 int fd;
1095 fd = open(pathname, O_RDWR);
1096 if (fd < 0)
1099 if (ioctl(fd, ISST_IF_GET_PLATFORM_INFO, &isst_platform_info) == -1) {
1101 close(fd);
1105 close(fd);
1682 int fd, ret, len;
1691 fd = open(buffer, O_WRONLY);
1692 if (fd < 0)
1693 return fd;
1697 ret = write(fd, freq_str, len);
1699 close(fd);
1702 close(fd);
1770 int fd, ret, len;
1782 fd = open(buffer, O_RDONLY);
1783 if (fd < 0)
1784 return fd;
1786 len = read(fd, min_freq, sizeof(min_freq));
1787 close(fd);
1799 fd = open(buffer, O_WRONLY);
1800 if (fd < 0)
1801 return fd;
1805 ret = write(fd, min_freq, len);
1807 close(fd);
1810 close(fd);
2233 int fd, len;
2241 fd = open(buffer, O_RDONLY);
2242 if (fd < 0)
2245 len = read(fd, sibling_list, sizeof(sibling_list));
2246 close(fd);