--- daemon/device-name-translation.c | 10 ++++++++++ 1 file changed, 10 insertions(+)
diff --git a/daemon/device-name-translation.c b/daemon/device-name-translation.c index b17f3c683..39266fdd7 100644 --- a/daemon/device-name-translation.c +++ b/daemon/device-name-translation.c @@ -100,6 +100,12 @@ device_name_translation_init (void) /* This is the final cache size because we deleted entries above. */ cache_size = j; + + /* XXX */ + for (i = 0; i < cache_size; ++i) { + fprintf (stderr, "device name translation cache: %zu -> %s\n", + i, cache[i]); + } } void @@ -180,6 +186,8 @@ device_name_translation (const char *device) strcpy (dev, start); dev[len] = '\0'; + fprintf (stderr, "DEVICE=%s START=%s LEN=%zu\n", device, start, len); + i = guestfs_int_drive_index (dev); if (i >= 0 && i < (ssize_t) cache_size) { /* Append the partition name if present. */ @@ -273,6 +281,8 @@ reverse_device_name_translation (const char *device) reply_with_perror ("asprintf"); return NULL; } + fprintf (stderr, "REVERSE %s -> %s, index %zu, cache[%zu]=%s, len %zu\n", + device, ret, i, i, cache[i], len); break; } } -- 2.25.0 _______________________________________________ Libguestfs mailing list Libguestfs@redhat.com https://www.redhat.com/mailman/listinfo/libguestfs