Lines Matching defs:devpath
86 nodes_match(EFI_DEVICE_PATH *imgpath, EFI_DEVICE_PATH *devpath)
90 if (imgpath == NULL || imgpath->Type != devpath->Type ||
91 imgpath->SubType != devpath->SubType)
95 if (len != DevicePathNodeLength(devpath))
98 return (memcmp(imgpath, devpath, (size_t)len) == 0);
103 * in imgpath and devpath match up to their respective occurrences of a
107 device_paths_match(EFI_DEVICE_PATH *imgpath, EFI_DEVICE_PATH *devpath)
113 while (!IsDevicePathEnd(imgpath) && !IsDevicePathEnd(devpath)) {
115 IsDevicePathType(devpath, MEDIA_DEVICE_PATH))
118 if (!nodes_match(imgpath, devpath))
122 devpath = NextDevicePathNode(devpath);
129 * devpath_last returns the last non-path end node in devpath.
132 devpath_last(EFI_DEVICE_PATH *devpath)
135 while (!IsDevicePathEnd(NextDevicePathNode(devpath)))
136 devpath = NextDevicePathNode(devpath);
138 return (devpath);
228 if ((status = BS->LoadImage(TRUE, IH, devpath_last(dev->devpath),
290 EFI_DEVICE_PATH *devpath;
295 status = BS->HandleProtocol(h, &DevicePathGUID, (void **)&devpath);
306 CHAR16 *text = efi_devpath_name(devpath);
324 *preferred = device_paths_match(imgpath, devpath);
334 devinfo->devpath = devpath;
442 /* Determine the devpath of our image so we can prefer it. */