OSDN Git Service

Handle some other device paths.
authorPeter Jones <pjones@redhat.com>
Wed, 5 Feb 2014 04:02:25 +0000 (23:02 -0500)
committerPeter Jones <pjones@redhat.com>
Wed, 5 Feb 2014 04:18:15 +0000 (23:18 -0500)
Add support for Vendor-Defined Messaging Device Paths as well as
FVFILE() and FVVOL()

Signed-off-by: Peter Jones <pjones@redhat.com>
src/lib/unparse_path.c

index aebcb47..5e51f1e 100644 (file)
@@ -252,6 +252,9 @@ unparse_messaging_path(char *buffer, size_t buffer_size, EFI_DEVICE_PATH *path)
        case 6:
                return snprintf(buffer, buffer_size, "I2O(%x)",
                                get(a, i2o->tid));
+       case 10:
+               return unparse_vendor_path(buffer, buffer_size,
+                       (VENDOR_DEVICE_PATH *)path);
        case 11:
                needed = snprintf(buffer, buffer_size, "MAC(");
                if (needed < 0)
@@ -404,6 +407,20 @@ unparse_media_path(char *buffer, size_t buffer_size, EFI_DEVICE_PATH *path)
                rc = snprintf(buffer, buffer_size, "Media(%s)", text_guid);
                free(text_guid);
                return rc;
+       case 6:
+               rc = efi_guid_to_str(&media->guid, &text_guid);
+               if (rc < 0)
+                       return rc;
+               rc = snprintf(buffer, buffer_size, "FBFILE(%s)", text_guid);
+               free(text_guid);
+               return rc > 0 ? rc + 1 : rc;
+       case 7:
+               rc = efi_guid_to_str(&media->guid, &text_guid);
+               if (rc < 0)
+                       return rc;
+               rc = snprintf(buffer, buffer_size, "FBVOL(%s)", text_guid);
+               free(text_guid);
+               return rc > 0 ? rc + 1 : rc;
        }
        return 0;
 }