Lines Matching refs:fd
18 int fd;
22 fd = open(POWER_FLOOR_ENABLE_ATTRIBUTE, O_RDWR);
23 if (fd < 0) {
28 if (write(fd, "0\n", 2) < 0) {
35 close(fd);
42 int fd, ret;
52 fd = open(POWER_FLOOR_ENABLE_ATTRIBUTE, O_RDWR);
53 if (fd < 0) {
58 if (write(fd, "1\n", 2) < 0) {
63 close(fd);
68 fd = open(POWER_FLOOR_STATUS_ATTRIBUTE, O_RDONLY);
69 if (fd < 0) {
74 if ((lseek(fd, 0L, SEEK_SET)) < 0) {
79 if (read(fd, status_str, sizeof(status_str)) < 0) {
85 ufd.fd = fd;
95 if ((lseek(fd, 0L, SEEK_SET)) < 0) {
100 if (read(fd, status_str, sizeof(status_str)) < 0)
106 close(fd);