Catching hanging qemu in tests (RHBZ#505329).
[libguestfs.git] / capitests / tests.c
index d263862..0e42cb4 100644 (file)
 static guestfs_h *g;
 static int suppress_error = 0;
 
-/* This will be 's' or 'h' depending on whether the guest kernel
- * names IDE devices /dev/sd* or /dev/hd*.
- */
-static char devchar = 's';
-
 static void print_error (guestfs_h *g, void *data, const char *msg)
 {
   if (!suppress_error)
@@ -155,6 +150,164 @@ static void no_test_warnings (void)
   fprintf (stderr, "warning: \"guestfs_e2fsck_f\" has no tests\n");
 }
 
+static int test_ntfs_3g_probe_0_skip (void)
+{
+  const char *str;
+
+  str = getenv ("SKIP_TEST_NTFS_3G_PROBE_0");
+  if (str && strcmp (str, "1") == 0) return 1;
+  str = getenv ("SKIP_TEST_NTFS_3G_PROBE");
+  if (str && strcmp (str, "1") == 0) return 1;
+  return 0;
+}
+
+static int test_ntfs_3g_probe_0 (void)
+{
+  if (test_ntfs_3g_probe_0_skip ()) {
+    printf ("%s skipped (reason: SKIP_TEST_* variable set)\n", "test_ntfs_3g_probe_0");
+    return 0;
+  }
+
+  /* InitNone|InitEmpty for test_ntfs_3g_probe_0 */
+  {
+    char device[] = "/dev/sda";
+    int r;
+    suppress_error = 0;
+    r = guestfs_blockdev_setrw (g, device);
+    if (r == -1)
+      return -1;
+  }
+  {
+    int r;
+    suppress_error = 0;
+    r = guestfs_umount_all (g);
+    if (r == -1)
+      return -1;
+  }
+  {
+    int r;
+    suppress_error = 0;
+    r = guestfs_lvm_remove_all (g);
+    if (r == -1)
+      return -1;
+  }
+  /* TestOutputInt for ntfs_3g_probe (0) */
+  {
+    char device[] = "/dev/sda";
+    char lines_0[] = ",";
+    char *lines[] = {
+      lines_0,
+      NULL
+    };
+    int r;
+    suppress_error = 0;
+    r = guestfs_sfdisk (g, device, 0, 0, 0, lines);
+    if (r == -1)
+      return -1;
+  }
+  {
+    char fstype[] = "ntfs";
+    char device[] = "/dev/sda1";
+    int r;
+    suppress_error = 0;
+    r = guestfs_mkfs (g, fstype, device);
+    if (r == -1)
+      return -1;
+  }
+  {
+    char device[] = "/dev/sda1";
+    int r;
+    suppress_error = 0;
+    r = guestfs_ntfs_3g_probe (g, 1, device);
+    if (r == -1)
+      return -1;
+    if (r != 0) {
+      fprintf (stderr, "test_ntfs_3g_probe_0: expected 0 but got %d\n",               (int) r);
+      return -1;
+    }
+  }
+  return 0;
+}
+
+static int test_ntfs_3g_probe_1_skip (void)
+{
+  const char *str;
+
+  str = getenv ("SKIP_TEST_NTFS_3G_PROBE_1");
+  if (str && strcmp (str, "1") == 0) return 1;
+  str = getenv ("SKIP_TEST_NTFS_3G_PROBE");
+  if (str && strcmp (str, "1") == 0) return 1;
+  return 0;
+}
+
+static int test_ntfs_3g_probe_1 (void)
+{
+  if (test_ntfs_3g_probe_1_skip ()) {
+    printf ("%s skipped (reason: SKIP_TEST_* variable set)\n", "test_ntfs_3g_probe_1");
+    return 0;
+  }
+
+  /* InitNone|InitEmpty for test_ntfs_3g_probe_1 */
+  {
+    char device[] = "/dev/sda";
+    int r;
+    suppress_error = 0;
+    r = guestfs_blockdev_setrw (g, device);
+    if (r == -1)
+      return -1;
+  }
+  {
+    int r;
+    suppress_error = 0;
+    r = guestfs_umount_all (g);
+    if (r == -1)
+      return -1;
+  }
+  {
+    int r;
+    suppress_error = 0;
+    r = guestfs_lvm_remove_all (g);
+    if (r == -1)
+      return -1;
+  }
+  /* TestOutputInt for ntfs_3g_probe (1) */
+  {
+    char device[] = "/dev/sda";
+    char lines_0[] = ",";
+    char *lines[] = {
+      lines_0,
+      NULL
+    };
+    int r;
+    suppress_error = 0;
+    r = guestfs_sfdisk (g, device, 0, 0, 0, lines);
+    if (r == -1)
+      return -1;
+  }
+  {
+    char fstype[] = "ext2";
+    char device[] = "/dev/sda1";
+    int r;
+    suppress_error = 0;
+    r = guestfs_mkfs (g, fstype, device);
+    if (r == -1)
+      return -1;
+  }
+  {
+    char device[] = "/dev/sda1";
+    int r;
+    suppress_error = 0;
+    r = guestfs_ntfs_3g_probe (g, 1, device);
+    if (r == -1)
+      return -1;
+    if (r != 12) {
+      fprintf (stderr, "test_ntfs_3g_probe_1: expected 12 but got %d\n",               (int) r);
+      return -1;
+    }
+  }
+  return 0;
+}
+
 static int test_sleep_0_skip (void)
 {
   const char *str;
@@ -176,7 +329,6 @@ static int test_sleep_0 (void)
   /* InitNone|InitEmpty for test_sleep_0 */
   {
     char device[] = "/dev/sda";
-    device[5] = devchar;
     int r;
     suppress_error = 0;
     r = guestfs_blockdev_setrw (g, device);
@@ -229,7 +381,6 @@ static int test_find_0 (void)
   /* InitBasicFS for test_find_0: create ext2 on /dev/sda1 */
   {
     char device[] = "/dev/sda";
-    device[5] = devchar;
     int r;
     suppress_error = 0;
     r = guestfs_blockdev_setrw (g, device);
@@ -252,7 +403,6 @@ static int test_find_0 (void)
   }
   {
     char device[] = "/dev/sda";
-    device[5] = devchar;
     char lines_0[] = ",";
     char *lines[] = {
       lines_0,
@@ -267,7 +417,6 @@ static int test_find_0 (void)
   {
     char fstype[] = "ext2";
     char device[] = "/dev/sda1";
-    device[5] = devchar;
     int r;
     suppress_error = 0;
     r = guestfs_mkfs (g, fstype, device);
@@ -276,7 +425,6 @@ static int test_find_0 (void)
   }
   {
     char device[] = "/dev/sda1";
-    device[5] = devchar;
     char mountpoint[] = "/";
     int r;
     suppress_error = 0;
@@ -338,7 +486,6 @@ static int test_find_1 (void)
   /* InitBasicFS for test_find_1: create ext2 on /dev/sda1 */
   {
     char device[] = "/dev/sda";
-    device[5] = devchar;
     int r;
     suppress_error = 0;
     r = guestfs_blockdev_setrw (g, device);
@@ -361,7 +508,6 @@ static int test_find_1 (void)
   }
   {
     char device[] = "/dev/sda";
-    device[5] = devchar;
     char lines_0[] = ",";
     char *lines[] = {
       lines_0,
@@ -376,7 +522,6 @@ static int test_find_1 (void)
   {
     char fstype[] = "ext2";
     char device[] = "/dev/sda1";
-    device[5] = devchar;
     int r;
     suppress_error = 0;
     r = guestfs_mkfs (g, fstype, device);
@@ -385,7 +530,6 @@ static int test_find_1 (void)
   }
   {
     char device[] = "/dev/sda1";
-    device[5] = devchar;
     char mountpoint[] = "/";
     int r;
     suppress_error = 0;
@@ -507,7 +651,6 @@ static int test_find_2 (void)
   /* InitBasicFS for test_find_2: create ext2 on /dev/sda1 */
   {
     char device[] = "/dev/sda";
-    device[5] = devchar;
     int r;
     suppress_error = 0;
     r = guestfs_blockdev_setrw (g, device);
@@ -530,7 +673,6 @@ static int test_find_2 (void)
   }
   {
     char device[] = "/dev/sda";
-    device[5] = devchar;
     char lines_0[] = ",";
     char *lines[] = {
       lines_0,
@@ -545,7 +687,6 @@ static int test_find_2 (void)
   {
     char fstype[] = "ext2";
     char device[] = "/dev/sda1";
-    device[5] = devchar;
     int r;
     suppress_error = 0;
     r = guestfs_mkfs (g, fstype, device);
@@ -554,7 +695,6 @@ static int test_find_2 (void)
   }
   {
     char device[] = "/dev/sda1";
-    device[5] = devchar;
     char mountpoint[] = "/";
     int r;
     suppress_error = 0;
@@ -644,7 +784,6 @@ static int test_lvresize_0 (void)
   /* InitNone|InitEmpty for test_lvresize_0 */
   {
     char device[] = "/dev/sda";
-    device[5] = devchar;
     int r;
     suppress_error = 0;
     r = guestfs_blockdev_setrw (g, device);
@@ -669,7 +808,6 @@ static int test_lvresize_0 (void)
   char expected[] = "test content";
   {
     char device[] = "/dev/sda";
-    device[5] = devchar;
     char lines_0[] = ",";
     char *lines[] = {
       lines_0,
@@ -683,7 +821,6 @@ static int test_lvresize_0 (void)
   }
   {
     char device[] = "/dev/sda1";
-    device[5] = devchar;
     int r;
     suppress_error = 0;
     r = guestfs_pvcreate (g, device);
@@ -693,7 +830,6 @@ static int test_lvresize_0 (void)
   {
     char volgroup[] = "VG";
     char physvols_0[] = "/dev/sda1";
-    physvols_0[5] = devchar;
     char *physvols[] = {
       physvols_0,
       NULL
@@ -818,7 +954,6 @@ static int test_zerofree_0 (void)
   /* InitNone|InitEmpty for test_zerofree_0 */
   {
     char device[] = "/dev/sda";
-    device[5] = devchar;
     int r;
     suppress_error = 0;
     r = guestfs_blockdev_setrw (g, device);
@@ -843,7 +978,6 @@ static int test_zerofree_0 (void)
   char expected[] = "test file";
   {
     char device[] = "/dev/sda";
-    device[5] = devchar;
     char lines_0[] = ",";
     char *lines[] = {
       lines_0,
@@ -858,7 +992,6 @@ static int test_zerofree_0 (void)
   {
     char fstype[] = "ext3";
     char device[] = "/dev/sda1";
-    device[5] = devchar;
     int r;
     suppress_error = 0;
     r = guestfs_mkfs (g, fstype, device);
@@ -867,7 +1000,6 @@ static int test_zerofree_0 (void)
   }
   {
     char device[] = "/dev/sda1";
-    device[5] = devchar;
     char mountpoint[] = "/";
     int r;
     suppress_error = 0;
@@ -886,7 +1018,6 @@ static int test_zerofree_0 (void)
   }
   {
     char pathordevice[] = "/dev/sda1";
-    pathordevice[5] = devchar;
     int r;
     suppress_error = 0;
     r = guestfs_umount (g, pathordevice);
@@ -895,7 +1026,6 @@ static int test_zerofree_0 (void)
   }
   {
     char device[] = "/dev/sda1";
-    device[5] = devchar;
     int r;
     suppress_error = 0;
     r = guestfs_zerofree (g, device);
@@ -904,7 +1034,6 @@ static int test_zerofree_0 (void)
   }
   {
     char device[] = "/dev/sda1";
-    device[5] = devchar;
     char mountpoint[] = "/";
     int r;
     suppress_error = 0;
@@ -949,7 +1078,6 @@ static int test_hexdump_0 (void)
   /* InitBasicFS for test_hexdump_0: create ext2 on /dev/sda1 */
   {
     char device[] = "/dev/sda";
-    device[5] = devchar;
     int r;
     suppress_error = 0;
     r = guestfs_blockdev_setrw (g, device);
@@ -972,7 +1100,6 @@ static int test_hexdump_0 (void)
   }
   {
     char device[] = "/dev/sda";
-    device[5] = devchar;
     char lines_0[] = ",";
     char *lines[] = {
       lines_0,
@@ -987,7 +1114,6 @@ static int test_hexdump_0 (void)
   {
     char fstype[] = "ext2";
     char device[] = "/dev/sda1";
-    device[5] = devchar;
     int r;
     suppress_error = 0;
     r = guestfs_mkfs (g, fstype, device);
@@ -996,7 +1122,6 @@ static int test_hexdump_0 (void)
   }
   {
     char device[] = "/dev/sda1";
-    device[5] = devchar;
     char mountpoint[] = "/";
     int r;
     suppress_error = 0;
@@ -1052,7 +1177,6 @@ static int test_strings_e_0 (void)
   /* InitBasicFS for test_strings_e_0: create ext2 on /dev/sda1 */
   {
     char device[] = "/dev/sda";
-    device[5] = devchar;
     int r;
     suppress_error = 0;
     r = guestfs_blockdev_setrw (g, device);
@@ -1075,7 +1199,6 @@ static int test_strings_e_0 (void)
   }
   {
     char device[] = "/dev/sda";
-    device[5] = devchar;
     char lines_0[] = ",";
     char *lines[] = {
       lines_0,
@@ -1090,7 +1213,6 @@ static int test_strings_e_0 (void)
   {
     char fstype[] = "ext2";
     char device[] = "/dev/sda1";
-    device[5] = devchar;
     int r;
     suppress_error = 0;
     r = guestfs_mkfs (g, fstype, device);
@@ -1099,7 +1221,6 @@ static int test_strings_e_0 (void)
   }
   {
     char device[] = "/dev/sda1";
-    device[5] = devchar;
     char mountpoint[] = "/";
     int r;
     suppress_error = 0;
@@ -1181,7 +1302,6 @@ static int test_strings_0 (void)
   /* InitBasicFS for test_strings_0: create ext2 on /dev/sda1 */
   {
     char device[] = "/dev/sda";
-    device[5] = devchar;
     int r;
     suppress_error = 0;
     r = guestfs_blockdev_setrw (g, device);
@@ -1204,7 +1324,6 @@ static int test_strings_0 (void)
   }
   {
     char device[] = "/dev/sda";
-    device[5] = devchar;
     char lines_0[] = ",";
     char *lines[] = {
       lines_0,
@@ -1219,7 +1338,6 @@ static int test_strings_0 (void)
   {
     char fstype[] = "ext2";
     char device[] = "/dev/sda1";
-    device[5] = devchar;
     int r;
     suppress_error = 0;
     r = guestfs_mkfs (g, fstype, device);
@@ -1228,7 +1346,6 @@ static int test_strings_0 (void)
   }
   {
     char device[] = "/dev/sda1";
-    device[5] = devchar;
     char mountpoint[] = "/";
     int r;
     suppress_error = 0;
@@ -1311,7 +1428,6 @@ static int test_strings_1 (void)
   /* InitBasicFS for test_strings_1: create ext2 on /dev/sda1 */
   {
     char device[] = "/dev/sda";
-    device[5] = devchar;
     int r;
     suppress_error = 0;
     r = guestfs_blockdev_setrw (g, device);
@@ -1334,7 +1450,6 @@ static int test_strings_1 (void)
   }
   {
     char device[] = "/dev/sda";
-    device[5] = devchar;
     char lines_0[] = ",";
     char *lines[] = {
       lines_0,
@@ -1349,7 +1464,6 @@ static int test_strings_1 (void)
   {
     char fstype[] = "ext2";
     char device[] = "/dev/sda1";
-    device[5] = devchar;
     int r;
     suppress_error = 0;
     r = guestfs_mkfs (g, fstype, device);
@@ -1358,7 +1472,6 @@ static int test_strings_1 (void)
   }
   {
     char device[] = "/dev/sda1";
-    device[5] = devchar;
     char mountpoint[] = "/";
     int r;
     suppress_error = 0;
@@ -1416,7 +1529,6 @@ static int test_equal_0 (void)
   /* InitBasicFS for test_equal_0: create ext2 on /dev/sda1 */
   {
     char device[] = "/dev/sda";
-    device[5] = devchar;
     int r;
     suppress_error = 0;
     r = guestfs_blockdev_setrw (g, device);
@@ -1439,7 +1551,6 @@ static int test_equal_0 (void)
   }
   {
     char device[] = "/dev/sda";
-    device[5] = devchar;
     char lines_0[] = ",";
     char *lines[] = {
       lines_0,
@@ -1454,7 +1565,6 @@ static int test_equal_0 (void)
   {
     char fstype[] = "ext2";
     char device[] = "/dev/sda1";
-    device[5] = devchar;
     int r;
     suppress_error = 0;
     r = guestfs_mkfs (g, fstype, device);
@@ -1463,7 +1573,6 @@ static int test_equal_0 (void)
   }
   {
     char device[] = "/dev/sda1";
-    device[5] = devchar;
     char mountpoint[] = "/";
     int r;
     suppress_error = 0;
@@ -1527,7 +1636,6 @@ static int test_equal_1 (void)
   /* InitBasicFS for test_equal_1: create ext2 on /dev/sda1 */
   {
     char device[] = "/dev/sda";
-    device[5] = devchar;
     int r;
     suppress_error = 0;
     r = guestfs_blockdev_setrw (g, device);
@@ -1550,7 +1658,6 @@ static int test_equal_1 (void)
   }
   {
     char device[] = "/dev/sda";
-    device[5] = devchar;
     char lines_0[] = ",";
     char *lines[] = {
       lines_0,
@@ -1565,7 +1672,6 @@ static int test_equal_1 (void)
   {
     char fstype[] = "ext2";
     char device[] = "/dev/sda1";
-    device[5] = devchar;
     int r;
     suppress_error = 0;
     r = guestfs_mkfs (g, fstype, device);
@@ -1574,7 +1680,6 @@ static int test_equal_1 (void)
   }
   {
     char device[] = "/dev/sda1";
-    device[5] = devchar;
     char mountpoint[] = "/";
     int r;
     suppress_error = 0;
@@ -1638,7 +1743,6 @@ static int test_equal_2 (void)
   /* InitBasicFS for test_equal_2: create ext2 on /dev/sda1 */
   {
     char device[] = "/dev/sda";
-    device[5] = devchar;
     int r;
     suppress_error = 0;
     r = guestfs_blockdev_setrw (g, device);
@@ -1661,7 +1765,6 @@ static int test_equal_2 (void)
   }
   {
     char device[] = "/dev/sda";
-    device[5] = devchar;
     char lines_0[] = ",";
     char *lines[] = {
       lines_0,
@@ -1676,7 +1779,6 @@ static int test_equal_2 (void)
   {
     char fstype[] = "ext2";
     char device[] = "/dev/sda1";
-    device[5] = devchar;
     int r;
     suppress_error = 0;
     r = guestfs_mkfs (g, fstype, device);
@@ -1685,7 +1787,6 @@ static int test_equal_2 (void)
   }
   {
     char device[] = "/dev/sda1";
-    device[5] = devchar;
     char mountpoint[] = "/";
     int r;
     suppress_error = 0;
@@ -1727,7 +1828,6 @@ static int test_ping_daemon_0 (void)
   /* InitNone|InitEmpty for test_ping_daemon_0 */
   {
     char device[] = "/dev/sda";
-    device[5] = devchar;
     int r;
     suppress_error = 0;
     r = guestfs_blockdev_setrw (g, device);
@@ -1780,7 +1880,6 @@ static int test_dmesg_0 (void)
   /* InitNone|InitEmpty for test_dmesg_0 */
   {
     char device[] = "/dev/sda";
-    device[5] = devchar;
     int r;
     suppress_error = 0;
     r = guestfs_blockdev_setrw (g, device);
@@ -1834,7 +1933,6 @@ static int test_drop_caches_0 (void)
   /* InitNone|InitEmpty for test_drop_caches_0 */
   {
     char device[] = "/dev/sda";
-    device[5] = devchar;
     int r;
     suppress_error = 0;
     r = guestfs_blockdev_setrw (g, device);
@@ -1887,7 +1985,6 @@ static int test_mv_0 (void)
   /* InitBasicFS for test_mv_0: create ext2 on /dev/sda1 */
   {
     char device[] = "/dev/sda";
-    device[5] = devchar;
     int r;
     suppress_error = 0;
     r = guestfs_blockdev_setrw (g, device);
@@ -1910,7 +2007,6 @@ static int test_mv_0 (void)
   }
   {
     char device[] = "/dev/sda";
-    device[5] = devchar;
     char lines_0[] = ",";
     char *lines[] = {
       lines_0,
@@ -1925,7 +2021,6 @@ static int test_mv_0 (void)
   {
     char fstype[] = "ext2";
     char device[] = "/dev/sda1";
-    device[5] = devchar;
     int r;
     suppress_error = 0;
     r = guestfs_mkfs (g, fstype, device);
@@ -1934,7 +2029,6 @@ static int test_mv_0 (void)
   }
   {
     char device[] = "/dev/sda1";
-    device[5] = devchar;
     char mountpoint[] = "/";
     int r;
     suppress_error = 0;
@@ -1999,7 +2093,6 @@ static int test_mv_1 (void)
   /* InitBasicFS for test_mv_1: create ext2 on /dev/sda1 */
   {
     char device[] = "/dev/sda";
-    device[5] = devchar;
     int r;
     suppress_error = 0;
     r = guestfs_blockdev_setrw (g, device);
@@ -2022,7 +2115,6 @@ static int test_mv_1 (void)
   }
   {
     char device[] = "/dev/sda";
-    device[5] = devchar;
     char lines_0[] = ",";
     char *lines[] = {
       lines_0,
@@ -2037,7 +2129,6 @@ static int test_mv_1 (void)
   {
     char fstype[] = "ext2";
     char device[] = "/dev/sda1";
-    device[5] = devchar;
     int r;
     suppress_error = 0;
     r = guestfs_mkfs (g, fstype, device);
@@ -2046,7 +2137,6 @@ static int test_mv_1 (void)
   }
   {
     char device[] = "/dev/sda1";
-    device[5] = devchar;
     char mountpoint[] = "/";
     int r;
     suppress_error = 0;
@@ -2109,7 +2199,6 @@ static int test_cp_a_0 (void)
   /* InitBasicFS for test_cp_a_0: create ext2 on /dev/sda1 */
   {
     char device[] = "/dev/sda";
-    device[5] = devchar;
     int r;
     suppress_error = 0;
     r = guestfs_blockdev_setrw (g, device);
@@ -2132,7 +2221,6 @@ static int test_cp_a_0 (void)
   }
   {
     char device[] = "/dev/sda";
-    device[5] = devchar;
     char lines_0[] = ",";
     char *lines[] = {
       lines_0,
@@ -2147,7 +2235,6 @@ static int test_cp_a_0 (void)
   {
     char fstype[] = "ext2";
     char device[] = "/dev/sda1";
-    device[5] = devchar;
     int r;
     suppress_error = 0;
     r = guestfs_mkfs (g, fstype, device);
@@ -2156,7 +2243,6 @@ static int test_cp_a_0 (void)
   }
   {
     char device[] = "/dev/sda1";
-    device[5] = devchar;
     char mountpoint[] = "/";
     int r;
     suppress_error = 0;
@@ -2237,7 +2323,6 @@ static int test_cp_0 (void)
   /* InitBasicFS for test_cp_0: create ext2 on /dev/sda1 */
   {
     char device[] = "/dev/sda";
-    device[5] = devchar;
     int r;
     suppress_error = 0;
     r = guestfs_blockdev_setrw (g, device);
@@ -2260,7 +2345,6 @@ static int test_cp_0 (void)
   }
   {
     char device[] = "/dev/sda";
-    device[5] = devchar;
     char lines_0[] = ",";
     char *lines[] = {
       lines_0,
@@ -2275,7 +2359,6 @@ static int test_cp_0 (void)
   {
     char fstype[] = "ext2";
     char device[] = "/dev/sda1";
-    device[5] = devchar;
     int r;
     suppress_error = 0;
     r = guestfs_mkfs (g, fstype, device);
@@ -2284,7 +2367,6 @@ static int test_cp_0 (void)
   }
   {
     char device[] = "/dev/sda1";
-    device[5] = devchar;
     char mountpoint[] = "/";
     int r;
     suppress_error = 0;
@@ -2349,7 +2431,6 @@ static int test_cp_1 (void)
   /* InitBasicFS for test_cp_1: create ext2 on /dev/sda1 */
   {
     char device[] = "/dev/sda";
-    device[5] = devchar;
     int r;
     suppress_error = 0;
     r = guestfs_blockdev_setrw (g, device);
@@ -2372,7 +2453,6 @@ static int test_cp_1 (void)
   }
   {
     char device[] = "/dev/sda";
-    device[5] = devchar;
     char lines_0[] = ",";
     char *lines[] = {
       lines_0,
@@ -2387,7 +2467,6 @@ static int test_cp_1 (void)
   {
     char fstype[] = "ext2";
     char device[] = "/dev/sda1";
-    device[5] = devchar;
     int r;
     suppress_error = 0;
     r = guestfs_mkfs (g, fstype, device);
@@ -2396,7 +2475,6 @@ static int test_cp_1 (void)
   }
   {
     char device[] = "/dev/sda1";
-    device[5] = devchar;
     char mountpoint[] = "/";
     int r;
     suppress_error = 0;
@@ -2459,7 +2537,6 @@ static int test_cp_2 (void)
   /* InitBasicFS for test_cp_2: create ext2 on /dev/sda1 */
   {
     char device[] = "/dev/sda";
-    device[5] = devchar;
     int r;
     suppress_error = 0;
     r = guestfs_blockdev_setrw (g, device);
@@ -2482,7 +2559,6 @@ static int test_cp_2 (void)
   }
   {
     char device[] = "/dev/sda";
-    device[5] = devchar;
     char lines_0[] = ",";
     char *lines[] = {
       lines_0,
@@ -2497,7 +2573,6 @@ static int test_cp_2 (void)
   {
     char fstype[] = "ext2";
     char device[] = "/dev/sda1";
-    device[5] = devchar;
     int r;
     suppress_error = 0;
     r = guestfs_mkfs (g, fstype, device);
@@ -2506,7 +2581,6 @@ static int test_cp_2 (void)
   }
   {
     char device[] = "/dev/sda1";
-    device[5] = devchar;
     char mountpoint[] = "/";
     int r;
     suppress_error = 0;
@@ -2579,7 +2653,6 @@ static int test_grub_install_0 (void)
   /* InitBasicFS for test_grub_install_0: create ext2 on /dev/sda1 */
   {
     char device[] = "/dev/sda";
-    device[5] = devchar;
     int r;
     suppress_error = 0;
     r = guestfs_blockdev_setrw (g, device);
@@ -2602,7 +2675,6 @@ static int test_grub_install_0 (void)
   }
   {
     char device[] = "/dev/sda";
-    device[5] = devchar;
     char lines_0[] = ",";
     char *lines[] = {
       lines_0,
@@ -2617,7 +2689,6 @@ static int test_grub_install_0 (void)
   {
     char fstype[] = "ext2";
     char device[] = "/dev/sda1";
-    device[5] = devchar;
     int r;
     suppress_error = 0;
     r = guestfs_mkfs (g, fstype, device);
@@ -2626,7 +2697,6 @@ static int test_grub_install_0 (void)
   }
   {
     char device[] = "/dev/sda1";
-    device[5] = devchar;
     char mountpoint[] = "/";
     int r;
     suppress_error = 0;
@@ -2638,7 +2708,6 @@ static int test_grub_install_0 (void)
   {
     char root[] = "/";
     char device[] = "/dev/sda1";
-    device[5] = devchar;
     int r;
     suppress_error = 0;
     r = guestfs_grub_install (g, root, device);
@@ -2681,7 +2750,6 @@ static int test_zero_0 (void)
   /* InitBasicFS for test_zero_0: create ext2 on /dev/sda1 */
   {
     char device[] = "/dev/sda";
-    device[5] = devchar;
     int r;
     suppress_error = 0;
     r = guestfs_blockdev_setrw (g, device);
@@ -2704,7 +2772,6 @@ static int test_zero_0 (void)
   }
   {
     char device[] = "/dev/sda";
-    device[5] = devchar;
     char lines_0[] = ",";
     char *lines[] = {
       lines_0,
@@ -2719,7 +2786,6 @@ static int test_zero_0 (void)
   {
     char fstype[] = "ext2";
     char device[] = "/dev/sda1";
-    device[5] = devchar;
     int r;
     suppress_error = 0;
     r = guestfs_mkfs (g, fstype, device);
@@ -2728,7 +2794,6 @@ static int test_zero_0 (void)
   }
   {
     char device[] = "/dev/sda1";
-    device[5] = devchar;
     char mountpoint[] = "/";
     int r;
     suppress_error = 0;
@@ -2740,7 +2805,6 @@ static int test_zero_0 (void)
   char expected[] = "data";
   {
     char pathordevice[] = "/dev/sda1";
-    pathordevice[5] = devchar;
     int r;
     suppress_error = 0;
     r = guestfs_umount (g, pathordevice);
@@ -2749,7 +2813,6 @@ static int test_zero_0 (void)
   }
   {
     char device[] = "/dev/sda1";
-    device[5] = devchar;
     int r;
     suppress_error = 0;
     r = guestfs_zero (g, device);
@@ -2758,7 +2821,6 @@ static int test_zero_0 (void)
   }
   {
     char path[] = "/dev/sda1";
-    path[5] = devchar;
     char *r;
     suppress_error = 0;
     r = guestfs_file (g, path);
@@ -2794,7 +2856,6 @@ static int test_fsck_0 (void)
   /* InitBasicFS for test_fsck_0: create ext2 on /dev/sda1 */
   {
     char device[] = "/dev/sda";
-    device[5] = devchar;
     int r;
     suppress_error = 0;
     r = guestfs_blockdev_setrw (g, device);
@@ -2817,7 +2878,6 @@ static int test_fsck_0 (void)
   }
   {
     char device[] = "/dev/sda";
-    device[5] = devchar;
     char lines_0[] = ",";
     char *lines[] = {
       lines_0,
@@ -2832,7 +2892,6 @@ static int test_fsck_0 (void)
   {
     char fstype[] = "ext2";
     char device[] = "/dev/sda1";
-    device[5] = devchar;
     int r;
     suppress_error = 0;
     r = guestfs_mkfs (g, fstype, device);
@@ -2841,7 +2900,6 @@ static int test_fsck_0 (void)
   }
   {
     char device[] = "/dev/sda1";
-    device[5] = devchar;
     char mountpoint[] = "/";
     int r;
     suppress_error = 0;
@@ -2852,7 +2910,6 @@ static int test_fsck_0 (void)
   /* TestOutputInt for fsck (0) */
   {
     char pathordevice[] = "/dev/sda1";
-    pathordevice[5] = devchar;
     int r;
     suppress_error = 0;
     r = guestfs_umount (g, pathordevice);
@@ -2862,7 +2919,6 @@ static int test_fsck_0 (void)
   {
     char fstype[] = "ext2";
     char device[] = "/dev/sda1";
-    device[5] = devchar;
     int r;
     suppress_error = 0;
     r = guestfs_fsck (g, fstype, device);
@@ -2897,7 +2953,6 @@ static int test_fsck_1 (void)
   /* InitBasicFS for test_fsck_1: create ext2 on /dev/sda1 */
   {
     char device[] = "/dev/sda";
-    device[5] = devchar;
     int r;
     suppress_error = 0;
     r = guestfs_blockdev_setrw (g, device);
@@ -2920,7 +2975,6 @@ static int test_fsck_1 (void)
   }
   {
     char device[] = "/dev/sda";
-    device[5] = devchar;
     char lines_0[] = ",";
     char *lines[] = {
       lines_0,
@@ -2935,7 +2989,6 @@ static int test_fsck_1 (void)
   {
     char fstype[] = "ext2";
     char device[] = "/dev/sda1";
-    device[5] = devchar;
     int r;
     suppress_error = 0;
     r = guestfs_mkfs (g, fstype, device);
@@ -2944,7 +2997,6 @@ static int test_fsck_1 (void)
   }
   {
     char device[] = "/dev/sda1";
-    device[5] = devchar;
     char mountpoint[] = "/";
     int r;
     suppress_error = 0;
@@ -2955,7 +3007,6 @@ static int test_fsck_1 (void)
   /* TestOutputInt for fsck (1) */
   {
     char pathordevice[] = "/dev/sda1";
-    pathordevice[5] = devchar;
     int r;
     suppress_error = 0;
     r = guestfs_umount (g, pathordevice);
@@ -2964,7 +3015,6 @@ static int test_fsck_1 (void)
   }
   {
     char device[] = "/dev/sda1";
-    device[5] = devchar;
     int r;
     suppress_error = 0;
     r = guestfs_zero (g, device);
@@ -2974,7 +3024,6 @@ static int test_fsck_1 (void)
   {
     char fstype[] = "ext2";
     char device[] = "/dev/sda1";
-    device[5] = devchar;
     int r;
     suppress_error = 0;
     r = guestfs_fsck (g, fstype, device);
@@ -3009,7 +3058,6 @@ static int test_set_e2uuid_0 (void)
   /* InitBasicFS for test_set_e2uuid_0: create ext2 on /dev/sda1 */
   {
     char device[] = "/dev/sda";
-    device[5] = devchar;
     int r;
     suppress_error = 0;
     r = guestfs_blockdev_setrw (g, device);
@@ -3032,7 +3080,6 @@ static int test_set_e2uuid_0 (void)
   }
   {
     char device[] = "/dev/sda";
-    device[5] = devchar;
     char lines_0[] = ",";
     char *lines[] = {
       lines_0,
@@ -3047,7 +3094,6 @@ static int test_set_e2uuid_0 (void)
   {
     char fstype[] = "ext2";
     char device[] = "/dev/sda1";
-    device[5] = devchar;
     int r;
     suppress_error = 0;
     r = guestfs_mkfs (g, fstype, device);
@@ -3056,7 +3102,6 @@ static int test_set_e2uuid_0 (void)
   }
   {
     char device[] = "/dev/sda1";
-    device[5] = devchar;
     char mountpoint[] = "/";
     int r;
     suppress_error = 0;
@@ -3068,7 +3113,6 @@ static int test_set_e2uuid_0 (void)
   char expected[] = "a3a61220-882b-4f61-89f4-cf24dcc7297d";
   {
     char device[] = "/dev/sda1";
-    device[5] = devchar;
     char uuid[] = "a3a61220-882b-4f61-89f4-cf24dcc7297d";
     int r;
     suppress_error = 0;
@@ -3078,7 +3122,6 @@ static int test_set_e2uuid_0 (void)
   }
   {
     char device[] = "/dev/sda1";
-    device[5] = devchar;
     char *r;
     suppress_error = 0;
     r = guestfs_get_e2uuid (g, device);
@@ -3114,7 +3157,6 @@ static int test_set_e2uuid_1 (void)
   /* InitBasicFS for test_set_e2uuid_1: create ext2 on /dev/sda1 */
   {
     char device[] = "/dev/sda";
-    device[5] = devchar;
     int r;
     suppress_error = 0;
     r = guestfs_blockdev_setrw (g, device);
@@ -3137,7 +3179,6 @@ static int test_set_e2uuid_1 (void)
   }
   {
     char device[] = "/dev/sda";
-    device[5] = devchar;
     char lines_0[] = ",";
     char *lines[] = {
       lines_0,
@@ -3152,7 +3193,6 @@ static int test_set_e2uuid_1 (void)
   {
     char fstype[] = "ext2";
     char device[] = "/dev/sda1";
-    device[5] = devchar;
     int r;
     suppress_error = 0;
     r = guestfs_mkfs (g, fstype, device);
@@ -3161,7 +3201,6 @@ static int test_set_e2uuid_1 (void)
   }
   {
     char device[] = "/dev/sda1";
-    device[5] = devchar;
     char mountpoint[] = "/";
     int r;
     suppress_error = 0;
@@ -3173,7 +3212,6 @@ static int test_set_e2uuid_1 (void)
   char expected[] = "";
   {
     char device[] = "/dev/sda1";
-    device[5] = devchar;
     char uuid[] = "clear";
     int r;
     suppress_error = 0;
@@ -3183,7 +3221,6 @@ static int test_set_e2uuid_1 (void)
   }
   {
     char device[] = "/dev/sda1";
-    device[5] = devchar;
     char *r;
     suppress_error = 0;
     r = guestfs_get_e2uuid (g, device);
@@ -3219,7 +3256,6 @@ static int test_set_e2uuid_2 (void)
   /* InitBasicFS for test_set_e2uuid_2: create ext2 on /dev/sda1 */
   {
     char device[] = "/dev/sda";
-    device[5] = devchar;
     int r;
     suppress_error = 0;
     r = guestfs_blockdev_setrw (g, device);
@@ -3242,7 +3278,6 @@ static int test_set_e2uuid_2 (void)
   }
   {
     char device[] = "/dev/sda";
-    device[5] = devchar;
     char lines_0[] = ",";
     char *lines[] = {
       lines_0,
@@ -3257,7 +3292,6 @@ static int test_set_e2uuid_2 (void)
   {
     char fstype[] = "ext2";
     char device[] = "/dev/sda1";
-    device[5] = devchar;
     int r;
     suppress_error = 0;
     r = guestfs_mkfs (g, fstype, device);
@@ -3266,7 +3300,6 @@ static int test_set_e2uuid_2 (void)
   }
   {
     char device[] = "/dev/sda1";
-    device[5] = devchar;
     char mountpoint[] = "/";
     int r;
     suppress_error = 0;
@@ -3277,7 +3310,6 @@ static int test_set_e2uuid_2 (void)
   /* TestRun for set_e2uuid (2) */
   {
     char device[] = "/dev/sda1";
-    device[5] = devchar;
     char uuid[] = "random";
     int r;
     suppress_error = 0;
@@ -3309,7 +3341,6 @@ static int test_set_e2uuid_3 (void)
   /* InitBasicFS for test_set_e2uuid_3: create ext2 on /dev/sda1 */
   {
     char device[] = "/dev/sda";
-    device[5] = devchar;
     int r;
     suppress_error = 0;
     r = guestfs_blockdev_setrw (g, device);
@@ -3332,7 +3363,6 @@ static int test_set_e2uuid_3 (void)
   }
   {
     char device[] = "/dev/sda";
-    device[5] = devchar;
     char lines_0[] = ",";
     char *lines[] = {
       lines_0,
@@ -3347,7 +3377,6 @@ static int test_set_e2uuid_3 (void)
   {
     char fstype[] = "ext2";
     char device[] = "/dev/sda1";
-    device[5] = devchar;
     int r;
     suppress_error = 0;
     r = guestfs_mkfs (g, fstype, device);
@@ -3356,7 +3385,6 @@ static int test_set_e2uuid_3 (void)
   }
   {
     char device[] = "/dev/sda1";
-    device[5] = devchar;
     char mountpoint[] = "/";
     int r;
     suppress_error = 0;
@@ -3367,7 +3395,6 @@ static int test_set_e2uuid_3 (void)
   /* TestRun for set_e2uuid (3) */
   {
     char device[] = "/dev/sda1";
-    device[5] = devchar;
     char uuid[] = "time";
     int r;
     suppress_error = 0;
@@ -3399,7 +3426,6 @@ static int test_set_e2label_0 (void)
   /* InitBasicFS for test_set_e2label_0: create ext2 on /dev/sda1 */
   {
     char device[] = "/dev/sda";
-    device[5] = devchar;
     int r;
     suppress_error = 0;
     r = guestfs_blockdev_setrw (g, device);
@@ -3422,7 +3448,6 @@ static int test_set_e2label_0 (void)
   }
   {
     char device[] = "/dev/sda";
-    device[5] = devchar;
     char lines_0[] = ",";
     char *lines[] = {
       lines_0,
@@ -3437,7 +3462,6 @@ static int test_set_e2label_0 (void)
   {
     char fstype[] = "ext2";
     char device[] = "/dev/sda1";
-    device[5] = devchar;
     int r;
     suppress_error = 0;
     r = guestfs_mkfs (g, fstype, device);
@@ -3446,7 +3470,6 @@ static int test_set_e2label_0 (void)
   }
   {
     char device[] = "/dev/sda1";
-    device[5] = devchar;
     char mountpoint[] = "/";
     int r;
     suppress_error = 0;
@@ -3458,7 +3481,6 @@ static int test_set_e2label_0 (void)
   char expected[] = "testlabel";
   {
     char device[] = "/dev/sda1";
-    device[5] = devchar;
     char label[] = "testlabel";
     int r;
     suppress_error = 0;
@@ -3468,7 +3490,6 @@ static int test_set_e2label_0 (void)
   }
   {
     char device[] = "/dev/sda1";
-    device[5] = devchar;
     char *r;
     suppress_error = 0;
     r = guestfs_get_e2label (g, device);
@@ -3504,7 +3525,6 @@ static int test_pvremove_0 (void)
   /* InitNone|InitEmpty for test_pvremove_0 */
   {
     char device[] = "/dev/sda";
-    device[5] = devchar;
     int r;
     suppress_error = 0;
     r = guestfs_blockdev_setrw (g, device);
@@ -3525,10 +3545,9 @@ static int test_pvremove_0 (void)
     if (r == -1)
       return -1;
   }
-  /* TestOutputList for pvremove (0) */
+  /* TestOutputListOfDevices for pvremove (0) */
   {
     char device[] = "/dev/sda";
-    device[5] = devchar;
     char lines_0[] = ",";
     char *lines[] = {
       lines_0,
@@ -3542,7 +3561,6 @@ static int test_pvremove_0 (void)
   }
   {
     char device[] = "/dev/sda1";
-    device[5] = devchar;
     int r;
     suppress_error = 0;
     r = guestfs_pvcreate (g, device);
@@ -3552,7 +3570,6 @@ static int test_pvremove_0 (void)
   {
     char volgroup[] = "VG";
     char physvols_0[] = "/dev/sda1";
-    physvols_0[5] = devchar;
     char *physvols[] = {
       physvols_0,
       NULL
@@ -3591,7 +3608,6 @@ static int test_pvremove_0 (void)
   }
   {
     char device[] = "/dev/sda1";
-    device[5] = devchar;
     int r;
     suppress_error = 0;
     r = guestfs_pvremove (g, device);
@@ -3638,7 +3654,6 @@ static int test_pvremove_1 (void)
   /* InitNone|InitEmpty for test_pvremove_1 */
   {
     char device[] = "/dev/sda";
-    device[5] = devchar;
     int r;
     suppress_error = 0;
     r = guestfs_blockdev_setrw (g, device);
@@ -3659,10 +3674,9 @@ static int test_pvremove_1 (void)
     if (r == -1)
       return -1;
   }
-  /* TestOutputList for pvremove (1) */
+  /* TestOutputListOfDevices for pvremove (1) */
   {
     char device[] = "/dev/sda";
-    device[5] = devchar;
     char lines_0[] = ",";
     char *lines[] = {
       lines_0,
@@ -3676,7 +3690,6 @@ static int test_pvremove_1 (void)
   }
   {
     char device[] = "/dev/sda1";
-    device[5] = devchar;
     int r;
     suppress_error = 0;
     r = guestfs_pvcreate (g, device);
@@ -3686,7 +3699,6 @@ static int test_pvremove_1 (void)
   {
     char volgroup[] = "VG";
     char physvols_0[] = "/dev/sda1";
-    physvols_0[5] = devchar;
     char *physvols[] = {
       physvols_0,
       NULL
@@ -3725,7 +3737,6 @@ static int test_pvremove_1 (void)
   }
   {
     char device[] = "/dev/sda1";
-    device[5] = devchar;
     int r;
     suppress_error = 0;
     r = guestfs_pvremove (g, device);
@@ -3772,7 +3783,6 @@ static int test_pvremove_2 (void)
   /* InitNone|InitEmpty for test_pvremove_2 */
   {
     char device[] = "/dev/sda";
-    device[5] = devchar;
     int r;
     suppress_error = 0;
     r = guestfs_blockdev_setrw (g, device);
@@ -3793,10 +3803,9 @@ static int test_pvremove_2 (void)
     if (r == -1)
       return -1;
   }
-  /* TestOutputList for pvremove (2) */
+  /* TestOutputListOfDevices for pvremove (2) */
   {
     char device[] = "/dev/sda";
-    device[5] = devchar;
     char lines_0[] = ",";
     char *lines[] = {
       lines_0,
@@ -3810,7 +3819,6 @@ static int test_pvremove_2 (void)
   }
   {
     char device[] = "/dev/sda1";
-    device[5] = devchar;
     int r;
     suppress_error = 0;
     r = guestfs_pvcreate (g, device);
@@ -3820,7 +3828,6 @@ static int test_pvremove_2 (void)
   {
     char volgroup[] = "VG";
     char physvols_0[] = "/dev/sda1";
-    physvols_0[5] = devchar;
     char *physvols[] = {
       physvols_0,
       NULL
@@ -3859,7 +3866,6 @@ static int test_pvremove_2 (void)
   }
   {
     char device[] = "/dev/sda1";
-    device[5] = devchar;
     int r;
     suppress_error = 0;
     r = guestfs_pvremove (g, device);
@@ -3906,7 +3912,6 @@ static int test_vgremove_0 (void)
   /* InitNone|InitEmpty for test_vgremove_0 */
   {
     char device[] = "/dev/sda";
-    device[5] = devchar;
     int r;
     suppress_error = 0;
     r = guestfs_blockdev_setrw (g, device);
@@ -3930,7 +3935,6 @@ static int test_vgremove_0 (void)
   /* TestOutputList for vgremove (0) */
   {
     char device[] = "/dev/sda";
-    device[5] = devchar;
     char lines_0[] = ",";
     char *lines[] = {
       lines_0,
@@ -3944,7 +3948,6 @@ static int test_vgremove_0 (void)
   }
   {
     char device[] = "/dev/sda1";
-    device[5] = devchar;
     int r;
     suppress_error = 0;
     r = guestfs_pvcreate (g, device);
@@ -3954,7 +3957,6 @@ static int test_vgremove_0 (void)
   {
     char volgroup[] = "VG";
     char physvols_0[] = "/dev/sda1";
-    physvols_0[5] = devchar;
     char *physvols[] = {
       physvols_0,
       NULL
@@ -4031,7 +4033,6 @@ static int test_vgremove_1 (void)
   /* InitNone|InitEmpty for test_vgremove_1 */
   {
     char device[] = "/dev/sda";
-    device[5] = devchar;
     int r;
     suppress_error = 0;
     r = guestfs_blockdev_setrw (g, device);
@@ -4055,7 +4056,6 @@ static int test_vgremove_1 (void)
   /* TestOutputList for vgremove (1) */
   {
     char device[] = "/dev/sda";
-    device[5] = devchar;
     char lines_0[] = ",";
     char *lines[] = {
       lines_0,
@@ -4069,7 +4069,6 @@ static int test_vgremove_1 (void)
   }
   {
     char device[] = "/dev/sda1";
-    device[5] = devchar;
     int r;
     suppress_error = 0;
     r = guestfs_pvcreate (g, device);
@@ -4079,7 +4078,6 @@ static int test_vgremove_1 (void)
   {
     char volgroup[] = "VG";
     char physvols_0[] = "/dev/sda1";
-    physvols_0[5] = devchar;
     char *physvols[] = {
       physvols_0,
       NULL
@@ -4156,7 +4154,6 @@ static int test_lvremove_0 (void)
   /* InitNone|InitEmpty for test_lvremove_0 */
   {
     char device[] = "/dev/sda";
-    device[5] = devchar;
     int r;
     suppress_error = 0;
     r = guestfs_blockdev_setrw (g, device);
@@ -4180,7 +4177,6 @@ static int test_lvremove_0 (void)
   /* TestOutputList for lvremove (0) */
   {
     char device[] = "/dev/sda";
-    device[5] = devchar;
     char lines_0[] = ",";
     char *lines[] = {
       lines_0,
@@ -4194,7 +4190,6 @@ static int test_lvremove_0 (void)
   }
   {
     char device[] = "/dev/sda1";
-    device[5] = devchar;
     int r;
     suppress_error = 0;
     r = guestfs_pvcreate (g, device);
@@ -4204,7 +4199,6 @@ static int test_lvremove_0 (void)
   {
     char volgroup[] = "VG";
     char physvols_0[] = "/dev/sda1";
-    physvols_0[5] = devchar;
     char *physvols[] = {
       physvols_0,
       NULL
@@ -4293,7 +4287,6 @@ static int test_lvremove_1 (void)
   /* InitNone|InitEmpty for test_lvremove_1 */
   {
     char device[] = "/dev/sda";
-    device[5] = devchar;
     int r;
     suppress_error = 0;
     r = guestfs_blockdev_setrw (g, device);
@@ -4317,7 +4310,6 @@ static int test_lvremove_1 (void)
   /* TestOutputList for lvremove (1) */
   {
     char device[] = "/dev/sda";
-    device[5] = devchar;
     char lines_0[] = ",";
     char *lines[] = {
       lines_0,
@@ -4331,7 +4323,6 @@ static int test_lvremove_1 (void)
   }
   {
     char device[] = "/dev/sda1";
-    device[5] = devchar;
     int r;
     suppress_error = 0;
     r = guestfs_pvcreate (g, device);
@@ -4341,7 +4332,6 @@ static int test_lvremove_1 (void)
   {
     char volgroup[] = "VG";
     char physvols_0[] = "/dev/sda1";
-    physvols_0[5] = devchar;
     char *physvols[] = {
       physvols_0,
       NULL
@@ -4418,7 +4408,6 @@ static int test_lvremove_2 (void)
   /* InitNone|InitEmpty for test_lvremove_2 */
   {
     char device[] = "/dev/sda";
-    device[5] = devchar;
     int r;
     suppress_error = 0;
     r = guestfs_blockdev_setrw (g, device);
@@ -4442,7 +4431,6 @@ static int test_lvremove_2 (void)
   /* TestOutputList for lvremove (2) */
   {
     char device[] = "/dev/sda";
-    device[5] = devchar;
     char lines_0[] = ",";
     char *lines[] = {
       lines_0,
@@ -4456,7 +4444,6 @@ static int test_lvremove_2 (void)
   }
   {
     char device[] = "/dev/sda1";
-    device[5] = devchar;
     int r;
     suppress_error = 0;
     r = guestfs_pvcreate (g, device);
@@ -4466,7 +4453,6 @@ static int test_lvremove_2 (void)
   {
     char volgroup[] = "VG";
     char physvols_0[] = "/dev/sda1";
-    physvols_0[5] = devchar;
     char *physvols[] = {
       physvols_0,
       NULL
@@ -4555,7 +4541,6 @@ static int test_mount_ro_0 (void)
   /* InitBasicFS for test_mount_ro_0: create ext2 on /dev/sda1 */
   {
     char device[] = "/dev/sda";
-    device[5] = devchar;
     int r;
     suppress_error = 0;
     r = guestfs_blockdev_setrw (g, device);
@@ -4578,7 +4563,6 @@ static int test_mount_ro_0 (void)
   }
   {
     char device[] = "/dev/sda";
-    device[5] = devchar;
     char lines_0[] = ",";
     char *lines[] = {
       lines_0,
@@ -4593,7 +4577,6 @@ static int test_mount_ro_0 (void)
   {
     char fstype[] = "ext2";
     char device[] = "/dev/sda1";
-    device[5] = devchar;
     int r;
     suppress_error = 0;
     r = guestfs_mkfs (g, fstype, device);
@@ -4602,7 +4585,6 @@ static int test_mount_ro_0 (void)
   }
   {
     char device[] = "/dev/sda1";
-    device[5] = devchar;
     char mountpoint[] = "/";
     int r;
     suppress_error = 0;
@@ -4621,7 +4603,6 @@ static int test_mount_ro_0 (void)
   }
   {
     char device[] = "/dev/sda1";
-    device[5] = devchar;
     char mountpoint[] = "/";
     int r;
     suppress_error = 0;
@@ -4661,7 +4642,6 @@ static int test_mount_ro_1 (void)
   /* InitBasicFS for test_mount_ro_1: create ext2 on /dev/sda1 */
   {
     char device[] = "/dev/sda";
-    device[5] = devchar;
     int r;
     suppress_error = 0;
     r = guestfs_blockdev_setrw (g, device);
@@ -4684,7 +4664,6 @@ static int test_mount_ro_1 (void)
   }
   {
     char device[] = "/dev/sda";
-    device[5] = devchar;
     char lines_0[] = ",";
     char *lines[] = {
       lines_0,
@@ -4699,7 +4678,6 @@ static int test_mount_ro_1 (void)
   {
     char fstype[] = "ext2";
     char device[] = "/dev/sda1";
-    device[5] = devchar;
     int r;
     suppress_error = 0;
     r = guestfs_mkfs (g, fstype, device);
@@ -4708,7 +4686,6 @@ static int test_mount_ro_1 (void)
   }
   {
     char device[] = "/dev/sda1";
-    device[5] = devchar;
     char mountpoint[] = "/";
     int r;
     suppress_error = 0;
@@ -4737,7 +4714,6 @@ static int test_mount_ro_1 (void)
   }
   {
     char device[] = "/dev/sda1";
-    device[5] = devchar;
     char mountpoint[] = "/";
     int r;
     suppress_error = 0;
@@ -4782,7 +4758,6 @@ static int test_tgz_in_0 (void)
   /* InitBasicFS for test_tgz_in_0: create ext2 on /dev/sda1 */
   {
     char device[] = "/dev/sda";
-    device[5] = devchar;
     int r;
     suppress_error = 0;
     r = guestfs_blockdev_setrw (g, device);
@@ -4805,7 +4780,6 @@ static int test_tgz_in_0 (void)
   }
   {
     char device[] = "/dev/sda";
-    device[5] = devchar;
     char lines_0[] = ",";
     char *lines[] = {
       lines_0,
@@ -4820,7 +4794,6 @@ static int test_tgz_in_0 (void)
   {
     char fstype[] = "ext2";
     char device[] = "/dev/sda1";
-    device[5] = devchar;
     int r;
     suppress_error = 0;
     r = guestfs_mkfs (g, fstype, device);
@@ -4829,7 +4802,6 @@ static int test_tgz_in_0 (void)
   }
   {
     char device[] = "/dev/sda1";
-    device[5] = devchar;
     char mountpoint[] = "/";
     int r;
     suppress_error = 0;
@@ -4884,7 +4856,6 @@ static int test_tar_in_0 (void)
   /* InitBasicFS for test_tar_in_0: create ext2 on /dev/sda1 */
   {
     char device[] = "/dev/sda";
-    device[5] = devchar;
     int r;
     suppress_error = 0;
     r = guestfs_blockdev_setrw (g, device);
@@ -4907,7 +4878,6 @@ static int test_tar_in_0 (void)
   }
   {
     char device[] = "/dev/sda";
-    device[5] = devchar;
     char lines_0[] = ",";
     char *lines[] = {
       lines_0,
@@ -4922,7 +4892,6 @@ static int test_tar_in_0 (void)
   {
     char fstype[] = "ext2";
     char device[] = "/dev/sda1";
-    device[5] = devchar;
     int r;
     suppress_error = 0;
     r = guestfs_mkfs (g, fstype, device);
@@ -4931,7 +4900,6 @@ static int test_tar_in_0 (void)
   }
   {
     char device[] = "/dev/sda1";
-    device[5] = devchar;
     char mountpoint[] = "/";
     int r;
     suppress_error = 0;
@@ -4986,7 +4954,6 @@ static int test_checksum_0 (void)
   /* InitBasicFS for test_checksum_0: create ext2 on /dev/sda1 */
   {
     char device[] = "/dev/sda";
-    device[5] = devchar;
     int r;
     suppress_error = 0;
     r = guestfs_blockdev_setrw (g, device);
@@ -5009,7 +4976,6 @@ static int test_checksum_0 (void)
   }
   {
     char device[] = "/dev/sda";
-    device[5] = devchar;
     char lines_0[] = ",";
     char *lines[] = {
       lines_0,
@@ -5024,7 +4990,6 @@ static int test_checksum_0 (void)
   {
     char fstype[] = "ext2";
     char device[] = "/dev/sda1";
-    device[5] = devchar;
     int r;
     suppress_error = 0;
     r = guestfs_mkfs (g, fstype, device);
@@ -5033,7 +4998,6 @@ static int test_checksum_0 (void)
   }
   {
     char device[] = "/dev/sda1";
-    device[5] = devchar;
     char mountpoint[] = "/";
     int r;
     suppress_error = 0;
@@ -5090,7 +5054,6 @@ static int test_checksum_1 (void)
   /* InitBasicFS for test_checksum_1: create ext2 on /dev/sda1 */
   {
     char device[] = "/dev/sda";
-    device[5] = devchar;
     int r;
     suppress_error = 0;
     r = guestfs_blockdev_setrw (g, device);
@@ -5113,7 +5076,6 @@ static int test_checksum_1 (void)
   }
   {
     char device[] = "/dev/sda";
-    device[5] = devchar;
     char lines_0[] = ",";
     char *lines[] = {
       lines_0,
@@ -5128,7 +5090,6 @@ static int test_checksum_1 (void)
   {
     char fstype[] = "ext2";
     char device[] = "/dev/sda1";
-    device[5] = devchar;
     int r;
     suppress_error = 0;
     r = guestfs_mkfs (g, fstype, device);
@@ -5137,7 +5098,6 @@ static int test_checksum_1 (void)
   }
   {
     char device[] = "/dev/sda1";
-    device[5] = devchar;
     char mountpoint[] = "/";
     int r;
     suppress_error = 0;
@@ -5180,7 +5140,6 @@ static int test_checksum_2 (void)
   /* InitBasicFS for test_checksum_2: create ext2 on /dev/sda1 */
   {
     char device[] = "/dev/sda";
-    device[5] = devchar;
     int r;
     suppress_error = 0;
     r = guestfs_blockdev_setrw (g, device);
@@ -5203,7 +5162,6 @@ static int test_checksum_2 (void)
   }
   {
     char device[] = "/dev/sda";
-    device[5] = devchar;
     char lines_0[] = ",";
     char *lines[] = {
       lines_0,
@@ -5218,7 +5176,6 @@ static int test_checksum_2 (void)
   {
     char fstype[] = "ext2";
     char device[] = "/dev/sda1";
-    device[5] = devchar;
     int r;
     suppress_error = 0;
     r = guestfs_mkfs (g, fstype, device);
@@ -5227,7 +5184,6 @@ static int test_checksum_2 (void)
   }
   {
     char device[] = "/dev/sda1";
-    device[5] = devchar;
     char mountpoint[] = "/";
     int r;
     suppress_error = 0;
@@ -5284,7 +5240,6 @@ static int test_checksum_3 (void)
   /* InitBasicFS for test_checksum_3: create ext2 on /dev/sda1 */
   {
     char device[] = "/dev/sda";
-    device[5] = devchar;
     int r;
     suppress_error = 0;
     r = guestfs_blockdev_setrw (g, device);
@@ -5307,7 +5262,6 @@ static int test_checksum_3 (void)
   }
   {
     char device[] = "/dev/sda";
-    device[5] = devchar;
     char lines_0[] = ",";
     char *lines[] = {
       lines_0,
@@ -5322,7 +5276,6 @@ static int test_checksum_3 (void)
   {
     char fstype[] = "ext2";
     char device[] = "/dev/sda1";
-    device[5] = devchar;
     int r;
     suppress_error = 0;
     r = guestfs_mkfs (g, fstype, device);
@@ -5331,7 +5284,6 @@ static int test_checksum_3 (void)
   }
   {
     char device[] = "/dev/sda1";
-    device[5] = devchar;
     char mountpoint[] = "/";
     int r;
     suppress_error = 0;
@@ -5388,7 +5340,6 @@ static int test_checksum_4 (void)
   /* InitBasicFS for test_checksum_4: create ext2 on /dev/sda1 */
   {
     char device[] = "/dev/sda";
-    device[5] = devchar;
     int r;
     suppress_error = 0;
     r = guestfs_blockdev_setrw (g, device);
@@ -5411,7 +5362,6 @@ static int test_checksum_4 (void)
   }
   {
     char device[] = "/dev/sda";
-    device[5] = devchar;
     char lines_0[] = ",";
     char *lines[] = {
       lines_0,
@@ -5426,7 +5376,6 @@ static int test_checksum_4 (void)
   {
     char fstype[] = "ext2";
     char device[] = "/dev/sda1";
-    device[5] = devchar;
     int r;
     suppress_error = 0;
     r = guestfs_mkfs (g, fstype, device);
@@ -5435,7 +5384,6 @@ static int test_checksum_4 (void)
   }
   {
     char device[] = "/dev/sda1";
-    device[5] = devchar;
     char mountpoint[] = "/";
     int r;
     suppress_error = 0;
@@ -5492,7 +5440,6 @@ static int test_checksum_5 (void)
   /* InitBasicFS for test_checksum_5: create ext2 on /dev/sda1 */
   {
     char device[] = "/dev/sda";
-    device[5] = devchar;
     int r;
     suppress_error = 0;
     r = guestfs_blockdev_setrw (g, device);
@@ -5515,7 +5462,6 @@ static int test_checksum_5 (void)
   }
   {
     char device[] = "/dev/sda";
-    device[5] = devchar;
     char lines_0[] = ",";
     char *lines[] = {
       lines_0,
@@ -5530,7 +5476,6 @@ static int test_checksum_5 (void)
   {
     char fstype[] = "ext2";
     char device[] = "/dev/sda1";
-    device[5] = devchar;
     int r;
     suppress_error = 0;
     r = guestfs_mkfs (g, fstype, device);
@@ -5539,7 +5484,6 @@ static int test_checksum_5 (void)
   }
   {
     char device[] = "/dev/sda1";
-    device[5] = devchar;
     char mountpoint[] = "/";
     int r;
     suppress_error = 0;
@@ -5596,7 +5540,6 @@ static int test_checksum_6 (void)
   /* InitBasicFS for test_checksum_6: create ext2 on /dev/sda1 */
   {
     char device[] = "/dev/sda";
-    device[5] = devchar;
     int r;
     suppress_error = 0;
     r = guestfs_blockdev_setrw (g, device);
@@ -5619,7 +5562,6 @@ static int test_checksum_6 (void)
   }
   {
     char device[] = "/dev/sda";
-    device[5] = devchar;
     char lines_0[] = ",";
     char *lines[] = {
       lines_0,
@@ -5634,7 +5576,6 @@ static int test_checksum_6 (void)
   {
     char fstype[] = "ext2";
     char device[] = "/dev/sda1";
-    device[5] = devchar;
     int r;
     suppress_error = 0;
     r = guestfs_mkfs (g, fstype, device);
@@ -5643,7 +5584,6 @@ static int test_checksum_6 (void)
   }
   {
     char device[] = "/dev/sda1";
-    device[5] = devchar;
     char mountpoint[] = "/";
     int r;
     suppress_error = 0;
@@ -5700,7 +5640,6 @@ static int test_checksum_7 (void)
   /* InitBasicFS for test_checksum_7: create ext2 on /dev/sda1 */
   {
     char device[] = "/dev/sda";
-    device[5] = devchar;
     int r;
     suppress_error = 0;
     r = guestfs_blockdev_setrw (g, device);
@@ -5723,7 +5662,6 @@ static int test_checksum_7 (void)
   }
   {
     char device[] = "/dev/sda";
-    device[5] = devchar;
     char lines_0[] = ",";
     char *lines[] = {
       lines_0,
@@ -5738,7 +5676,6 @@ static int test_checksum_7 (void)
   {
     char fstype[] = "ext2";
     char device[] = "/dev/sda1";
-    device[5] = devchar;
     int r;
     suppress_error = 0;
     r = guestfs_mkfs (g, fstype, device);
@@ -5747,7 +5684,6 @@ static int test_checksum_7 (void)
   }
   {
     char device[] = "/dev/sda1";
-    device[5] = devchar;
     char mountpoint[] = "/";
     int r;
     suppress_error = 0;
@@ -5804,7 +5740,6 @@ static int test_checksum_8 (void)
   /* InitBasicFS for test_checksum_8: create ext2 on /dev/sda1 */
   {
     char device[] = "/dev/sda";
-    device[5] = devchar;
     int r;
     suppress_error = 0;
     r = guestfs_blockdev_setrw (g, device);
@@ -5827,7 +5762,6 @@ static int test_checksum_8 (void)
   }
   {
     char device[] = "/dev/sda";
-    device[5] = devchar;
     char lines_0[] = ",";
     char *lines[] = {
       lines_0,
@@ -5842,7 +5776,6 @@ static int test_checksum_8 (void)
   {
     char fstype[] = "ext2";
     char device[] = "/dev/sda1";
-    device[5] = devchar;
     int r;
     suppress_error = 0;
     r = guestfs_mkfs (g, fstype, device);
@@ -5851,7 +5784,6 @@ static int test_checksum_8 (void)
   }
   {
     char device[] = "/dev/sda1";
-    device[5] = devchar;
     char mountpoint[] = "/";
     int r;
     suppress_error = 0;
@@ -5862,12 +5794,13 @@ static int test_checksum_8 (void)
   /* TestOutput for checksum (8) */
   char expected[] = "46d6ca27ee07cdc6fa99c2e138cc522c";
   {
+    char options[] = "ro";
+    char vfstype[] = "squashfs";
     char device[] = "/dev/sdd";
-    device[5] = devchar;
     char mountpoint[] = "/";
     int r;
     suppress_error = 0;
-    r = guestfs_mount (g, device, mountpoint);
+    r = guestfs_mount_vfs (g, options, vfstype, device, mountpoint);
     if (r == -1)
       return -1;
   }
@@ -5909,7 +5842,6 @@ static int test_download_0 (void)
   /* InitBasicFS for test_download_0: create ext2 on /dev/sda1 */
   {
     char device[] = "/dev/sda";
-    device[5] = devchar;
     int r;
     suppress_error = 0;
     r = guestfs_blockdev_setrw (g, device);
@@ -5932,7 +5864,6 @@ static int test_download_0 (void)
   }
   {
     char device[] = "/dev/sda";
-    device[5] = devchar;
     char lines_0[] = ",";
     char *lines[] = {
       lines_0,
@@ -5947,7 +5878,6 @@ static int test_download_0 (void)
   {
     char fstype[] = "ext2";
     char device[] = "/dev/sda1";
-    device[5] = devchar;
     int r;
     suppress_error = 0;
     r = guestfs_mkfs (g, fstype, device);
@@ -5956,7 +5886,6 @@ static int test_download_0 (void)
   }
   {
     char device[] = "/dev/sda1";
-    device[5] = devchar;
     char mountpoint[] = "/";
     int r;
     suppress_error = 0;
@@ -6028,7 +5957,6 @@ static int test_upload_0 (void)
   /* InitBasicFS for test_upload_0: create ext2 on /dev/sda1 */
   {
     char device[] = "/dev/sda";
-    device[5] = devchar;
     int r;
     suppress_error = 0;
     r = guestfs_blockdev_setrw (g, device);
@@ -6051,7 +5979,6 @@ static int test_upload_0 (void)
   }
   {
     char device[] = "/dev/sda";
-    device[5] = devchar;
     char lines_0[] = ",";
     char *lines[] = {
       lines_0,
@@ -6066,7 +5993,6 @@ static int test_upload_0 (void)
   {
     char fstype[] = "ext2";
     char device[] = "/dev/sda1";
-    device[5] = devchar;
     int r;
     suppress_error = 0;
     r = guestfs_mkfs (g, fstype, device);
@@ -6075,7 +6001,6 @@ static int test_upload_0 (void)
   }
   {
     char device[] = "/dev/sda1";
-    device[5] = devchar;
     char mountpoint[] = "/";
     int r;
     suppress_error = 0;
@@ -6131,7 +6056,6 @@ static int test_blockdev_rereadpt_0 (void)
   /* InitNone|InitEmpty for test_blockdev_rereadpt_0 */
   {
     char device[] = "/dev/sda";
-    device[5] = devchar;
     int r;
     suppress_error = 0;
     r = guestfs_blockdev_setrw (g, device);
@@ -6155,7 +6079,6 @@ static int test_blockdev_rereadpt_0 (void)
   /* TestRun for blockdev_rereadpt (0) */
   {
     char device[] = "/dev/sda";
-    device[5] = devchar;
     int r;
     suppress_error = 0;
     r = guestfs_blockdev_rereadpt (g, device);
@@ -6186,7 +6109,6 @@ static int test_blockdev_flushbufs_0 (void)
   /* InitNone|InitEmpty for test_blockdev_flushbufs_0 */
   {
     char device[] = "/dev/sda";
-    device[5] = devchar;
     int r;
     suppress_error = 0;
     r = guestfs_blockdev_setrw (g, device);
@@ -6210,7 +6132,6 @@ static int test_blockdev_flushbufs_0 (void)
   /* TestRun for blockdev_flushbufs (0) */
   {
     char device[] = "/dev/sda";
-    device[5] = devchar;
     int r;
     suppress_error = 0;
     r = guestfs_blockdev_flushbufs (g, device);
@@ -6241,7 +6162,6 @@ static int test_blockdev_getsize64_0 (void)
   /* InitNone|InitEmpty for test_blockdev_getsize64_0 */
   {
     char device[] = "/dev/sda";
-    device[5] = devchar;
     int r;
     suppress_error = 0;
     r = guestfs_blockdev_setrw (g, device);
@@ -6265,7 +6185,6 @@ static int test_blockdev_getsize64_0 (void)
   /* TestOutputInt for blockdev_getsize64 (0) */
   {
     char device[] = "/dev/sda";
-    device[5] = devchar;
     int64_t r;
     suppress_error = 0;
     r = guestfs_blockdev_getsize64 (g, device);
@@ -6300,7 +6219,6 @@ static int test_blockdev_getsz_0 (void)
   /* InitNone|InitEmpty for test_blockdev_getsz_0 */
   {
     char device[] = "/dev/sda";
-    device[5] = devchar;
     int r;
     suppress_error = 0;
     r = guestfs_blockdev_setrw (g, device);
@@ -6324,7 +6242,6 @@ static int test_blockdev_getsz_0 (void)
   /* TestOutputInt for blockdev_getsz (0) */
   {
     char device[] = "/dev/sda";
-    device[5] = devchar;
     int64_t r;
     suppress_error = 0;
     r = guestfs_blockdev_getsz (g, device);
@@ -6359,7 +6276,6 @@ static int test_blockdev_getbsz_0 (void)
   /* InitNone|InitEmpty for test_blockdev_getbsz_0 */
   {
     char device[] = "/dev/sda";
-    device[5] = devchar;
     int r;
     suppress_error = 0;
     r = guestfs_blockdev_setrw (g, device);
@@ -6383,7 +6299,6 @@ static int test_blockdev_getbsz_0 (void)
   /* TestOutputInt for blockdev_getbsz (0) */
   {
     char device[] = "/dev/sda";
-    device[5] = devchar;
     int r;
     suppress_error = 0;
     r = guestfs_blockdev_getbsz (g, device);
@@ -6418,7 +6333,6 @@ static int test_blockdev_getss_0 (void)
   /* InitNone|InitEmpty for test_blockdev_getss_0 */
   {
     char device[] = "/dev/sda";
-    device[5] = devchar;
     int r;
     suppress_error = 0;
     r = guestfs_blockdev_setrw (g, device);
@@ -6442,7 +6356,6 @@ static int test_blockdev_getss_0 (void)
   /* TestOutputInt for blockdev_getss (0) */
   {
     char device[] = "/dev/sda";
-    device[5] = devchar;
     int r;
     suppress_error = 0;
     r = guestfs_blockdev_getss (g, device);
@@ -6477,7 +6390,6 @@ static int test_blockdev_getro_0 (void)
   /* InitNone|InitEmpty for test_blockdev_getro_0 */
   {
     char device[] = "/dev/sda";
-    device[5] = devchar;
     int r;
     suppress_error = 0;
     r = guestfs_blockdev_setrw (g, device);
@@ -6501,7 +6413,6 @@ static int test_blockdev_getro_0 (void)
   /* TestOutputTrue for blockdev_getro (0) */
   {
     char device[] = "/dev/sda";
-    device[5] = devchar;
     int r;
     suppress_error = 0;
     r = guestfs_blockdev_setro (g, device);
@@ -6510,7 +6421,6 @@ static int test_blockdev_getro_0 (void)
   }
   {
     char device[] = "/dev/sda";
-    device[5] = devchar;
     int r;
     suppress_error = 0;
     r = guestfs_blockdev_getro (g, device);
@@ -6545,7 +6455,6 @@ static int test_blockdev_setrw_0 (void)
   /* InitNone|InitEmpty for test_blockdev_setrw_0 */
   {
     char device[] = "/dev/sda";
-    device[5] = devchar;
     int r;
     suppress_error = 0;
     r = guestfs_blockdev_setrw (g, device);
@@ -6569,7 +6478,6 @@ static int test_blockdev_setrw_0 (void)
   /* TestOutputFalse for blockdev_setrw (0) */
   {
     char device[] = "/dev/sda";
-    device[5] = devchar;
     int r;
     suppress_error = 0;
     r = guestfs_blockdev_setrw (g, device);
@@ -6578,7 +6486,6 @@ static int test_blockdev_setrw_0 (void)
   }
   {
     char device[] = "/dev/sda";
-    device[5] = devchar;
     int r;
     suppress_error = 0;
     r = guestfs_blockdev_getro (g, device);
@@ -6613,7 +6520,6 @@ static int test_blockdev_setro_0 (void)
   /* InitNone|InitEmpty for test_blockdev_setro_0 */
   {
     char device[] = "/dev/sda";
-    device[5] = devchar;
     int r;
     suppress_error = 0;
     r = guestfs_blockdev_setrw (g, device);
@@ -6637,7 +6543,6 @@ static int test_blockdev_setro_0 (void)
   /* TestOutputTrue for blockdev_setro (0) */
   {
     char device[] = "/dev/sda";
-    device[5] = devchar;
     int r;
     suppress_error = 0;
     r = guestfs_blockdev_setro (g, device);
@@ -6646,7 +6551,6 @@ static int test_blockdev_setro_0 (void)
   }
   {
     char device[] = "/dev/sda";
-    device[5] = devchar;
     int r;
     suppress_error = 0;
     r = guestfs_blockdev_getro (g, device);
@@ -6681,7 +6585,6 @@ static int test_statvfs_0 (void)
   /* InitBasicFS for test_statvfs_0: create ext2 on /dev/sda1 */
   {
     char device[] = "/dev/sda";
-    device[5] = devchar;
     int r;
     suppress_error = 0;
     r = guestfs_blockdev_setrw (g, device);
@@ -6704,7 +6607,6 @@ static int test_statvfs_0 (void)
   }
   {
     char device[] = "/dev/sda";
-    device[5] = devchar;
     char lines_0[] = ",";
     char *lines[] = {
       lines_0,
@@ -6719,7 +6621,6 @@ static int test_statvfs_0 (void)
   {
     char fstype[] = "ext2";
     char device[] = "/dev/sda1";
-    device[5] = devchar;
     int r;
     suppress_error = 0;
     r = guestfs_mkfs (g, fstype, device);
@@ -6728,7 +6629,6 @@ static int test_statvfs_0 (void)
   }
   {
     char device[] = "/dev/sda1";
-    device[5] = devchar;
     char mountpoint[] = "/";
     int r;
     suppress_error = 0;
@@ -6785,7 +6685,6 @@ static int test_lstat_0 (void)
   /* InitBasicFS for test_lstat_0: create ext2 on /dev/sda1 */
   {
     char device[] = "/dev/sda";
-    device[5] = devchar;
     int r;
     suppress_error = 0;
     r = guestfs_blockdev_setrw (g, device);
@@ -6808,7 +6707,6 @@ static int test_lstat_0 (void)
   }
   {
     char device[] = "/dev/sda";
-    device[5] = devchar;
     char lines_0[] = ",";
     char *lines[] = {
       lines_0,
@@ -6823,7 +6721,6 @@ static int test_lstat_0 (void)
   {
     char fstype[] = "ext2";
     char device[] = "/dev/sda1";
-    device[5] = devchar;
     int r;
     suppress_error = 0;
     r = guestfs_mkfs (g, fstype, device);
@@ -6832,7 +6729,6 @@ static int test_lstat_0 (void)
   }
   {
     char device[] = "/dev/sda1";
-    device[5] = devchar;
     char mountpoint[] = "/";
     int r;
     suppress_error = 0;
@@ -6887,7 +6783,6 @@ static int test_stat_0 (void)
   /* InitBasicFS for test_stat_0: create ext2 on /dev/sda1 */
   {
     char device[] = "/dev/sda";
-    device[5] = devchar;
     int r;
     suppress_error = 0;
     r = guestfs_blockdev_setrw (g, device);
@@ -6910,7 +6805,6 @@ static int test_stat_0 (void)
   }
   {
     char device[] = "/dev/sda";
-    device[5] = devchar;
     char lines_0[] = ",";
     char *lines[] = {
       lines_0,
@@ -6925,7 +6819,6 @@ static int test_stat_0 (void)
   {
     char fstype[] = "ext2";
     char device[] = "/dev/sda1";
-    device[5] = devchar;
     int r;
     suppress_error = 0;
     r = guestfs_mkfs (g, fstype, device);
@@ -6934,7 +6827,6 @@ static int test_stat_0 (void)
   }
   {
     char device[] = "/dev/sda1";
-    device[5] = devchar;
     char mountpoint[] = "/";
     int r;
     suppress_error = 0;
@@ -6989,7 +6881,6 @@ static int test_command_lines_0 (void)
   /* InitBasicFS for test_command_lines_0: create ext2 on /dev/sda1 */
   {
     char device[] = "/dev/sda";
-    device[5] = devchar;
     int r;
     suppress_error = 0;
     r = guestfs_blockdev_setrw (g, device);
@@ -7012,7 +6903,6 @@ static int test_command_lines_0 (void)
   }
   {
     char device[] = "/dev/sda";
-    device[5] = devchar;
     char lines_0[] = ",";
     char *lines[] = {
       lines_0,
@@ -7027,7 +6917,6 @@ static int test_command_lines_0 (void)
   {
     char fstype[] = "ext2";
     char device[] = "/dev/sda1";
-    device[5] = devchar;
     int r;
     suppress_error = 0;
     r = guestfs_mkfs (g, fstype, device);
@@ -7036,7 +6925,6 @@ static int test_command_lines_0 (void)
   }
   {
     char device[] = "/dev/sda1";
-    device[5] = devchar;
     char mountpoint[] = "/";
     int r;
     suppress_error = 0;
@@ -7120,7 +7008,6 @@ static int test_command_lines_1 (void)
   /* InitBasicFS for test_command_lines_1: create ext2 on /dev/sda1 */
   {
     char device[] = "/dev/sda";
-    device[5] = devchar;
     int r;
     suppress_error = 0;
     r = guestfs_blockdev_setrw (g, device);
@@ -7143,7 +7030,6 @@ static int test_command_lines_1 (void)
   }
   {
     char device[] = "/dev/sda";
-    device[5] = devchar;
     char lines_0[] = ",";
     char *lines[] = {
       lines_0,
@@ -7158,7 +7044,6 @@ static int test_command_lines_1 (void)
   {
     char fstype[] = "ext2";
     char device[] = "/dev/sda1";
-    device[5] = devchar;
     int r;
     suppress_error = 0;
     r = guestfs_mkfs (g, fstype, device);
@@ -7167,7 +7052,6 @@ static int test_command_lines_1 (void)
   }
   {
     char device[] = "/dev/sda1";
-    device[5] = devchar;
     char mountpoint[] = "/";
     int r;
     suppress_error = 0;
@@ -7251,7 +7135,6 @@ static int test_command_lines_2 (void)
   /* InitBasicFS for test_command_lines_2: create ext2 on /dev/sda1 */
   {
     char device[] = "/dev/sda";
-    device[5] = devchar;
     int r;
     suppress_error = 0;
     r = guestfs_blockdev_setrw (g, device);
@@ -7274,7 +7157,6 @@ static int test_command_lines_2 (void)
   }
   {
     char device[] = "/dev/sda";
-    device[5] = devchar;
     char lines_0[] = ",";
     char *lines[] = {
       lines_0,
@@ -7289,7 +7171,6 @@ static int test_command_lines_2 (void)
   {
     char fstype[] = "ext2";
     char device[] = "/dev/sda1";
-    device[5] = devchar;
     int r;
     suppress_error = 0;
     r = guestfs_mkfs (g, fstype, device);
@@ -7298,7 +7179,6 @@ static int test_command_lines_2 (void)
   }
   {
     char device[] = "/dev/sda1";
-    device[5] = devchar;
     char mountpoint[] = "/";
     int r;
     suppress_error = 0;
@@ -7394,7 +7274,6 @@ static int test_command_lines_3 (void)
   /* InitBasicFS for test_command_lines_3: create ext2 on /dev/sda1 */
   {
     char device[] = "/dev/sda";
-    device[5] = devchar;
     int r;
     suppress_error = 0;
     r = guestfs_blockdev_setrw (g, device);
@@ -7417,7 +7296,6 @@ static int test_command_lines_3 (void)
   }
   {
     char device[] = "/dev/sda";
-    device[5] = devchar;
     char lines_0[] = ",";
     char *lines[] = {
       lines_0,
@@ -7432,7 +7310,6 @@ static int test_command_lines_3 (void)
   {
     char fstype[] = "ext2";
     char device[] = "/dev/sda1";
-    device[5] = devchar;
     int r;
     suppress_error = 0;
     r = guestfs_mkfs (g, fstype, device);
@@ -7441,7 +7318,6 @@ static int test_command_lines_3 (void)
   }
   {
     char device[] = "/dev/sda1";
-    device[5] = devchar;
     char mountpoint[] = "/";
     int r;
     suppress_error = 0;
@@ -7537,7 +7413,6 @@ static int test_command_lines_4 (void)
   /* InitBasicFS for test_command_lines_4: create ext2 on /dev/sda1 */
   {
     char device[] = "/dev/sda";
-    device[5] = devchar;
     int r;
     suppress_error = 0;
     r = guestfs_blockdev_setrw (g, device);
@@ -7560,7 +7435,6 @@ static int test_command_lines_4 (void)
   }
   {
     char device[] = "/dev/sda";
-    device[5] = devchar;
     char lines_0[] = ",";
     char *lines[] = {
       lines_0,
@@ -7575,7 +7449,6 @@ static int test_command_lines_4 (void)
   {
     char fstype[] = "ext2";
     char device[] = "/dev/sda1";
-    device[5] = devchar;
     int r;
     suppress_error = 0;
     r = guestfs_mkfs (g, fstype, device);
@@ -7584,7 +7457,6 @@ static int test_command_lines_4 (void)
   }
   {
     char device[] = "/dev/sda1";
-    device[5] = devchar;
     char mountpoint[] = "/";
     int r;
     suppress_error = 0;
@@ -7692,7 +7564,6 @@ static int test_command_lines_5 (void)
   /* InitBasicFS for test_command_lines_5: create ext2 on /dev/sda1 */
   {
     char device[] = "/dev/sda";
-    device[5] = devchar;
     int r;
     suppress_error = 0;
     r = guestfs_blockdev_setrw (g, device);
@@ -7715,7 +7586,6 @@ static int test_command_lines_5 (void)
   }
   {
     char device[] = "/dev/sda";
-    device[5] = devchar;
     char lines_0[] = ",";
     char *lines[] = {
       lines_0,
@@ -7730,7 +7600,6 @@ static int test_command_lines_5 (void)
   {
     char fstype[] = "ext2";
     char device[] = "/dev/sda1";
-    device[5] = devchar;
     int r;
     suppress_error = 0;
     r = guestfs_mkfs (g, fstype, device);
@@ -7739,7 +7608,6 @@ static int test_command_lines_5 (void)
   }
   {
     char device[] = "/dev/sda1";
-    device[5] = devchar;
     char mountpoint[] = "/";
     int r;
     suppress_error = 0;
@@ -7859,7 +7727,6 @@ static int test_command_lines_6 (void)
   /* InitBasicFS for test_command_lines_6: create ext2 on /dev/sda1 */
   {
     char device[] = "/dev/sda";
-    device[5] = devchar;
     int r;
     suppress_error = 0;
     r = guestfs_blockdev_setrw (g, device);
@@ -7882,7 +7749,6 @@ static int test_command_lines_6 (void)
   }
   {
     char device[] = "/dev/sda";
-    device[5] = devchar;
     char lines_0[] = ",";
     char *lines[] = {
       lines_0,
@@ -7897,7 +7763,6 @@ static int test_command_lines_6 (void)
   {
     char fstype[] = "ext2";
     char device[] = "/dev/sda1";
-    device[5] = devchar;
     int r;
     suppress_error = 0;
     r = guestfs_mkfs (g, fstype, device);
@@ -7906,7 +7771,6 @@ static int test_command_lines_6 (void)
   }
   {
     char device[] = "/dev/sda1";
-    device[5] = devchar;
     char mountpoint[] = "/";
     int r;
     suppress_error = 0;
@@ -7978,7 +7842,6 @@ static int test_command_lines_7 (void)
   /* InitBasicFS for test_command_lines_7: create ext2 on /dev/sda1 */
   {
     char device[] = "/dev/sda";
-    device[5] = devchar;
     int r;
     suppress_error = 0;
     r = guestfs_blockdev_setrw (g, device);
@@ -8001,7 +7864,6 @@ static int test_command_lines_7 (void)
   }
   {
     char device[] = "/dev/sda";
-    device[5] = devchar;
     char lines_0[] = ",";
     char *lines[] = {
       lines_0,
@@ -8016,7 +7878,6 @@ static int test_command_lines_7 (void)
   {
     char fstype[] = "ext2";
     char device[] = "/dev/sda1";
-    device[5] = devchar;
     int r;
     suppress_error = 0;
     r = guestfs_mkfs (g, fstype, device);
@@ -8025,7 +7886,6 @@ static int test_command_lines_7 (void)
   }
   {
     char device[] = "/dev/sda1";
-    device[5] = devchar;
     char mountpoint[] = "/";
     int r;
     suppress_error = 0;
@@ -8109,7 +7969,6 @@ static int test_command_lines_8 (void)
   /* InitBasicFS for test_command_lines_8: create ext2 on /dev/sda1 */
   {
     char device[] = "/dev/sda";
-    device[5] = devchar;
     int r;
     suppress_error = 0;
     r = guestfs_blockdev_setrw (g, device);
@@ -8132,7 +7991,6 @@ static int test_command_lines_8 (void)
   }
   {
     char device[] = "/dev/sda";
-    device[5] = devchar;
     char lines_0[] = ",";
     char *lines[] = {
       lines_0,
@@ -8147,7 +8005,6 @@ static int test_command_lines_8 (void)
   {
     char fstype[] = "ext2";
     char device[] = "/dev/sda1";
-    device[5] = devchar;
     int r;
     suppress_error = 0;
     r = guestfs_mkfs (g, fstype, device);
@@ -8156,7 +8013,6 @@ static int test_command_lines_8 (void)
   }
   {
     char device[] = "/dev/sda1";
-    device[5] = devchar;
     char mountpoint[] = "/";
     int r;
     suppress_error = 0;
@@ -8252,7 +8108,6 @@ static int test_command_lines_9 (void)
   /* InitBasicFS for test_command_lines_9: create ext2 on /dev/sda1 */
   {
     char device[] = "/dev/sda";
-    device[5] = devchar;
     int r;
     suppress_error = 0;
     r = guestfs_blockdev_setrw (g, device);
@@ -8275,7 +8130,6 @@ static int test_command_lines_9 (void)
   }
   {
     char device[] = "/dev/sda";
-    device[5] = devchar;
     char lines_0[] = ",";
     char *lines[] = {
       lines_0,
@@ -8290,7 +8144,6 @@ static int test_command_lines_9 (void)
   {
     char fstype[] = "ext2";
     char device[] = "/dev/sda1";
-    device[5] = devchar;
     int r;
     suppress_error = 0;
     r = guestfs_mkfs (g, fstype, device);
@@ -8299,7 +8152,6 @@ static int test_command_lines_9 (void)
   }
   {
     char device[] = "/dev/sda1";
-    device[5] = devchar;
     char mountpoint[] = "/";
     int r;
     suppress_error = 0;
@@ -8395,7 +8247,6 @@ static int test_command_lines_10 (void)
   /* InitBasicFS for test_command_lines_10: create ext2 on /dev/sda1 */
   {
     char device[] = "/dev/sda";
-    device[5] = devchar;
     int r;
     suppress_error = 0;
     r = guestfs_blockdev_setrw (g, device);
@@ -8418,7 +8269,6 @@ static int test_command_lines_10 (void)
   }
   {
     char device[] = "/dev/sda";
-    device[5] = devchar;
     char lines_0[] = ",";
     char *lines[] = {
       lines_0,
@@ -8433,7 +8283,6 @@ static int test_command_lines_10 (void)
   {
     char fstype[] = "ext2";
     char device[] = "/dev/sda1";
-    device[5] = devchar;
     int r;
     suppress_error = 0;
     r = guestfs_mkfs (g, fstype, device);
@@ -8442,7 +8291,6 @@ static int test_command_lines_10 (void)
   }
   {
     char device[] = "/dev/sda1";
-    device[5] = devchar;
     char mountpoint[] = "/";
     int r;
     suppress_error = 0;
@@ -8538,7 +8386,6 @@ static int test_command_0 (void)
   /* InitBasicFS for test_command_0: create ext2 on /dev/sda1 */
   {
     char device[] = "/dev/sda";
-    device[5] = devchar;
     int r;
     suppress_error = 0;
     r = guestfs_blockdev_setrw (g, device);
@@ -8561,7 +8408,6 @@ static int test_command_0 (void)
   }
   {
     char device[] = "/dev/sda";
-    device[5] = devchar;
     char lines_0[] = ",";
     char *lines[] = {
       lines_0,
@@ -8576,7 +8422,6 @@ static int test_command_0 (void)
   {
     char fstype[] = "ext2";
     char device[] = "/dev/sda1";
-    device[5] = devchar;
     int r;
     suppress_error = 0;
     r = guestfs_mkfs (g, fstype, device);
@@ -8585,7 +8430,6 @@ static int test_command_0 (void)
   }
   {
     char device[] = "/dev/sda1";
-    device[5] = devchar;
     char mountpoint[] = "/";
     int r;
     suppress_error = 0;
@@ -8654,7 +8498,6 @@ static int test_command_1 (void)
   /* InitBasicFS for test_command_1: create ext2 on /dev/sda1 */
   {
     char device[] = "/dev/sda";
-    device[5] = devchar;
     int r;
     suppress_error = 0;
     r = guestfs_blockdev_setrw (g, device);
@@ -8677,7 +8520,6 @@ static int test_command_1 (void)
   }
   {
     char device[] = "/dev/sda";
-    device[5] = devchar;
     char lines_0[] = ",";
     char *lines[] = {
       lines_0,
@@ -8692,7 +8534,6 @@ static int test_command_1 (void)
   {
     char fstype[] = "ext2";
     char device[] = "/dev/sda1";
-    device[5] = devchar;
     int r;
     suppress_error = 0;
     r = guestfs_mkfs (g, fstype, device);
@@ -8701,7 +8542,6 @@ static int test_command_1 (void)
   }
   {
     char device[] = "/dev/sda1";
-    device[5] = devchar;
     char mountpoint[] = "/";
     int r;
     suppress_error = 0;
@@ -8770,7 +8610,6 @@ static int test_command_2 (void)
   /* InitBasicFS for test_command_2: create ext2 on /dev/sda1 */
   {
     char device[] = "/dev/sda";
-    device[5] = devchar;
     int r;
     suppress_error = 0;
     r = guestfs_blockdev_setrw (g, device);
@@ -8793,7 +8632,6 @@ static int test_command_2 (void)
   }
   {
     char device[] = "/dev/sda";
-    device[5] = devchar;
     char lines_0[] = ",";
     char *lines[] = {
       lines_0,
@@ -8808,7 +8646,6 @@ static int test_command_2 (void)
   {
     char fstype[] = "ext2";
     char device[] = "/dev/sda1";
-    device[5] = devchar;
     int r;
     suppress_error = 0;
     r = guestfs_mkfs (g, fstype, device);
@@ -8817,7 +8654,6 @@ static int test_command_2 (void)
   }
   {
     char device[] = "/dev/sda1";
-    device[5] = devchar;
     char mountpoint[] = "/";
     int r;
     suppress_error = 0;
@@ -8886,7 +8722,6 @@ static int test_command_3 (void)
   /* InitBasicFS for test_command_3: create ext2 on /dev/sda1 */
   {
     char device[] = "/dev/sda";
-    device[5] = devchar;
     int r;
     suppress_error = 0;
     r = guestfs_blockdev_setrw (g, device);
@@ -8909,7 +8744,6 @@ static int test_command_3 (void)
   }
   {
     char device[] = "/dev/sda";
-    device[5] = devchar;
     char lines_0[] = ",";
     char *lines[] = {
       lines_0,
@@ -8924,7 +8758,6 @@ static int test_command_3 (void)
   {
     char fstype[] = "ext2";
     char device[] = "/dev/sda1";
-    device[5] = devchar;
     int r;
     suppress_error = 0;
     r = guestfs_mkfs (g, fstype, device);
@@ -8933,7 +8766,6 @@ static int test_command_3 (void)
   }
   {
     char device[] = "/dev/sda1";
-    device[5] = devchar;
     char mountpoint[] = "/";
     int r;
     suppress_error = 0;
@@ -9002,7 +8834,6 @@ static int test_command_4 (void)
   /* InitBasicFS for test_command_4: create ext2 on /dev/sda1 */
   {
     char device[] = "/dev/sda";
-    device[5] = devchar;
     int r;
     suppress_error = 0;
     r = guestfs_blockdev_setrw (g, device);
@@ -9025,7 +8856,6 @@ static int test_command_4 (void)
   }
   {
     char device[] = "/dev/sda";
-    device[5] = devchar;
     char lines_0[] = ",";
     char *lines[] = {
       lines_0,
@@ -9040,7 +8870,6 @@ static int test_command_4 (void)
   {
     char fstype[] = "ext2";
     char device[] = "/dev/sda1";
-    device[5] = devchar;
     int r;
     suppress_error = 0;
     r = guestfs_mkfs (g, fstype, device);
@@ -9049,7 +8878,6 @@ static int test_command_4 (void)
   }
   {
     char device[] = "/dev/sda1";
-    device[5] = devchar;
     char mountpoint[] = "/";
     int r;
     suppress_error = 0;
@@ -9118,7 +8946,6 @@ static int test_command_5 (void)
   /* InitBasicFS for test_command_5: create ext2 on /dev/sda1 */
   {
     char device[] = "/dev/sda";
-    device[5] = devchar;
     int r;
     suppress_error = 0;
     r = guestfs_blockdev_setrw (g, device);
@@ -9141,7 +8968,6 @@ static int test_command_5 (void)
   }
   {
     char device[] = "/dev/sda";
-    device[5] = devchar;
     char lines_0[] = ",";
     char *lines[] = {
       lines_0,
@@ -9156,7 +8982,6 @@ static int test_command_5 (void)
   {
     char fstype[] = "ext2";
     char device[] = "/dev/sda1";
-    device[5] = devchar;
     int r;
     suppress_error = 0;
     r = guestfs_mkfs (g, fstype, device);
@@ -9165,7 +8990,6 @@ static int test_command_5 (void)
   }
   {
     char device[] = "/dev/sda1";
-    device[5] = devchar;
     char mountpoint[] = "/";
     int r;
     suppress_error = 0;
@@ -9234,7 +9058,6 @@ static int test_command_6 (void)
   /* InitBasicFS for test_command_6: create ext2 on /dev/sda1 */
   {
     char device[] = "/dev/sda";
-    device[5] = devchar;
     int r;
     suppress_error = 0;
     r = guestfs_blockdev_setrw (g, device);
@@ -9257,7 +9080,6 @@ static int test_command_6 (void)
   }
   {
     char device[] = "/dev/sda";
-    device[5] = devchar;
     char lines_0[] = ",";
     char *lines[] = {
       lines_0,
@@ -9272,7 +9094,6 @@ static int test_command_6 (void)
   {
     char fstype[] = "ext2";
     char device[] = "/dev/sda1";
-    device[5] = devchar;
     int r;
     suppress_error = 0;
     r = guestfs_mkfs (g, fstype, device);
@@ -9281,7 +9102,6 @@ static int test_command_6 (void)
   }
   {
     char device[] = "/dev/sda1";
-    device[5] = devchar;
     char mountpoint[] = "/";
     int r;
     suppress_error = 0;
@@ -9350,7 +9170,6 @@ static int test_command_7 (void)
   /* InitBasicFS for test_command_7: create ext2 on /dev/sda1 */
   {
     char device[] = "/dev/sda";
-    device[5] = devchar;
     int r;
     suppress_error = 0;
     r = guestfs_blockdev_setrw (g, device);
@@ -9373,7 +9192,6 @@ static int test_command_7 (void)
   }
   {
     char device[] = "/dev/sda";
-    device[5] = devchar;
     char lines_0[] = ",";
     char *lines[] = {
       lines_0,
@@ -9388,7 +9206,6 @@ static int test_command_7 (void)
   {
     char fstype[] = "ext2";
     char device[] = "/dev/sda1";
-    device[5] = devchar;
     int r;
     suppress_error = 0;
     r = guestfs_mkfs (g, fstype, device);
@@ -9397,7 +9214,6 @@ static int test_command_7 (void)
   }
   {
     char device[] = "/dev/sda1";
-    device[5] = devchar;
     char mountpoint[] = "/";
     int r;
     suppress_error = 0;
@@ -9466,7 +9282,6 @@ static int test_command_8 (void)
   /* InitBasicFS for test_command_8: create ext2 on /dev/sda1 */
   {
     char device[] = "/dev/sda";
-    device[5] = devchar;
     int r;
     suppress_error = 0;
     r = guestfs_blockdev_setrw (g, device);
@@ -9489,7 +9304,6 @@ static int test_command_8 (void)
   }
   {
     char device[] = "/dev/sda";
-    device[5] = devchar;
     char lines_0[] = ",";
     char *lines[] = {
       lines_0,
@@ -9504,7 +9318,6 @@ static int test_command_8 (void)
   {
     char fstype[] = "ext2";
     char device[] = "/dev/sda1";
-    device[5] = devchar;
     int r;
     suppress_error = 0;
     r = guestfs_mkfs (g, fstype, device);
@@ -9513,7 +9326,6 @@ static int test_command_8 (void)
   }
   {
     char device[] = "/dev/sda1";
-    device[5] = devchar;
     char mountpoint[] = "/";
     int r;
     suppress_error = 0;
@@ -9582,7 +9394,6 @@ static int test_command_9 (void)
   /* InitBasicFS for test_command_9: create ext2 on /dev/sda1 */
   {
     char device[] = "/dev/sda";
-    device[5] = devchar;
     int r;
     suppress_error = 0;
     r = guestfs_blockdev_setrw (g, device);
@@ -9605,7 +9416,6 @@ static int test_command_9 (void)
   }
   {
     char device[] = "/dev/sda";
-    device[5] = devchar;
     char lines_0[] = ",";
     char *lines[] = {
       lines_0,
@@ -9620,7 +9430,6 @@ static int test_command_9 (void)
   {
     char fstype[] = "ext2";
     char device[] = "/dev/sda1";
-    device[5] = devchar;
     int r;
     suppress_error = 0;
     r = guestfs_mkfs (g, fstype, device);
@@ -9629,7 +9438,6 @@ static int test_command_9 (void)
   }
   {
     char device[] = "/dev/sda1";
-    device[5] = devchar;
     char mountpoint[] = "/";
     int r;
     suppress_error = 0;
@@ -9698,7 +9506,6 @@ static int test_command_10 (void)
   /* InitBasicFS for test_command_10: create ext2 on /dev/sda1 */
   {
     char device[] = "/dev/sda";
-    device[5] = devchar;
     int r;
     suppress_error = 0;
     r = guestfs_blockdev_setrw (g, device);
@@ -9721,7 +9528,6 @@ static int test_command_10 (void)
   }
   {
     char device[] = "/dev/sda";
-    device[5] = devchar;
     char lines_0[] = ",";
     char *lines[] = {
       lines_0,
@@ -9736,7 +9542,6 @@ static int test_command_10 (void)
   {
     char fstype[] = "ext2";
     char device[] = "/dev/sda1";
-    device[5] = devchar;
     int r;
     suppress_error = 0;
     r = guestfs_mkfs (g, fstype, device);
@@ -9745,7 +9550,6 @@ static int test_command_10 (void)
   }
   {
     char device[] = "/dev/sda1";
-    device[5] = devchar;
     char mountpoint[] = "/";
     int r;
     suppress_error = 0;
@@ -9814,7 +9618,6 @@ static int test_command_11 (void)
   /* InitBasicFS for test_command_11: create ext2 on /dev/sda1 */
   {
     char device[] = "/dev/sda";
-    device[5] = devchar;
     int r;
     suppress_error = 0;
     r = guestfs_blockdev_setrw (g, device);
@@ -9837,7 +9640,6 @@ static int test_command_11 (void)
   }
   {
     char device[] = "/dev/sda";
-    device[5] = devchar;
     char lines_0[] = ",";
     char *lines[] = {
       lines_0,
@@ -9852,7 +9654,6 @@ static int test_command_11 (void)
   {
     char fstype[] = "ext2";
     char device[] = "/dev/sda1";
-    device[5] = devchar;
     int r;
     suppress_error = 0;
     r = guestfs_mkfs (g, fstype, device);
@@ -9861,7 +9662,6 @@ static int test_command_11 (void)
   }
   {
     char device[] = "/dev/sda1";
-    device[5] = devchar;
     char mountpoint[] = "/";
     int r;
     suppress_error = 0;
@@ -9923,7 +9723,6 @@ static int test_file_0 (void)
   /* InitBasicFS for test_file_0: create ext2 on /dev/sda1 */
   {
     char device[] = "/dev/sda";
-    device[5] = devchar;
     int r;
     suppress_error = 0;
     r = guestfs_blockdev_setrw (g, device);
@@ -9946,7 +9745,6 @@ static int test_file_0 (void)
   }
   {
     char device[] = "/dev/sda";
-    device[5] = devchar;
     char lines_0[] = ",";
     char *lines[] = {
       lines_0,
@@ -9961,7 +9759,6 @@ static int test_file_0 (void)
   {
     char fstype[] = "ext2";
     char device[] = "/dev/sda1";
-    device[5] = devchar;
     int r;
     suppress_error = 0;
     r = guestfs_mkfs (g, fstype, device);
@@ -9970,7 +9767,6 @@ static int test_file_0 (void)
   }
   {
     char device[] = "/dev/sda1";
-    device[5] = devchar;
     char mountpoint[] = "/";
     int r;
     suppress_error = 0;
@@ -10025,7 +9821,6 @@ static int test_file_1 (void)
   /* InitBasicFS for test_file_1: create ext2 on /dev/sda1 */
   {
     char device[] = "/dev/sda";
-    device[5] = devchar;
     int r;
     suppress_error = 0;
     r = guestfs_blockdev_setrw (g, device);
@@ -10048,7 +9843,6 @@ static int test_file_1 (void)
   }
   {
     char device[] = "/dev/sda";
-    device[5] = devchar;
     char lines_0[] = ",";
     char *lines[] = {
       lines_0,
@@ -10063,7 +9857,6 @@ static int test_file_1 (void)
   {
     char fstype[] = "ext2";
     char device[] = "/dev/sda1";
-    device[5] = devchar;
     int r;
     suppress_error = 0;
     r = guestfs_mkfs (g, fstype, device);
@@ -10072,7 +9865,6 @@ static int test_file_1 (void)
   }
   {
     char device[] = "/dev/sda1";
-    device[5] = devchar;
     char mountpoint[] = "/";
     int r;
     suppress_error = 0;
@@ -10128,7 +9920,6 @@ static int test_file_2 (void)
   /* InitBasicFS for test_file_2: create ext2 on /dev/sda1 */
   {
     char device[] = "/dev/sda";
-    device[5] = devchar;
     int r;
     suppress_error = 0;
     r = guestfs_blockdev_setrw (g, device);
@@ -10151,7 +9942,6 @@ static int test_file_2 (void)
   }
   {
     char device[] = "/dev/sda";
-    device[5] = devchar;
     char lines_0[] = ",";
     char *lines[] = {
       lines_0,
@@ -10166,7 +9956,6 @@ static int test_file_2 (void)
   {
     char fstype[] = "ext2";
     char device[] = "/dev/sda1";
-    device[5] = devchar;
     int r;
     suppress_error = 0;
     r = guestfs_mkfs (g, fstype, device);
@@ -10175,7 +9964,6 @@ static int test_file_2 (void)
   }
   {
     char device[] = "/dev/sda1";
-    device[5] = devchar;
     char mountpoint[] = "/";
     int r;
     suppress_error = 0;
@@ -10217,7 +10005,6 @@ static int test_umount_all_0 (void)
   /* InitBasicFS for test_umount_all_0: create ext2 on /dev/sda1 */
   {
     char device[] = "/dev/sda";
-    device[5] = devchar;
     int r;
     suppress_error = 0;
     r = guestfs_blockdev_setrw (g, device);
@@ -10240,7 +10027,6 @@ static int test_umount_all_0 (void)
   }
   {
     char device[] = "/dev/sda";
-    device[5] = devchar;
     char lines_0[] = ",";
     char *lines[] = {
       lines_0,
@@ -10255,7 +10041,6 @@ static int test_umount_all_0 (void)
   {
     char fstype[] = "ext2";
     char device[] = "/dev/sda1";
-    device[5] = devchar;
     int r;
     suppress_error = 0;
     r = guestfs_mkfs (g, fstype, device);
@@ -10264,7 +10049,6 @@ static int test_umount_all_0 (void)
   }
   {
     char device[] = "/dev/sda1";
-    device[5] = devchar;
     char mountpoint[] = "/";
     int r;
     suppress_error = 0;
@@ -10320,7 +10104,6 @@ static int test_umount_all_1 (void)
   /* InitNone|InitEmpty for test_umount_all_1 */
   {
     char device[] = "/dev/sda";
-    device[5] = devchar;
     int r;
     suppress_error = 0;
     r = guestfs_blockdev_setrw (g, device);
@@ -10344,7 +10127,6 @@ static int test_umount_all_1 (void)
   /* TestOutputList for umount_all (1) */
   {
     char device[] = "/dev/sda";
-    device[5] = devchar;
     char lines_0[] = ",10";
     char lines_1[] = ",20";
     char lines_2[] = ",";
@@ -10363,7 +10145,6 @@ static int test_umount_all_1 (void)
   {
     char fstype[] = "ext2";
     char device[] = "/dev/sda1";
-    device[5] = devchar;
     int r;
     suppress_error = 0;
     r = guestfs_mkfs (g, fstype, device);
@@ -10373,7 +10154,6 @@ static int test_umount_all_1 (void)
   {
     char fstype[] = "ext2";
     char device[] = "/dev/sda2";
-    device[5] = devchar;
     int r;
     suppress_error = 0;
     r = guestfs_mkfs (g, fstype, device);
@@ -10383,7 +10163,6 @@ static int test_umount_all_1 (void)
   {
     char fstype[] = "ext2";
     char device[] = "/dev/sda3";
-    device[5] = devchar;
     int r;
     suppress_error = 0;
     r = guestfs_mkfs (g, fstype, device);
@@ -10392,7 +10171,6 @@ static int test_umount_all_1 (void)
   }
   {
     char device[] = "/dev/sda1";
-    device[5] = devchar;
     char mountpoint[] = "/";
     int r;
     suppress_error = 0;
@@ -10410,7 +10188,6 @@ static int test_umount_all_1 (void)
   }
   {
     char device[] = "/dev/sda2";
-    device[5] = devchar;
     char mountpoint[] = "/mp1";
     int r;
     suppress_error = 0;
@@ -10428,7 +10205,6 @@ static int test_umount_all_1 (void)
   }
   {
     char device[] = "/dev/sda3";
-    device[5] = devchar;
     char mountpoint[] = "/mp1/mp2";
     int r;
     suppress_error = 0;
@@ -10491,7 +10267,6 @@ static int test_mounts_0 (void)
   /* InitBasicFS for test_mounts_0: create ext2 on /dev/sda1 */
   {
     char device[] = "/dev/sda";
-    device[5] = devchar;
     int r;
     suppress_error = 0;
     r = guestfs_blockdev_setrw (g, device);
@@ -10514,7 +10289,6 @@ static int test_mounts_0 (void)
   }
   {
     char device[] = "/dev/sda";
-    device[5] = devchar;
     char lines_0[] = ",";
     char *lines[] = {
       lines_0,
@@ -10529,7 +10303,6 @@ static int test_mounts_0 (void)
   {
     char fstype[] = "ext2";
     char device[] = "/dev/sda1";
-    device[5] = devchar;
     int r;
     suppress_error = 0;
     r = guestfs_mkfs (g, fstype, device);
@@ -10538,7 +10311,6 @@ static int test_mounts_0 (void)
   }
   {
     char device[] = "/dev/sda1";
-    device[5] = devchar;
     char mountpoint[] = "/";
     int r;
     suppress_error = 0;
@@ -10546,7 +10318,7 @@ static int test_mounts_0 (void)
     if (r == -1)
       return -1;
   }
-  /* TestOutputList for mounts (0) */
+  /* TestOutputListOfDevices for mounts (0) */
   {
     char **r;
     int i;
@@ -10561,7 +10333,7 @@ static int test_mounts_0 (void)
     }
     {
       char expected[] = "/dev/sda1";
-      expected[5] = devchar;
+      r[0][5] = 's';
       if (strcmp (r[0], expected) != 0) {
         fprintf (stderr, "test_mounts_0: expected \"%s\" but got \"%s\"\n", expected, r[0]);
         return -1;
@@ -10600,7 +10372,6 @@ static int test_umount_0 (void)
   /* InitNone|InitEmpty for test_umount_0 */
   {
     char device[] = "/dev/sda";
-    device[5] = devchar;
     int r;
     suppress_error = 0;
     r = guestfs_blockdev_setrw (g, device);
@@ -10621,10 +10392,9 @@ static int test_umount_0 (void)
     if (r == -1)
       return -1;
   }
-  /* TestOutputList for umount (0) */
+  /* TestOutputListOfDevices for umount (0) */
   {
     char device[] = "/dev/sda";
-    device[5] = devchar;
     char lines_0[] = ",";
     char *lines[] = {
       lines_0,
@@ -10639,7 +10409,6 @@ static int test_umount_0 (void)
   {
     char fstype[] = "ext2";
     char device[] = "/dev/sda1";
-    device[5] = devchar;
     int r;
     suppress_error = 0;
     r = guestfs_mkfs (g, fstype, device);
@@ -10648,7 +10417,6 @@ static int test_umount_0 (void)
   }
   {
     char device[] = "/dev/sda1";
-    device[5] = devchar;
     char mountpoint[] = "/";
     int r;
     suppress_error = 0;
@@ -10670,7 +10438,7 @@ static int test_umount_0 (void)
     }
     {
       char expected[] = "/dev/sda1";
-      expected[5] = devchar;
+      r[0][5] = 's';
       if (strcmp (r[0], expected) != 0) {
         fprintf (stderr, "test_umount_0: expected \"%s\" but got \"%s\"\n", expected, r[0]);
         return -1;
@@ -10709,7 +10477,6 @@ static int test_umount_1 (void)
   /* InitNone|InitEmpty for test_umount_1 */
   {
     char device[] = "/dev/sda";
-    device[5] = devchar;
     int r;
     suppress_error = 0;
     r = guestfs_blockdev_setrw (g, device);
@@ -10733,7 +10500,6 @@ static int test_umount_1 (void)
   /* TestOutputList for umount (1) */
   {
     char device[] = "/dev/sda";
-    device[5] = devchar;
     char lines_0[] = ",";
     char *lines[] = {
       lines_0,
@@ -10748,7 +10514,6 @@ static int test_umount_1 (void)
   {
     char fstype[] = "ext2";
     char device[] = "/dev/sda1";
-    device[5] = devchar;
     int r;
     suppress_error = 0;
     r = guestfs_mkfs (g, fstype, device);
@@ -10757,7 +10522,6 @@ static int test_umount_1 (void)
   }
   {
     char device[] = "/dev/sda1";
-    device[5] = devchar;
     char mountpoint[] = "/";
     int r;
     suppress_error = 0;
@@ -10813,7 +10577,6 @@ static int test_write_file_0 (void)
   /* InitBasicFS for test_write_file_0: create ext2 on /dev/sda1 */
   {
     char device[] = "/dev/sda";
-    device[5] = devchar;
     int r;
     suppress_error = 0;
     r = guestfs_blockdev_setrw (g, device);
@@ -10836,7 +10599,6 @@ static int test_write_file_0 (void)
   }
   {
     char device[] = "/dev/sda";
-    device[5] = devchar;
     char lines_0[] = ",";
     char *lines[] = {
       lines_0,
@@ -10851,7 +10613,6 @@ static int test_write_file_0 (void)
   {
     char fstype[] = "ext2";
     char device[] = "/dev/sda1";
-    device[5] = devchar;
     int r;
     suppress_error = 0;
     r = guestfs_mkfs (g, fstype, device);
@@ -10860,7 +10621,6 @@ static int test_write_file_0 (void)
   }
   {
     char device[] = "/dev/sda1";
-    device[5] = devchar;
     char mountpoint[] = "/";
     int r;
     suppress_error = 0;
@@ -10916,7 +10676,6 @@ static int test_write_file_1 (void)
   /* InitBasicFS for test_write_file_1: create ext2 on /dev/sda1 */
   {
     char device[] = "/dev/sda";
-    device[5] = devchar;
     int r;
     suppress_error = 0;
     r = guestfs_blockdev_setrw (g, device);
@@ -10939,7 +10698,6 @@ static int test_write_file_1 (void)
   }
   {
     char device[] = "/dev/sda";
-    device[5] = devchar;
     char lines_0[] = ",";
     char *lines[] = {
       lines_0,
@@ -10954,7 +10712,6 @@ static int test_write_file_1 (void)
   {
     char fstype[] = "ext2";
     char device[] = "/dev/sda1";
-    device[5] = devchar;
     int r;
     suppress_error = 0;
     r = guestfs_mkfs (g, fstype, device);
@@ -10963,7 +10720,6 @@ static int test_write_file_1 (void)
   }
   {
     char device[] = "/dev/sda1";
-    device[5] = devchar;
     char mountpoint[] = "/";
     int r;
     suppress_error = 0;
@@ -11019,7 +10775,6 @@ static int test_write_file_2 (void)
   /* InitBasicFS for test_write_file_2: create ext2 on /dev/sda1 */
   {
     char device[] = "/dev/sda";
-    device[5] = devchar;
     int r;
     suppress_error = 0;
     r = guestfs_blockdev_setrw (g, device);
@@ -11042,7 +10797,6 @@ static int test_write_file_2 (void)
   }
   {
     char device[] = "/dev/sda";
-    device[5] = devchar;
     char lines_0[] = ",";
     char *lines[] = {
       lines_0,
@@ -11057,7 +10811,6 @@ static int test_write_file_2 (void)
   {
     char fstype[] = "ext2";
     char device[] = "/dev/sda1";
-    device[5] = devchar;
     int r;
     suppress_error = 0;
     r = guestfs_mkfs (g, fstype, device);
@@ -11066,7 +10819,6 @@ static int test_write_file_2 (void)
   }
   {
     char device[] = "/dev/sda1";
-    device[5] = devchar;
     char mountpoint[] = "/";
     int r;
     suppress_error = 0;
@@ -11122,7 +10874,6 @@ static int test_write_file_3 (void)
   /* InitBasicFS for test_write_file_3: create ext2 on /dev/sda1 */
   {
     char device[] = "/dev/sda";
-    device[5] = devchar;
     int r;
     suppress_error = 0;
     r = guestfs_blockdev_setrw (g, device);
@@ -11145,7 +10896,6 @@ static int test_write_file_3 (void)
   }
   {
     char device[] = "/dev/sda";
-    device[5] = devchar;
     char lines_0[] = ",";
     char *lines[] = {
       lines_0,
@@ -11160,7 +10910,6 @@ static int test_write_file_3 (void)
   {
     char fstype[] = "ext2";
     char device[] = "/dev/sda1";
-    device[5] = devchar;
     int r;
     suppress_error = 0;
     r = guestfs_mkfs (g, fstype, device);
@@ -11169,7 +10918,6 @@ static int test_write_file_3 (void)
   }
   {
     char device[] = "/dev/sda1";
-    device[5] = devchar;
     char mountpoint[] = "/";
     int r;
     suppress_error = 0;
@@ -11225,7 +10973,6 @@ static int test_write_file_4 (void)
   /* InitBasicFS for test_write_file_4: create ext2 on /dev/sda1 */
   {
     char device[] = "/dev/sda";
-    device[5] = devchar;
     int r;
     suppress_error = 0;
     r = guestfs_blockdev_setrw (g, device);
@@ -11248,7 +10995,6 @@ static int test_write_file_4 (void)
   }
   {
     char device[] = "/dev/sda";
-    device[5] = devchar;
     char lines_0[] = ",";
     char *lines[] = {
       lines_0,
@@ -11263,7 +11009,6 @@ static int test_write_file_4 (void)
   {
     char fstype[] = "ext2";
     char device[] = "/dev/sda1";
-    device[5] = devchar;
     int r;
     suppress_error = 0;
     r = guestfs_mkfs (g, fstype, device);
@@ -11272,7 +11017,6 @@ static int test_write_file_4 (void)
   }
   {
     char device[] = "/dev/sda1";
-    device[5] = devchar;
     char mountpoint[] = "/";
     int r;
     suppress_error = 0;
@@ -11328,7 +11072,6 @@ static int test_write_file_5 (void)
   /* InitBasicFS for test_write_file_5: create ext2 on /dev/sda1 */
   {
     char device[] = "/dev/sda";
-    device[5] = devchar;
     int r;
     suppress_error = 0;
     r = guestfs_blockdev_setrw (g, device);
@@ -11351,7 +11094,6 @@ static int test_write_file_5 (void)
   }
   {
     char device[] = "/dev/sda";
-    device[5] = devchar;
     char lines_0[] = ",";
     char *lines[] = {
       lines_0,
@@ -11366,7 +11108,6 @@ static int test_write_file_5 (void)
   {
     char fstype[] = "ext2";
     char device[] = "/dev/sda1";
-    device[5] = devchar;
     int r;
     suppress_error = 0;
     r = guestfs_mkfs (g, fstype, device);
@@ -11375,7 +11116,6 @@ static int test_write_file_5 (void)
   }
   {
     char device[] = "/dev/sda1";
-    device[5] = devchar;
     char mountpoint[] = "/";
     int r;
     suppress_error = 0;
@@ -11431,7 +11171,6 @@ static int test_mkfs_0 (void)
   /* InitNone|InitEmpty for test_mkfs_0 */
   {
     char device[] = "/dev/sda";
-    device[5] = devchar;
     int r;
     suppress_error = 0;
     r = guestfs_blockdev_setrw (g, device);
@@ -11456,7 +11195,6 @@ static int test_mkfs_0 (void)
   char expected[] = "new file contents";
   {
     char device[] = "/dev/sda";
-    device[5] = devchar;
     char lines_0[] = ",";
     char *lines[] = {
       lines_0,
@@ -11471,7 +11209,6 @@ static int test_mkfs_0 (void)
   {
     char fstype[] = "ext2";
     char device[] = "/dev/sda1";
-    device[5] = devchar;
     int r;
     suppress_error = 0;
     r = guestfs_mkfs (g, fstype, device);
@@ -11480,7 +11217,6 @@ static int test_mkfs_0 (void)
   }
   {
     char device[] = "/dev/sda1";
-    device[5] = devchar;
     char mountpoint[] = "/";
     int r;
     suppress_error = 0;
@@ -11534,7 +11270,6 @@ static int test_lvcreate_0 (void)
   /* InitNone|InitEmpty for test_lvcreate_0 */
   {
     char device[] = "/dev/sda";
-    device[5] = devchar;
     int r;
     suppress_error = 0;
     r = guestfs_blockdev_setrw (g, device);
@@ -11558,7 +11293,6 @@ static int test_lvcreate_0 (void)
   /* TestOutputList for lvcreate (0) */
   {
     char device[] = "/dev/sda";
-    device[5] = devchar;
     char lines_0[] = ",10";
     char lines_1[] = ",20";
     char lines_2[] = ",";
@@ -11576,7 +11310,6 @@ static int test_lvcreate_0 (void)
   }
   {
     char device[] = "/dev/sda1";
-    device[5] = devchar;
     int r;
     suppress_error = 0;
     r = guestfs_pvcreate (g, device);
@@ -11585,7 +11318,6 @@ static int test_lvcreate_0 (void)
   }
   {
     char device[] = "/dev/sda2";
-    device[5] = devchar;
     int r;
     suppress_error = 0;
     r = guestfs_pvcreate (g, device);
@@ -11594,7 +11326,6 @@ static int test_lvcreate_0 (void)
   }
   {
     char device[] = "/dev/sda3";
-    device[5] = devchar;
     int r;
     suppress_error = 0;
     r = guestfs_pvcreate (g, device);
@@ -11604,9 +11335,7 @@ static int test_lvcreate_0 (void)
   {
     char volgroup[] = "VG1";
     char physvols_0[] = "/dev/sda1";
-    physvols_0[5] = devchar;
     char physvols_1[] = "/dev/sda2";
-    physvols_1[5] = devchar;
     char *physvols[] = {
       physvols_0,
       physvols_1,
@@ -11621,7 +11350,6 @@ static int test_lvcreate_0 (void)
   {
     char volgroup[] = "VG2";
     char physvols_0[] = "/dev/sda3";
-    physvols_0[5] = devchar;
     char *physvols[] = {
       physvols_0,
       NULL
@@ -11777,7 +11505,6 @@ static int test_vgcreate_0 (void)
   /* InitNone|InitEmpty for test_vgcreate_0 */
   {
     char device[] = "/dev/sda";
-    device[5] = devchar;
     int r;
     suppress_error = 0;
     r = guestfs_blockdev_setrw (g, device);
@@ -11801,7 +11528,6 @@ static int test_vgcreate_0 (void)
   /* TestOutputList for vgcreate (0) */
   {
     char device[] = "/dev/sda";
-    device[5] = devchar;
     char lines_0[] = ",10";
     char lines_1[] = ",20";
     char lines_2[] = ",";
@@ -11819,7 +11545,6 @@ static int test_vgcreate_0 (void)
   }
   {
     char device[] = "/dev/sda1";
-    device[5] = devchar;
     int r;
     suppress_error = 0;
     r = guestfs_pvcreate (g, device);
@@ -11828,7 +11553,6 @@ static int test_vgcreate_0 (void)
   }
   {
     char device[] = "/dev/sda2";
-    device[5] = devchar;
     int r;
     suppress_error = 0;
     r = guestfs_pvcreate (g, device);
@@ -11837,7 +11561,6 @@ static int test_vgcreate_0 (void)
   }
   {
     char device[] = "/dev/sda3";
-    device[5] = devchar;
     int r;
     suppress_error = 0;
     r = guestfs_pvcreate (g, device);
@@ -11847,9 +11570,7 @@ static int test_vgcreate_0 (void)
   {
     char volgroup[] = "VG1";
     char physvols_0[] = "/dev/sda1";
-    physvols_0[5] = devchar;
     char physvols_1[] = "/dev/sda2";
-    physvols_1[5] = devchar;
     char *physvols[] = {
       physvols_0,
       physvols_1,
@@ -11864,7 +11585,6 @@ static int test_vgcreate_0 (void)
   {
     char volgroup[] = "VG2";
     char physvols_0[] = "/dev/sda3";
-    physvols_0[5] = devchar;
     char *physvols[] = {
       physvols_0,
       NULL
@@ -11939,7 +11659,6 @@ static int test_pvcreate_0 (void)
   /* InitNone|InitEmpty for test_pvcreate_0 */
   {
     char device[] = "/dev/sda";
-    device[5] = devchar;
     int r;
     suppress_error = 0;
     r = guestfs_blockdev_setrw (g, device);
@@ -11960,10 +11679,9 @@ static int test_pvcreate_0 (void)
     if (r == -1)
       return -1;
   }
-  /* TestOutputList for pvcreate (0) */
+  /* TestOutputListOfDevices for pvcreate (0) */
   {
     char device[] = "/dev/sda";
-    device[5] = devchar;
     char lines_0[] = ",10";
     char lines_1[] = ",20";
     char lines_2[] = ",";
@@ -11981,7 +11699,6 @@ static int test_pvcreate_0 (void)
   }
   {
     char device[] = "/dev/sda1";
-    device[5] = devchar;
     int r;
     suppress_error = 0;
     r = guestfs_pvcreate (g, device);
@@ -11990,7 +11707,6 @@ static int test_pvcreate_0 (void)
   }
   {
     char device[] = "/dev/sda2";
-    device[5] = devchar;
     int r;
     suppress_error = 0;
     r = guestfs_pvcreate (g, device);
@@ -11999,7 +11715,6 @@ static int test_pvcreate_0 (void)
   }
   {
     char device[] = "/dev/sda3";
-    device[5] = devchar;
     int r;
     suppress_error = 0;
     r = guestfs_pvcreate (g, device);
@@ -12020,7 +11735,7 @@ static int test_pvcreate_0 (void)
     }
     {
       char expected[] = "/dev/sda1";
-      expected[5] = devchar;
+      r[0][5] = 's';
       if (strcmp (r[0], expected) != 0) {
         fprintf (stderr, "test_pvcreate_0: expected \"%s\" but got \"%s\"\n", expected, r[0]);
         return -1;
@@ -12033,7 +11748,7 @@ static int test_pvcreate_0 (void)
     }
     {
       char expected[] = "/dev/sda2";
-      expected[5] = devchar;
+      r[1][5] = 's';
       if (strcmp (r[1], expected) != 0) {
         fprintf (stderr, "test_pvcreate_0: expected \"%s\" but got \"%s\"\n", expected, r[1]);
         return -1;
@@ -12046,7 +11761,7 @@ static int test_pvcreate_0 (void)
     }
     {
       char expected[] = "/dev/sda3";
-      expected[5] = devchar;
+      r[2][5] = 's';
       if (strcmp (r[2], expected) != 0) {
         fprintf (stderr, "test_pvcreate_0: expected \"%s\" but got \"%s\"\n", expected, r[2]);
         return -1;
@@ -12085,7 +11800,6 @@ static int test_is_dir_0 (void)
   /* InitBasicFS for test_is_dir_0: create ext2 on /dev/sda1 */
   {
     char device[] = "/dev/sda";
-    device[5] = devchar;
     int r;
     suppress_error = 0;
     r = guestfs_blockdev_setrw (g, device);
@@ -12108,7 +11822,6 @@ static int test_is_dir_0 (void)
   }
   {
     char device[] = "/dev/sda";
-    device[5] = devchar;
     char lines_0[] = ",";
     char *lines[] = {
       lines_0,
@@ -12123,7 +11836,6 @@ static int test_is_dir_0 (void)
   {
     char fstype[] = "ext2";
     char device[] = "/dev/sda1";
-    device[5] = devchar;
     int r;
     suppress_error = 0;
     r = guestfs_mkfs (g, fstype, device);
@@ -12132,7 +11844,6 @@ static int test_is_dir_0 (void)
   }
   {
     char device[] = "/dev/sda1";
-    device[5] = devchar;
     char mountpoint[] = "/";
     int r;
     suppress_error = 0;
@@ -12185,7 +11896,6 @@ static int test_is_dir_1 (void)
   /* InitBasicFS for test_is_dir_1: create ext2 on /dev/sda1 */
   {
     char device[] = "/dev/sda";
-    device[5] = devchar;
     int r;
     suppress_error = 0;
     r = guestfs_blockdev_setrw (g, device);
@@ -12208,7 +11918,6 @@ static int test_is_dir_1 (void)
   }
   {
     char device[] = "/dev/sda";
-    device[5] = devchar;
     char lines_0[] = ",";
     char *lines[] = {
       lines_0,
@@ -12223,7 +11932,6 @@ static int test_is_dir_1 (void)
   {
     char fstype[] = "ext2";
     char device[] = "/dev/sda1";
-    device[5] = devchar;
     int r;
     suppress_error = 0;
     r = guestfs_mkfs (g, fstype, device);
@@ -12232,7 +11940,6 @@ static int test_is_dir_1 (void)
   }
   {
     char device[] = "/dev/sda1";
-    device[5] = devchar;
     char mountpoint[] = "/";
     int r;
     suppress_error = 0;
@@ -12285,7 +11992,6 @@ static int test_is_file_0 (void)
   /* InitBasicFS for test_is_file_0: create ext2 on /dev/sda1 */
   {
     char device[] = "/dev/sda";
-    device[5] = devchar;
     int r;
     suppress_error = 0;
     r = guestfs_blockdev_setrw (g, device);
@@ -12308,7 +12014,6 @@ static int test_is_file_0 (void)
   }
   {
     char device[] = "/dev/sda";
-    device[5] = devchar;
     char lines_0[] = ",";
     char *lines[] = {
       lines_0,
@@ -12323,7 +12028,6 @@ static int test_is_file_0 (void)
   {
     char fstype[] = "ext2";
     char device[] = "/dev/sda1";
-    device[5] = devchar;
     int r;
     suppress_error = 0;
     r = guestfs_mkfs (g, fstype, device);
@@ -12332,7 +12036,6 @@ static int test_is_file_0 (void)
   }
   {
     char device[] = "/dev/sda1";
-    device[5] = devchar;
     char mountpoint[] = "/";
     int r;
     suppress_error = 0;
@@ -12385,7 +12088,6 @@ static int test_is_file_1 (void)
   /* InitBasicFS for test_is_file_1: create ext2 on /dev/sda1 */
   {
     char device[] = "/dev/sda";
-    device[5] = devchar;
     int r;
     suppress_error = 0;
     r = guestfs_blockdev_setrw (g, device);
@@ -12408,7 +12110,6 @@ static int test_is_file_1 (void)
   }
   {
     char device[] = "/dev/sda";
-    device[5] = devchar;
     char lines_0[] = ",";
     char *lines[] = {
       lines_0,
@@ -12423,7 +12124,6 @@ static int test_is_file_1 (void)
   {
     char fstype[] = "ext2";
     char device[] = "/dev/sda1";
-    device[5] = devchar;
     int r;
     suppress_error = 0;
     r = guestfs_mkfs (g, fstype, device);
@@ -12432,7 +12132,6 @@ static int test_is_file_1 (void)
   }
   {
     char device[] = "/dev/sda1";
-    device[5] = devchar;
     char mountpoint[] = "/";
     int r;
     suppress_error = 0;
@@ -12485,7 +12184,6 @@ static int test_exists_0 (void)
   /* InitBasicFS for test_exists_0: create ext2 on /dev/sda1 */
   {
     char device[] = "/dev/sda";
-    device[5] = devchar;
     int r;
     suppress_error = 0;
     r = guestfs_blockdev_setrw (g, device);
@@ -12508,7 +12206,6 @@ static int test_exists_0 (void)
   }
   {
     char device[] = "/dev/sda";
-    device[5] = devchar;
     char lines_0[] = ",";
     char *lines[] = {
       lines_0,
@@ -12523,7 +12220,6 @@ static int test_exists_0 (void)
   {
     char fstype[] = "ext2";
     char device[] = "/dev/sda1";
-    device[5] = devchar;
     int r;
     suppress_error = 0;
     r = guestfs_mkfs (g, fstype, device);
@@ -12532,7 +12228,6 @@ static int test_exists_0 (void)
   }
   {
     char device[] = "/dev/sda1";
-    device[5] = devchar;
     char mountpoint[] = "/";
     int r;
     suppress_error = 0;
@@ -12585,7 +12280,6 @@ static int test_exists_1 (void)
   /* InitBasicFS for test_exists_1: create ext2 on /dev/sda1 */
   {
     char device[] = "/dev/sda";
-    device[5] = devchar;
     int r;
     suppress_error = 0;
     r = guestfs_blockdev_setrw (g, device);
@@ -12608,7 +12302,6 @@ static int test_exists_1 (void)
   }
   {
     char device[] = "/dev/sda";
-    device[5] = devchar;
     char lines_0[] = ",";
     char *lines[] = {
       lines_0,
@@ -12623,7 +12316,6 @@ static int test_exists_1 (void)
   {
     char fstype[] = "ext2";
     char device[] = "/dev/sda1";
-    device[5] = devchar;
     int r;
     suppress_error = 0;
     r = guestfs_mkfs (g, fstype, device);
@@ -12632,7 +12324,6 @@ static int test_exists_1 (void)
   }
   {
     char device[] = "/dev/sda1";
-    device[5] = devchar;
     char mountpoint[] = "/";
     int r;
     suppress_error = 0;
@@ -12685,7 +12376,6 @@ static int test_mkdir_p_0 (void)
   /* InitBasicFS for test_mkdir_p_0: create ext2 on /dev/sda1 */
   {
     char device[] = "/dev/sda";
-    device[5] = devchar;
     int r;
     suppress_error = 0;
     r = guestfs_blockdev_setrw (g, device);
@@ -12708,7 +12398,6 @@ static int test_mkdir_p_0 (void)
   }
   {
     char device[] = "/dev/sda";
-    device[5] = devchar;
     char lines_0[] = ",";
     char *lines[] = {
       lines_0,
@@ -12723,7 +12412,6 @@ static int test_mkdir_p_0 (void)
   {
     char fstype[] = "ext2";
     char device[] = "/dev/sda1";
-    device[5] = devchar;
     int r;
     suppress_error = 0;
     r = guestfs_mkfs (g, fstype, device);
@@ -12732,7 +12420,6 @@ static int test_mkdir_p_0 (void)
   }
   {
     char device[] = "/dev/sda1";
-    device[5] = devchar;
     char mountpoint[] = "/";
     int r;
     suppress_error = 0;
@@ -12785,7 +12472,6 @@ static int test_mkdir_p_1 (void)
   /* InitBasicFS for test_mkdir_p_1: create ext2 on /dev/sda1 */
   {
     char device[] = "/dev/sda";
-    device[5] = devchar;
     int r;
     suppress_error = 0;
     r = guestfs_blockdev_setrw (g, device);
@@ -12808,7 +12494,6 @@ static int test_mkdir_p_1 (void)
   }
   {
     char device[] = "/dev/sda";
-    device[5] = devchar;
     char lines_0[] = ",";
     char *lines[] = {
       lines_0,
@@ -12823,7 +12508,6 @@ static int test_mkdir_p_1 (void)
   {
     char fstype[] = "ext2";
     char device[] = "/dev/sda1";
-    device[5] = devchar;
     int r;
     suppress_error = 0;
     r = guestfs_mkfs (g, fstype, device);
@@ -12832,7 +12516,6 @@ static int test_mkdir_p_1 (void)
   }
   {
     char device[] = "/dev/sda1";
-    device[5] = devchar;
     char mountpoint[] = "/";
     int r;
     suppress_error = 0;
@@ -12885,7 +12568,6 @@ static int test_mkdir_p_2 (void)
   /* InitBasicFS for test_mkdir_p_2: create ext2 on /dev/sda1 */
   {
     char device[] = "/dev/sda";
-    device[5] = devchar;
     int r;
     suppress_error = 0;
     r = guestfs_blockdev_setrw (g, device);
@@ -12908,7 +12590,6 @@ static int test_mkdir_p_2 (void)
   }
   {
     char device[] = "/dev/sda";
-    device[5] = devchar;
     char lines_0[] = ",";
     char *lines[] = {
       lines_0,
@@ -12923,7 +12604,6 @@ static int test_mkdir_p_2 (void)
   {
     char fstype[] = "ext2";
     char device[] = "/dev/sda1";
-    device[5] = devchar;
     int r;
     suppress_error = 0;
     r = guestfs_mkfs (g, fstype, device);
@@ -12932,7 +12612,6 @@ static int test_mkdir_p_2 (void)
   }
   {
     char device[] = "/dev/sda1";
-    device[5] = devchar;
     char mountpoint[] = "/";
     int r;
     suppress_error = 0;
@@ -12985,7 +12664,6 @@ static int test_mkdir_p_3 (void)
   /* InitBasicFS for test_mkdir_p_3: create ext2 on /dev/sda1 */
   {
     char device[] = "/dev/sda";
-    device[5] = devchar;
     int r;
     suppress_error = 0;
     r = guestfs_blockdev_setrw (g, device);
@@ -13008,7 +12686,6 @@ static int test_mkdir_p_3 (void)
   }
   {
     char device[] = "/dev/sda";
-    device[5] = devchar;
     char lines_0[] = ",";
     char *lines[] = {
       lines_0,
@@ -13023,7 +12700,6 @@ static int test_mkdir_p_3 (void)
   {
     char fstype[] = "ext2";
     char device[] = "/dev/sda1";
-    device[5] = devchar;
     int r;
     suppress_error = 0;
     r = guestfs_mkfs (g, fstype, device);
@@ -13032,7 +12708,6 @@ static int test_mkdir_p_3 (void)
   }
   {
     char device[] = "/dev/sda1";
-    device[5] = devchar;
     char mountpoint[] = "/";
     int r;
     suppress_error = 0;
@@ -13081,7 +12756,6 @@ static int test_mkdir_p_4 (void)
   /* InitBasicFS for test_mkdir_p_4: create ext2 on /dev/sda1 */
   {
     char device[] = "/dev/sda";
-    device[5] = devchar;
     int r;
     suppress_error = 0;
     r = guestfs_blockdev_setrw (g, device);
@@ -13104,7 +12778,6 @@ static int test_mkdir_p_4 (void)
   }
   {
     char device[] = "/dev/sda";
-    device[5] = devchar;
     char lines_0[] = ",";
     char *lines[] = {
       lines_0,
@@ -13119,7 +12792,6 @@ static int test_mkdir_p_4 (void)
   {
     char fstype[] = "ext2";
     char device[] = "/dev/sda1";
-    device[5] = devchar;
     int r;
     suppress_error = 0;
     r = guestfs_mkfs (g, fstype, device);
@@ -13128,7 +12800,6 @@ static int test_mkdir_p_4 (void)
   }
   {
     char device[] = "/dev/sda1";
-    device[5] = devchar;
     char mountpoint[] = "/";
     int r;
     suppress_error = 0;
@@ -13177,7 +12848,6 @@ static int test_mkdir_0 (void)
   /* InitBasicFS for test_mkdir_0: create ext2 on /dev/sda1 */
   {
     char device[] = "/dev/sda";
-    device[5] = devchar;
     int r;
     suppress_error = 0;
     r = guestfs_blockdev_setrw (g, device);
@@ -13200,7 +12870,6 @@ static int test_mkdir_0 (void)
   }
   {
     char device[] = "/dev/sda";
-    device[5] = devchar;
     char lines_0[] = ",";
     char *lines[] = {
       lines_0,
@@ -13215,7 +12884,6 @@ static int test_mkdir_0 (void)
   {
     char fstype[] = "ext2";
     char device[] = "/dev/sda1";
-    device[5] = devchar;
     int r;
     suppress_error = 0;
     r = guestfs_mkfs (g, fstype, device);
@@ -13224,7 +12892,6 @@ static int test_mkdir_0 (void)
   }
   {
     char device[] = "/dev/sda1";
-    device[5] = devchar;
     char mountpoint[] = "/";
     int r;
     suppress_error = 0;
@@ -13277,7 +12944,6 @@ static int test_mkdir_1 (void)
   /* InitBasicFS for test_mkdir_1: create ext2 on /dev/sda1 */
   {
     char device[] = "/dev/sda";
-    device[5] = devchar;
     int r;
     suppress_error = 0;
     r = guestfs_blockdev_setrw (g, device);
@@ -13300,7 +12966,6 @@ static int test_mkdir_1 (void)
   }
   {
     char device[] = "/dev/sda";
-    device[5] = devchar;
     char lines_0[] = ",";
     char *lines[] = {
       lines_0,
@@ -13315,7 +12980,6 @@ static int test_mkdir_1 (void)
   {
     char fstype[] = "ext2";
     char device[] = "/dev/sda1";
-    device[5] = devchar;
     int r;
     suppress_error = 0;
     r = guestfs_mkfs (g, fstype, device);
@@ -13324,7 +12988,6 @@ static int test_mkdir_1 (void)
   }
   {
     char device[] = "/dev/sda1";
-    device[5] = devchar;
     char mountpoint[] = "/";
     int r;
     suppress_error = 0;
@@ -13365,7 +13028,6 @@ static int test_rm_rf_0 (void)
   /* InitBasicFS for test_rm_rf_0: create ext2 on /dev/sda1 */
   {
     char device[] = "/dev/sda";
-    device[5] = devchar;
     int r;
     suppress_error = 0;
     r = guestfs_blockdev_setrw (g, device);
@@ -13388,7 +13050,6 @@ static int test_rm_rf_0 (void)
   }
   {
     char device[] = "/dev/sda";
-    device[5] = devchar;
     char lines_0[] = ",";
     char *lines[] = {
       lines_0,
@@ -13403,7 +13064,6 @@ static int test_rm_rf_0 (void)
   {
     char fstype[] = "ext2";
     char device[] = "/dev/sda1";
-    device[5] = devchar;
     int r;
     suppress_error = 0;
     r = guestfs_mkfs (g, fstype, device);
@@ -13412,7 +13072,6 @@ static int test_rm_rf_0 (void)
   }
   {
     char device[] = "/dev/sda1";
-    device[5] = devchar;
     char mountpoint[] = "/";
     int r;
     suppress_error = 0;
@@ -13489,7 +13148,6 @@ static int test_rmdir_0 (void)
   /* InitBasicFS for test_rmdir_0: create ext2 on /dev/sda1 */
   {
     char device[] = "/dev/sda";
-    device[5] = devchar;
     int r;
     suppress_error = 0;
     r = guestfs_blockdev_setrw (g, device);
@@ -13512,7 +13170,6 @@ static int test_rmdir_0 (void)
   }
   {
     char device[] = "/dev/sda";
-    device[5] = devchar;
     char lines_0[] = ",";
     char *lines[] = {
       lines_0,
@@ -13527,7 +13184,6 @@ static int test_rmdir_0 (void)
   {
     char fstype[] = "ext2";
     char device[] = "/dev/sda1";
-    device[5] = devchar;
     int r;
     suppress_error = 0;
     r = guestfs_mkfs (g, fstype, device);
@@ -13536,7 +13192,6 @@ static int test_rmdir_0 (void)
   }
   {
     char device[] = "/dev/sda1";
-    device[5] = devchar;
     char mountpoint[] = "/";
     int r;
     suppress_error = 0;
@@ -13585,7 +13240,6 @@ static int test_rmdir_1 (void)
   /* InitBasicFS for test_rmdir_1: create ext2 on /dev/sda1 */
   {
     char device[] = "/dev/sda";
-    device[5] = devchar;
     int r;
     suppress_error = 0;
     r = guestfs_blockdev_setrw (g, device);
@@ -13608,7 +13262,6 @@ static int test_rmdir_1 (void)
   }
   {
     char device[] = "/dev/sda";
-    device[5] = devchar;
     char lines_0[] = ",";
     char *lines[] = {
       lines_0,
@@ -13623,7 +13276,6 @@ static int test_rmdir_1 (void)
   {
     char fstype[] = "ext2";
     char device[] = "/dev/sda1";
-    device[5] = devchar;
     int r;
     suppress_error = 0;
     r = guestfs_mkfs (g, fstype, device);
@@ -13632,7 +13284,6 @@ static int test_rmdir_1 (void)
   }
   {
     char device[] = "/dev/sda1";
-    device[5] = devchar;
     char mountpoint[] = "/";
     int r;
     suppress_error = 0;
@@ -13673,7 +13324,6 @@ static int test_rmdir_2 (void)
   /* InitBasicFS for test_rmdir_2: create ext2 on /dev/sda1 */
   {
     char device[] = "/dev/sda";
-    device[5] = devchar;
     int r;
     suppress_error = 0;
     r = guestfs_blockdev_setrw (g, device);
@@ -13696,7 +13346,6 @@ static int test_rmdir_2 (void)
   }
   {
     char device[] = "/dev/sda";
-    device[5] = devchar;
     char lines_0[] = ",";
     char *lines[] = {
       lines_0,
@@ -13711,7 +13360,6 @@ static int test_rmdir_2 (void)
   {
     char fstype[] = "ext2";
     char device[] = "/dev/sda1";
-    device[5] = devchar;
     int r;
     suppress_error = 0;
     r = guestfs_mkfs (g, fstype, device);
@@ -13720,7 +13368,6 @@ static int test_rmdir_2 (void)
   }
   {
     char device[] = "/dev/sda1";
-    device[5] = devchar;
     char mountpoint[] = "/";
     int r;
     suppress_error = 0;
@@ -13769,7 +13416,6 @@ static int test_rm_0 (void)
   /* InitBasicFS for test_rm_0: create ext2 on /dev/sda1 */
   {
     char device[] = "/dev/sda";
-    device[5] = devchar;
     int r;
     suppress_error = 0;
     r = guestfs_blockdev_setrw (g, device);
@@ -13792,7 +13438,6 @@ static int test_rm_0 (void)
   }
   {
     char device[] = "/dev/sda";
-    device[5] = devchar;
     char lines_0[] = ",";
     char *lines[] = {
       lines_0,
@@ -13807,7 +13452,6 @@ static int test_rm_0 (void)
   {
     char fstype[] = "ext2";
     char device[] = "/dev/sda1";
-    device[5] = devchar;
     int r;
     suppress_error = 0;
     r = guestfs_mkfs (g, fstype, device);
@@ -13816,7 +13460,6 @@ static int test_rm_0 (void)
   }
   {
     char device[] = "/dev/sda1";
-    device[5] = devchar;
     char mountpoint[] = "/";
     int r;
     suppress_error = 0;
@@ -13865,7 +13508,6 @@ static int test_rm_1 (void)
   /* InitBasicFS for test_rm_1: create ext2 on /dev/sda1 */
   {
     char device[] = "/dev/sda";
-    device[5] = devchar;
     int r;
     suppress_error = 0;
     r = guestfs_blockdev_setrw (g, device);
@@ -13888,7 +13530,6 @@ static int test_rm_1 (void)
   }
   {
     char device[] = "/dev/sda";
-    device[5] = devchar;
     char lines_0[] = ",";
     char *lines[] = {
       lines_0,
@@ -13903,7 +13544,6 @@ static int test_rm_1 (void)
   {
     char fstype[] = "ext2";
     char device[] = "/dev/sda1";
-    device[5] = devchar;
     int r;
     suppress_error = 0;
     r = guestfs_mkfs (g, fstype, device);
@@ -13912,7 +13552,6 @@ static int test_rm_1 (void)
   }
   {
     char device[] = "/dev/sda1";
-    device[5] = devchar;
     char mountpoint[] = "/";
     int r;
     suppress_error = 0;
@@ -13953,7 +13592,6 @@ static int test_rm_2 (void)
   /* InitBasicFS for test_rm_2: create ext2 on /dev/sda1 */
   {
     char device[] = "/dev/sda";
-    device[5] = devchar;
     int r;
     suppress_error = 0;
     r = guestfs_blockdev_setrw (g, device);
@@ -13976,7 +13614,6 @@ static int test_rm_2 (void)
   }
   {
     char device[] = "/dev/sda";
-    device[5] = devchar;
     char lines_0[] = ",";
     char *lines[] = {
       lines_0,
@@ -13991,7 +13628,6 @@ static int test_rm_2 (void)
   {
     char fstype[] = "ext2";
     char device[] = "/dev/sda1";
-    device[5] = devchar;
     int r;
     suppress_error = 0;
     r = guestfs_mkfs (g, fstype, device);
@@ -14000,7 +13636,6 @@ static int test_rm_2 (void)
   }
   {
     char device[] = "/dev/sda1";
-    device[5] = devchar;
     char mountpoint[] = "/";
     int r;
     suppress_error = 0;
@@ -14049,7 +13684,6 @@ static int test_read_lines_0 (void)
   /* InitBasicFS for test_read_lines_0: create ext2 on /dev/sda1 */
   {
     char device[] = "/dev/sda";
-    device[5] = devchar;
     int r;
     suppress_error = 0;
     r = guestfs_blockdev_setrw (g, device);
@@ -14072,7 +13706,6 @@ static int test_read_lines_0 (void)
   }
   {
     char device[] = "/dev/sda";
-    device[5] = devchar;
     char lines_0[] = ",";
     char *lines[] = {
       lines_0,
@@ -14087,7 +13720,6 @@ static int test_read_lines_0 (void)
   {
     char fstype[] = "ext2";
     char device[] = "/dev/sda1";
-    device[5] = devchar;
     int r;
     suppress_error = 0;
     r = guestfs_mkfs (g, fstype, device);
@@ -14096,7 +13728,6 @@ static int test_read_lines_0 (void)
   }
   {
     char device[] = "/dev/sda1";
-    device[5] = devchar;
     char mountpoint[] = "/";
     int r;
     suppress_error = 0;
@@ -14191,7 +13822,6 @@ static int test_read_lines_1 (void)
   /* InitBasicFS for test_read_lines_1: create ext2 on /dev/sda1 */
   {
     char device[] = "/dev/sda";
-    device[5] = devchar;
     int r;
     suppress_error = 0;
     r = guestfs_blockdev_setrw (g, device);
@@ -14214,7 +13844,6 @@ static int test_read_lines_1 (void)
   }
   {
     char device[] = "/dev/sda";
-    device[5] = devchar;
     char lines_0[] = ",";
     char *lines[] = {
       lines_0,
@@ -14229,7 +13858,6 @@ static int test_read_lines_1 (void)
   {
     char fstype[] = "ext2";
     char device[] = "/dev/sda1";
-    device[5] = devchar;
     int r;
     suppress_error = 0;
     r = guestfs_mkfs (g, fstype, device);
@@ -14238,7 +13866,6 @@ static int test_read_lines_1 (void)
   }
   {
     char device[] = "/dev/sda1";
-    device[5] = devchar;
     char mountpoint[] = "/";
     int r;
     suppress_error = 0;
@@ -14297,7 +13924,6 @@ static int test_lvs_0 (void)
   /* InitBasicFSonLVM for test_lvs_0: create ext2 on /dev/VG/LV */
   {
     char device[] = "/dev/sda";
-    device[5] = devchar;
     int r;
     suppress_error = 0;
     r = guestfs_blockdev_setrw (g, device);
@@ -14320,7 +13946,6 @@ static int test_lvs_0 (void)
   }
   {
     char device[] = "/dev/sda";
-    device[5] = devchar;
     char lines_0[] = ",";
     char *lines[] = {
       lines_0,
@@ -14334,7 +13959,6 @@ static int test_lvs_0 (void)
   }
   {
     char device[] = "/dev/sda1";
-    device[5] = devchar;
     int r;
     suppress_error = 0;
     r = guestfs_pvcreate (g, device);
@@ -14344,7 +13968,6 @@ static int test_lvs_0 (void)
   {
     char volgroup[] = "VG";
     char physvols_0[] = "/dev/sda1";
-    physvols_0[5] = devchar;
     char *physvols[] = {
       physvols_0,
       NULL
@@ -14435,7 +14058,6 @@ static int test_lvs_1 (void)
   /* InitNone|InitEmpty for test_lvs_1 */
   {
     char device[] = "/dev/sda";
-    device[5] = devchar;
     int r;
     suppress_error = 0;
     r = guestfs_blockdev_setrw (g, device);
@@ -14459,7 +14081,6 @@ static int test_lvs_1 (void)
   /* TestOutputList for lvs (1) */
   {
     char device[] = "/dev/sda";
-    device[5] = devchar;
     char lines_0[] = ",10";
     char lines_1[] = ",20";
     char lines_2[] = ",";
@@ -14477,7 +14098,6 @@ static int test_lvs_1 (void)
   }
   {
     char device[] = "/dev/sda1";
-    device[5] = devchar;
     int r;
     suppress_error = 0;
     r = guestfs_pvcreate (g, device);
@@ -14486,7 +14106,6 @@ static int test_lvs_1 (void)
   }
   {
     char device[] = "/dev/sda2";
-    device[5] = devchar;
     int r;
     suppress_error = 0;
     r = guestfs_pvcreate (g, device);
@@ -14495,7 +14114,6 @@ static int test_lvs_1 (void)
   }
   {
     char device[] = "/dev/sda3";
-    device[5] = devchar;
     int r;
     suppress_error = 0;
     r = guestfs_pvcreate (g, device);
@@ -14505,9 +14123,7 @@ static int test_lvs_1 (void)
   {
     char volgroup[] = "VG1";
     char physvols_0[] = "/dev/sda1";
-    physvols_0[5] = devchar;
     char physvols_1[] = "/dev/sda2";
-    physvols_1[5] = devchar;
     char *physvols[] = {
       physvols_0,
       physvols_1,
@@ -14522,7 +14138,6 @@ static int test_lvs_1 (void)
   {
     char volgroup[] = "VG2";
     char physvols_0[] = "/dev/sda3";
-    physvols_0[5] = devchar;
     char *physvols[] = {
       physvols_0,
       NULL
@@ -14636,7 +14251,6 @@ static int test_vgs_0 (void)
   /* InitBasicFSonLVM for test_vgs_0: create ext2 on /dev/VG/LV */
   {
     char device[] = "/dev/sda";
-    device[5] = devchar;
     int r;
     suppress_error = 0;
     r = guestfs_blockdev_setrw (g, device);
@@ -14659,7 +14273,6 @@ static int test_vgs_0 (void)
   }
   {
     char device[] = "/dev/sda";
-    device[5] = devchar;
     char lines_0[] = ",";
     char *lines[] = {
       lines_0,
@@ -14673,7 +14286,6 @@ static int test_vgs_0 (void)
   }
   {
     char device[] = "/dev/sda1";
-    device[5] = devchar;
     int r;
     suppress_error = 0;
     r = guestfs_pvcreate (g, device);
@@ -14683,7 +14295,6 @@ static int test_vgs_0 (void)
   {
     char volgroup[] = "VG";
     char physvols_0[] = "/dev/sda1";
-    physvols_0[5] = devchar;
     char *physvols[] = {
       physvols_0,
       NULL
@@ -14774,7 +14385,6 @@ static int test_vgs_1 (void)
   /* InitNone|InitEmpty for test_vgs_1 */
   {
     char device[] = "/dev/sda";
-    device[5] = devchar;
     int r;
     suppress_error = 0;
     r = guestfs_blockdev_setrw (g, device);
@@ -14798,7 +14408,6 @@ static int test_vgs_1 (void)
   /* TestOutputList for vgs (1) */
   {
     char device[] = "/dev/sda";
-    device[5] = devchar;
     char lines_0[] = ",10";
     char lines_1[] = ",20";
     char lines_2[] = ",";
@@ -14816,7 +14425,6 @@ static int test_vgs_1 (void)
   }
   {
     char device[] = "/dev/sda1";
-    device[5] = devchar;
     int r;
     suppress_error = 0;
     r = guestfs_pvcreate (g, device);
@@ -14825,7 +14433,6 @@ static int test_vgs_1 (void)
   }
   {
     char device[] = "/dev/sda2";
-    device[5] = devchar;
     int r;
     suppress_error = 0;
     r = guestfs_pvcreate (g, device);
@@ -14834,7 +14441,6 @@ static int test_vgs_1 (void)
   }
   {
     char device[] = "/dev/sda3";
-    device[5] = devchar;
     int r;
     suppress_error = 0;
     r = guestfs_pvcreate (g, device);
@@ -14844,9 +14450,7 @@ static int test_vgs_1 (void)
   {
     char volgroup[] = "VG1";
     char physvols_0[] = "/dev/sda1";
-    physvols_0[5] = devchar;
     char physvols_1[] = "/dev/sda2";
-    physvols_1[5] = devchar;
     char *physvols[] = {
       physvols_0,
       physvols_1,
@@ -14861,7 +14465,6 @@ static int test_vgs_1 (void)
   {
     char volgroup[] = "VG2";
     char physvols_0[] = "/dev/sda3";
-    physvols_0[5] = devchar;
     char *physvols[] = {
       physvols_0,
       NULL
@@ -14936,7 +14539,6 @@ static int test_pvs_0 (void)
   /* InitBasicFSonLVM for test_pvs_0: create ext2 on /dev/VG/LV */
   {
     char device[] = "/dev/sda";
-    device[5] = devchar;
     int r;
     suppress_error = 0;
     r = guestfs_blockdev_setrw (g, device);
@@ -14959,7 +14561,6 @@ static int test_pvs_0 (void)
   }
   {
     char device[] = "/dev/sda";
-    device[5] = devchar;
     char lines_0[] = ",";
     char *lines[] = {
       lines_0,
@@ -14973,7 +14574,6 @@ static int test_pvs_0 (void)
   }
   {
     char device[] = "/dev/sda1";
-    device[5] = devchar;
     int r;
     suppress_error = 0;
     r = guestfs_pvcreate (g, device);
@@ -14983,7 +14583,6 @@ static int test_pvs_0 (void)
   {
     char volgroup[] = "VG";
     char physvols_0[] = "/dev/sda1";
-    physvols_0[5] = devchar;
     char *physvols[] = {
       physvols_0,
       NULL
@@ -15021,7 +14620,7 @@ static int test_pvs_0 (void)
     if (r == -1)
       return -1;
   }
-  /* TestOutputList for pvs (0) */
+  /* TestOutputListOfDevices for pvs (0) */
   {
     char **r;
     int i;
@@ -15036,7 +14635,7 @@ static int test_pvs_0 (void)
     }
     {
       char expected[] = "/dev/sda1";
-      expected[5] = devchar;
+      r[0][5] = 's';
       if (strcmp (r[0], expected) != 0) {
         fprintf (stderr, "test_pvs_0: expected \"%s\" but got \"%s\"\n", expected, r[0]);
         return -1;
@@ -15075,7 +14674,6 @@ static int test_pvs_1 (void)
   /* InitNone|InitEmpty for test_pvs_1 */
   {
     char device[] = "/dev/sda";
-    device[5] = devchar;
     int r;
     suppress_error = 0;
     r = guestfs_blockdev_setrw (g, device);
@@ -15096,10 +14694,9 @@ static int test_pvs_1 (void)
     if (r == -1)
       return -1;
   }
-  /* TestOutputList for pvs (1) */
+  /* TestOutputListOfDevices for pvs (1) */
   {
     char device[] = "/dev/sda";
-    device[5] = devchar;
     char lines_0[] = ",10";
     char lines_1[] = ",20";
     char lines_2[] = ",";
@@ -15117,7 +14714,6 @@ static int test_pvs_1 (void)
   }
   {
     char device[] = "/dev/sda1";
-    device[5] = devchar;
     int r;
     suppress_error = 0;
     r = guestfs_pvcreate (g, device);
@@ -15126,7 +14722,6 @@ static int test_pvs_1 (void)
   }
   {
     char device[] = "/dev/sda2";
-    device[5] = devchar;
     int r;
     suppress_error = 0;
     r = guestfs_pvcreate (g, device);
@@ -15135,7 +14730,6 @@ static int test_pvs_1 (void)
   }
   {
     char device[] = "/dev/sda3";
-    device[5] = devchar;
     int r;
     suppress_error = 0;
     r = guestfs_pvcreate (g, device);
@@ -15156,7 +14750,7 @@ static int test_pvs_1 (void)
     }
     {
       char expected[] = "/dev/sda1";
-      expected[5] = devchar;
+      r[0][5] = 's';
       if (strcmp (r[0], expected) != 0) {
         fprintf (stderr, "test_pvs_1: expected \"%s\" but got \"%s\"\n", expected, r[0]);
         return -1;
@@ -15169,7 +14763,7 @@ static int test_pvs_1 (void)
     }
     {
       char expected[] = "/dev/sda2";
-      expected[5] = devchar;
+      r[1][5] = 's';
       if (strcmp (r[1], expected) != 0) {
         fprintf (stderr, "test_pvs_1: expected \"%s\" but got \"%s\"\n", expected, r[1]);
         return -1;
@@ -15182,7 +14776,7 @@ static int test_pvs_1 (void)
     }
     {
       char expected[] = "/dev/sda3";
-      expected[5] = devchar;
+      r[2][5] = 's';
       if (strcmp (r[2], expected) != 0) {
         fprintf (stderr, "test_pvs_1: expected \"%s\" but got \"%s\"\n", expected, r[2]);
         return -1;
@@ -15221,7 +14815,6 @@ static int test_list_partitions_0 (void)
   /* InitBasicFS for test_list_partitions_0: create ext2 on /dev/sda1 */
   {
     char device[] = "/dev/sda";
-    device[5] = devchar;
     int r;
     suppress_error = 0;
     r = guestfs_blockdev_setrw (g, device);
@@ -15244,7 +14837,6 @@ static int test_list_partitions_0 (void)
   }
   {
     char device[] = "/dev/sda";
-    device[5] = devchar;
     char lines_0[] = ",";
     char *lines[] = {
       lines_0,
@@ -15259,7 +14851,6 @@ static int test_list_partitions_0 (void)
   {
     char fstype[] = "ext2";
     char device[] = "/dev/sda1";
-    device[5] = devchar;
     int r;
     suppress_error = 0;
     r = guestfs_mkfs (g, fstype, device);
@@ -15268,7 +14859,6 @@ static int test_list_partitions_0 (void)
   }
   {
     char device[] = "/dev/sda1";
-    device[5] = devchar;
     char mountpoint[] = "/";
     int r;
     suppress_error = 0;
@@ -15276,7 +14866,7 @@ static int test_list_partitions_0 (void)
     if (r == -1)
       return -1;
   }
-  /* TestOutputList for list_partitions (0) */
+  /* TestOutputListOfDevices for list_partitions (0) */
   {
     char **r;
     int i;
@@ -15291,7 +14881,7 @@ static int test_list_partitions_0 (void)
     }
     {
       char expected[] = "/dev/sda1";
-      expected[5] = devchar;
+      r[0][5] = 's';
       if (strcmp (r[0], expected) != 0) {
         fprintf (stderr, "test_list_partitions_0: expected \"%s\" but got \"%s\"\n", expected, r[0]);
         return -1;
@@ -15330,7 +14920,6 @@ static int test_list_partitions_1 (void)
   /* InitNone|InitEmpty for test_list_partitions_1 */
   {
     char device[] = "/dev/sda";
-    device[5] = devchar;
     int r;
     suppress_error = 0;
     r = guestfs_blockdev_setrw (g, device);
@@ -15351,10 +14940,9 @@ static int test_list_partitions_1 (void)
     if (r == -1)
       return -1;
   }
-  /* TestOutputList for list_partitions (1) */
+  /* TestOutputListOfDevices for list_partitions (1) */
   {
     char device[] = "/dev/sda";
-    device[5] = devchar;
     char lines_0[] = ",10";
     char lines_1[] = ",20";
     char lines_2[] = ",";
@@ -15384,7 +14972,7 @@ static int test_list_partitions_1 (void)
     }
     {
       char expected[] = "/dev/sda1";
-      expected[5] = devchar;
+      r[0][5] = 's';
       if (strcmp (r[0], expected) != 0) {
         fprintf (stderr, "test_list_partitions_1: expected \"%s\" but got \"%s\"\n", expected, r[0]);
         return -1;
@@ -15397,7 +14985,7 @@ static int test_list_partitions_1 (void)
     }
     {
       char expected[] = "/dev/sda2";
-      expected[5] = devchar;
+      r[1][5] = 's';
       if (strcmp (r[1], expected) != 0) {
         fprintf (stderr, "test_list_partitions_1: expected \"%s\" but got \"%s\"\n", expected, r[1]);
         return -1;
@@ -15410,7 +14998,7 @@ static int test_list_partitions_1 (void)
     }
     {
       char expected[] = "/dev/sda3";
-      expected[5] = devchar;
+      r[2][5] = 's';
       if (strcmp (r[2], expected) != 0) {
         fprintf (stderr, "test_list_partitions_1: expected \"%s\" but got \"%s\"\n", expected, r[2]);
         return -1;
@@ -15449,7 +15037,6 @@ static int test_list_devices_0 (void)
   /* InitNone|InitEmpty for test_list_devices_0 */
   {
     char device[] = "/dev/sda";
-    device[5] = devchar;
     int r;
     suppress_error = 0;
     r = guestfs_blockdev_setrw (g, device);
@@ -15470,7 +15057,7 @@ static int test_list_devices_0 (void)
     if (r == -1)
       return -1;
   }
-  /* TestOutputList for list_devices (0) */
+  /* TestOutputListOfDevices for list_devices (0) */
   {
     char **r;
     int i;
@@ -15485,7 +15072,7 @@ static int test_list_devices_0 (void)
     }
     {
       char expected[] = "/dev/sda";
-      expected[5] = devchar;
+      r[0][5] = 's';
       if (strcmp (r[0], expected) != 0) {
         fprintf (stderr, "test_list_devices_0: expected \"%s\" but got \"%s\"\n", expected, r[0]);
         return -1;
@@ -15498,7 +15085,7 @@ static int test_list_devices_0 (void)
     }
     {
       char expected[] = "/dev/sdb";
-      expected[5] = devchar;
+      r[1][5] = 's';
       if (strcmp (r[1], expected) != 0) {
         fprintf (stderr, "test_list_devices_0: expected \"%s\" but got \"%s\"\n", expected, r[1]);
         return -1;
@@ -15511,7 +15098,7 @@ static int test_list_devices_0 (void)
     }
     {
       char expected[] = "/dev/sdc";
-      expected[5] = devchar;
+      r[2][5] = 's';
       if (strcmp (r[2], expected) != 0) {
         fprintf (stderr, "test_list_devices_0: expected \"%s\" but got \"%s\"\n", expected, r[2]);
         return -1;
@@ -15524,7 +15111,7 @@ static int test_list_devices_0 (void)
     }
     {
       char expected[] = "/dev/sdd";
-      expected[5] = devchar;
+      r[3][5] = 's';
       if (strcmp (r[3], expected) != 0) {
         fprintf (stderr, "test_list_devices_0: expected \"%s\" but got \"%s\"\n", expected, r[3]);
         return -1;
@@ -15563,7 +15150,6 @@ static int test_ls_0 (void)
   /* InitBasicFS for test_ls_0: create ext2 on /dev/sda1 */
   {
     char device[] = "/dev/sda";
-    device[5] = devchar;
     int r;
     suppress_error = 0;
     r = guestfs_blockdev_setrw (g, device);
@@ -15586,7 +15172,6 @@ static int test_ls_0 (void)
   }
   {
     char device[] = "/dev/sda";
-    device[5] = devchar;
     char lines_0[] = ",";
     char *lines[] = {
       lines_0,
@@ -15601,7 +15186,6 @@ static int test_ls_0 (void)
   {
     char fstype[] = "ext2";
     char device[] = "/dev/sda1";
-    device[5] = devchar;
     int r;
     suppress_error = 0;
     r = guestfs_mkfs (g, fstype, device);
@@ -15610,7 +15194,6 @@ static int test_ls_0 (void)
   }
   {
     char device[] = "/dev/sda1";
-    device[5] = devchar;
     char mountpoint[] = "/";
     int r;
     suppress_error = 0;
@@ -15732,7 +15315,6 @@ static int test_cat_0 (void)
   /* InitBasicFS for test_cat_0: create ext2 on /dev/sda1 */
   {
     char device[] = "/dev/sda";
-    device[5] = devchar;
     int r;
     suppress_error = 0;
     r = guestfs_blockdev_setrw (g, device);
@@ -15755,7 +15337,6 @@ static int test_cat_0 (void)
   }
   {
     char device[] = "/dev/sda";
-    device[5] = devchar;
     char lines_0[] = ",";
     char *lines[] = {
       lines_0,
@@ -15770,7 +15351,6 @@ static int test_cat_0 (void)
   {
     char fstype[] = "ext2";
     char device[] = "/dev/sda1";
-    device[5] = devchar;
     int r;
     suppress_error = 0;
     r = guestfs_mkfs (g, fstype, device);
@@ -15779,7 +15359,6 @@ static int test_cat_0 (void)
   }
   {
     char device[] = "/dev/sda1";
-    device[5] = devchar;
     char mountpoint[] = "/";
     int r;
     suppress_error = 0;
@@ -15835,7 +15414,6 @@ static int test_touch_0 (void)
   /* InitBasicFS for test_touch_0: create ext2 on /dev/sda1 */
   {
     char device[] = "/dev/sda";
-    device[5] = devchar;
     int r;
     suppress_error = 0;
     r = guestfs_blockdev_setrw (g, device);
@@ -15858,7 +15436,6 @@ static int test_touch_0 (void)
   }
   {
     char device[] = "/dev/sda";
-    device[5] = devchar;
     char lines_0[] = ",";
     char *lines[] = {
       lines_0,
@@ -15873,7 +15450,6 @@ static int test_touch_0 (void)
   {
     char fstype[] = "ext2";
     char device[] = "/dev/sda1";
-    device[5] = devchar;
     int r;
     suppress_error = 0;
     r = guestfs_mkfs (g, fstype, device);
@@ -15882,7 +15458,6 @@ static int test_touch_0 (void)
   }
   {
     char device[] = "/dev/sda1";
-    device[5] = devchar;
     char mountpoint[] = "/";
     int r;
     suppress_error = 0;
@@ -15935,7 +15510,6 @@ static int test_sync_0 (void)
   /* InitNone|InitEmpty for test_sync_0 */
   {
     char device[] = "/dev/sda";
-    device[5] = devchar;
     int r;
     suppress_error = 0;
     r = guestfs_blockdev_setrw (g, device);
@@ -15988,7 +15562,6 @@ static int test_mount_0 (void)
   /* InitNone|InitEmpty for test_mount_0 */
   {
     char device[] = "/dev/sda";
-    device[5] = devchar;
     int r;
     suppress_error = 0;
     r = guestfs_blockdev_setrw (g, device);
@@ -16013,7 +15586,6 @@ static int test_mount_0 (void)
   char expected[] = "new file contents";
   {
     char device[] = "/dev/sda";
-    device[5] = devchar;
     char lines_0[] = ",";
     char *lines[] = {
       lines_0,
@@ -16028,7 +15600,6 @@ static int test_mount_0 (void)
   {
     char fstype[] = "ext2";
     char device[] = "/dev/sda1";
-    device[5] = devchar;
     int r;
     suppress_error = 0;
     r = guestfs_mkfs (g, fstype, device);
@@ -16037,7 +15608,6 @@ static int test_mount_0 (void)
   }
   {
     char device[] = "/dev/sda1";
-    device[5] = devchar;
     char mountpoint[] = "/";
     int r;
     suppress_error = 0;
@@ -16075,9 +15645,8 @@ int main (int argc, char *argv[])
   char c = 0;
   int failed = 0;
   const char *filename;
-  int fd, i;
+  int fd;
   int nr_tests, test_num = 0;
-  char **devs;
 
   no_test_warnings ();
 
@@ -16184,36 +15753,33 @@ int main (int argc, char *argv[])
     printf ("guestfs_launch FAILED\n");
     exit (1);
   }
+
+  /* Set a timeout in case qemu hangs during launch (RHBZ#505329). */
+  alarm (600);
+
   if (guestfs_wait_ready (g) == -1) {
     printf ("guestfs_wait_ready FAILED\n");
     exit (1);
   }
 
-  /* Detect if the appliance uses /dev/sd* or /dev/hd* in device
-   * names.  This changed between RHEL 5 and RHEL 6 so we have to
-   * support both.
-   */
-  devs = guestfs_list_devices (g);
-  if (devs == NULL || devs[0] == NULL) {
-    printf ("guestfs_list_devices FAILED\n");
-    exit (1);
-  }
-  if (strncmp (devs[0], "/dev/sd", 7) == 0)
-    devchar = 's';
-  else if (strncmp (devs[0], "/dev/hd", 7) == 0)
-    devchar = 'h';
-  else {
-    printf ("guestfs_list_devices returned unexpected string '%s'\n",
-            devs[0]);
-    exit (1);
-  }
-  for (i = 0; devs[i] != NULL; ++i)
-    free (devs[i]);
-  free (devs);
+  /* Cancel previous alarm. */
+  alarm (0);
 
-  nr_tests = 144;
+  nr_tests = 146;
 
   test_num++;
+  printf ("%3d/%3d test_ntfs_3g_probe_0\n", test_num, nr_tests);
+  if (test_ntfs_3g_probe_0 () == -1) {
+    printf ("test_ntfs_3g_probe_0 FAILED\n");
+    failed++;
+  }
+  test_num++;
+  printf ("%3d/%3d test_ntfs_3g_probe_1\n", test_num, nr_tests);
+  if (test_ntfs_3g_probe_1 () == -1) {
+    printf ("test_ntfs_3g_probe_1 FAILED\n");
+    failed++;
+  }
+  test_num++;
   printf ("%3d/%3d test_sleep_0\n", test_num, nr_tests);
   if (test_sleep_0 () == -1) {
     printf ("test_sleep_0 FAILED\n");