Lines Matching defs:path
51 static int write_key(char *path, char *key, char *value)
53 int fd = open(path, O_WRONLY);;
66 // Display all keys under a path
69 char *path, *data, *key;
74 path = dirtree_path(dt, 0);
75 data = readfile(path, 0, 0);
76 replace_char(key = path + 10, '/', '.'); // skip "/proc/sys/"
88 free(path);
96 char *path;
105 path = xmprintf("/proc/sys/%s", key);
106 replace_char(path, '.', '/');
108 if (!(value && (!write_key(path, key, value) || (toys.optflags & FLAG_q)))) {
109 if (!access(path, R_OK)) dirtree_read(path, do_show_keys);
112 free(path);