Lines Matching defs:path
96 static void SetDeviceLable(const char *path, char **symLinks)
103 p = path;
104 slash = strchr(path, '/');
116 if (memcpy_s(buffer, PATH_MAX, path, p - path - 1) != EOK) {
117 INIT_LOGE("[uevent] Failed to memcpy path %s", path);
124 rc += Restorecon(path);
126 INIT_LOGE("[uevent] Failed to Restorecon \" %s \"", path);
138 setfilecon(path, context);
170 INIT_LOGE("device path is not valid. should be starts with /dev");
176 INIT_LOGE("Create path \" %s \" failed", devicePath);
228 static char *FindPlatformDeviceName(char *path)
230 if (INVALIDSTRING(path)) {
234 if (STARTSWITH(path, "/sys/devices/platform/")) {
235 path += strlen("/sys/devices/platform/");
236 return path;
240 if (STARTSWITH(path, "/sys/devices/")) {
241 path += strlen("/sys/devices/");
242 return path;
316 INIT_LOGE("Failed to build sys path for device %s", uevent->syspath);
331 INIT_LOGE("Failed to build subsystem path for device \" %s \"", uevent->syspath);
363 // Block device path and name maybe not human readable.
401 INIT_LOGE("Invalid sys path");
413 // Get name from sys path.
480 INIT_LOGE("Failed to copy sys path");
486 INIT_LOGE("Cannot get device path or device name");
510 INIT_LOGE("Failed to copy sys path");
517 INIT_LOGE("Cannot get device path or device name");