Lines Matching defs:path
134 const char *path;
249 static int read_file(const char *path, char *buf, size_t sz)
254 fd = open(path, O_RDONLY, 0);
276 static int read_file_int(const char *path, int *val)
283 ret = read_file(path, buf, sizeof(buf));
331 const char *path, bool online)
342 "/sys/%s/capacity", path);
377 uevent->path = "";
393 uevent->path = msg;
414 uevent->action, uevent->path, uevent->subsystem,
428 char *path;
431 if (uevent->path[0] == '\0')
433 ret = asprintf(&path, "/sys/%s/type", uevent->path);
436 ret = read_file(path, ps_type, sizeof(ps_type));
437 free(path);
456 supply = add_supply(charger, uevent->ps_name, ps_type, uevent->path,
591 static void coldboot(struct charger *charger, const char *path,
596 LOGV("doing coldboot '%s' in '%s'\n", event, path);
597 DIR *d = opendir(path);