Lines Matching refs:dfd
46 int dfd, fd, len, on; in acpi_callback() local
55 if (0 <= (dfd = open((TT.cpath=dirtree_path(tree, NULL)), O_RDONLY))) { in acpi_callback()
56 if ((fd = openat(dfd, "type", O_RDONLY)) < 0) goto done; in acpi_callback()
65 if ((cap = read_int_at(dfd, "capacity")) < 0) { in acpi_callback()
66 if ((max = read_int_at(dfd, "charge_full")) > 0) in acpi_callback()
67 curr = read_int_at(dfd, "charge_now"); in acpi_callback()
68 else if ((max = read_int_at(dfd, "energy_full")) > 0) in acpi_callback()
69 curr = read_int_at(dfd, "energy_now"); in acpi_callback()
75 if ((on = read_int_at(dfd, "online")) >= 0) in acpi_callback()
79 close(dfd); in acpi_callback()
87 int dfd, temp; in temp_callback() local
94 if (0 <= (dfd = open((TT.cpath=dirtree_path(tree, NULL)), O_RDONLY))) { in temp_callback()
95 if ((0 < (temp = read_int_at(dfd, "temp"))) || !errno) { in temp_callback()
101 close(dfd); in temp_callback()
110 int dfd=5, cur, max; in cool_callback() local
119 if (0 <= (dfd = open((TT.cpath=dirtree_path(tree, &dfd)), O_RDONLY))) { in cool_callback()
123 cur=read_int_at(dfd, "cur_state"); in cool_callback()
124 max=read_int_at(dfd, "max_state"); in cool_callback()
129 close(dfd); in cool_callback()