Lines Matching refs:path
74 char path[PATH_MAX]; in translate_readonly() local
115 strlen(file) + 1 > sizeof(path)) in translate_readonly()
118 strcpy(path, FIRMWARE_BASE); in translate_readonly()
119 strcat(path, dirname(firmware_value)); in translate_readonly()
120 strcat(path, "/"); in translate_readonly()
121 strcat(path, file); in translate_readonly()
123 fd = open(path, O_RDONLY); in translate_readonly()
128 warn("failed to open %s", path); in translate_readonly()
180 int translate_open(const char *path, int flags) in translate_open() argument
182 if (!strncmp(path, READONLY_PATH, strlen(READONLY_PATH))) in translate_open()
183 return translate_readonly(path + strlen(READONLY_PATH)); in translate_open()
184 else if (!strncmp(path, READWRITE_PATH, strlen(READWRITE_PATH))) in translate_open()
185 return translate_readwrite(path + strlen(READWRITE_PATH), flags); in translate_open()
187 fprintf(stderr, "invalid path %s, rejecting\n", path); in translate_open()