Add large test files with standard content for the C API test.
[libguestfs.git] / capitests / tests.c
index 1b751e8..dffa500 100644 (file)
 static guestfs_h *g;
 static int suppress_error = 0;
 
 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)
 static void print_error (guestfs_h *g, void *data, const char *msg)
 {
   if (!suppress_error)
@@ -50,109 +45,960 @@ static void print_strings (char * const * const argv)
     printf ("\t%s\n", argv[argc]);
 }
 
     printf ("\t%s\n", argv[argc]);
 }
 
-/*
-static void print_table (char * const * const argv)
+/*
+static void print_table (char * const * const argv)
+{
+  int i;
+
+  for (i = 0; argv[i] != NULL; i += 2)
+    printf ("%s: %s\n", argv[i], argv[i+1]);
+}
+*/
+
+static void no_test_warnings (void)
+{
+  fprintf (stderr, "warning: \"guestfs_test0\" has no tests\n");
+  fprintf (stderr, "warning: \"guestfs_test0rint\" has no tests\n");
+  fprintf (stderr, "warning: \"guestfs_test0rinterr\" has no tests\n");
+  fprintf (stderr, "warning: \"guestfs_test0rint64\" has no tests\n");
+  fprintf (stderr, "warning: \"guestfs_test0rint64err\" has no tests\n");
+  fprintf (stderr, "warning: \"guestfs_test0rbool\" has no tests\n");
+  fprintf (stderr, "warning: \"guestfs_test0rboolerr\" has no tests\n");
+  fprintf (stderr, "warning: \"guestfs_test0rconststring\" has no tests\n");
+  fprintf (stderr, "warning: \"guestfs_test0rconststringerr\" has no tests\n");
+  fprintf (stderr, "warning: \"guestfs_test0rstring\" has no tests\n");
+  fprintf (stderr, "warning: \"guestfs_test0rstringerr\" has no tests\n");
+  fprintf (stderr, "warning: \"guestfs_test0rstringlist\" has no tests\n");
+  fprintf (stderr, "warning: \"guestfs_test0rstringlisterr\" has no tests\n");
+  fprintf (stderr, "warning: \"guestfs_test0rintbool\" has no tests\n");
+  fprintf (stderr, "warning: \"guestfs_test0rintboolerr\" has no tests\n");
+  fprintf (stderr, "warning: \"guestfs_test0rpvlist\" has no tests\n");
+  fprintf (stderr, "warning: \"guestfs_test0rpvlisterr\" has no tests\n");
+  fprintf (stderr, "warning: \"guestfs_test0rvglist\" has no tests\n");
+  fprintf (stderr, "warning: \"guestfs_test0rvglisterr\" has no tests\n");
+  fprintf (stderr, "warning: \"guestfs_test0rlvlist\" has no tests\n");
+  fprintf (stderr, "warning: \"guestfs_test0rlvlisterr\" has no tests\n");
+  fprintf (stderr, "warning: \"guestfs_test0rstat\" has no tests\n");
+  fprintf (stderr, "warning: \"guestfs_test0rstaterr\" has no tests\n");
+  fprintf (stderr, "warning: \"guestfs_test0rstatvfs\" has no tests\n");
+  fprintf (stderr, "warning: \"guestfs_test0rstatvfserr\" has no tests\n");
+  fprintf (stderr, "warning: \"guestfs_test0rhashtable\" has no tests\n");
+  fprintf (stderr, "warning: \"guestfs_test0rhashtableerr\" has no tests\n");
+  fprintf (stderr, "warning: \"guestfs_launch\" has no tests\n");
+  fprintf (stderr, "warning: \"guestfs_wait_ready\" has no tests\n");
+  fprintf (stderr, "warning: \"guestfs_kill_subprocess\" has no tests\n");
+  fprintf (stderr, "warning: \"guestfs_add_drive\" has no tests\n");
+  fprintf (stderr, "warning: \"guestfs_add_cdrom\" has no tests\n");
+  fprintf (stderr, "warning: \"guestfs_add_drive_ro\" has no tests\n");
+  fprintf (stderr, "warning: \"guestfs_config\" has no tests\n");
+  fprintf (stderr, "warning: \"guestfs_set_qemu\" has no tests\n");
+  fprintf (stderr, "warning: \"guestfs_get_qemu\" has no tests\n");
+  fprintf (stderr, "warning: \"guestfs_set_path\" has no tests\n");
+  fprintf (stderr, "warning: \"guestfs_get_path\" has no tests\n");
+  fprintf (stderr, "warning: \"guestfs_set_append\" has no tests\n");
+  fprintf (stderr, "warning: \"guestfs_get_append\" has no tests\n");
+  fprintf (stderr, "warning: \"guestfs_set_autosync\" has no tests\n");
+  fprintf (stderr, "warning: \"guestfs_get_autosync\" has no tests\n");
+  fprintf (stderr, "warning: \"guestfs_set_verbose\" has no tests\n");
+  fprintf (stderr, "warning: \"guestfs_get_verbose\" has no tests\n");
+  fprintf (stderr, "warning: \"guestfs_is_ready\" has no tests\n");
+  fprintf (stderr, "warning: \"guestfs_is_config\" has no tests\n");
+  fprintf (stderr, "warning: \"guestfs_is_launching\" has no tests\n");
+  fprintf (stderr, "warning: \"guestfs_is_busy\" has no tests\n");
+  fprintf (stderr, "warning: \"guestfs_get_state\" has no tests\n");
+  fprintf (stderr, "warning: \"guestfs_set_busy\" has no tests\n");
+  fprintf (stderr, "warning: \"guestfs_set_ready\" has no tests\n");
+  fprintf (stderr, "warning: \"guestfs_end_busy\" has no tests\n");
+  fprintf (stderr, "warning: \"guestfs_ll\" has no tests\n");
+  fprintf (stderr, "warning: \"guestfs_pvs_full\" has no tests\n");
+  fprintf (stderr, "warning: \"guestfs_vgs_full\" has no tests\n");
+  fprintf (stderr, "warning: \"guestfs_lvs_full\" has no tests\n");
+  fprintf (stderr, "warning: \"guestfs_aug_init\" has no tests\n");
+  fprintf (stderr, "warning: \"guestfs_aug_close\" has no tests\n");
+  fprintf (stderr, "warning: \"guestfs_aug_defvar\" has no tests\n");
+  fprintf (stderr, "warning: \"guestfs_aug_defnode\" has no tests\n");
+  fprintf (stderr, "warning: \"guestfs_aug_get\" has no tests\n");
+  fprintf (stderr, "warning: \"guestfs_aug_set\" has no tests\n");
+  fprintf (stderr, "warning: \"guestfs_aug_insert\" has no tests\n");
+  fprintf (stderr, "warning: \"guestfs_aug_rm\" has no tests\n");
+  fprintf (stderr, "warning: \"guestfs_aug_mv\" has no tests\n");
+  fprintf (stderr, "warning: \"guestfs_aug_match\" has no tests\n");
+  fprintf (stderr, "warning: \"guestfs_aug_save\" has no tests\n");
+  fprintf (stderr, "warning: \"guestfs_aug_load\" has no tests\n");
+  fprintf (stderr, "warning: \"guestfs_aug_ls\" has no tests\n");
+  fprintf (stderr, "warning: \"guestfs_chmod\" has no tests\n");
+  fprintf (stderr, "warning: \"guestfs_chown\" has no tests\n");
+  fprintf (stderr, "warning: \"guestfs_sfdisk\" has no tests\n");
+  fprintf (stderr, "warning: \"guestfs_lvm_remove_all\" has no tests\n");
+  fprintf (stderr, "warning: \"guestfs_tune2fs_l\" has no tests\n");
+  fprintf (stderr, "warning: \"guestfs_blockdev_setbsz\" has no tests\n");
+  fprintf (stderr, "warning: \"guestfs_tar_out\" has no tests\n");
+  fprintf (stderr, "warning: \"guestfs_tgz_out\" has no tests\n");
+  fprintf (stderr, "warning: \"guestfs_mount_options\" has no tests\n");
+  fprintf (stderr, "warning: \"guestfs_mount_vfs\" has no tests\n");
+  fprintf (stderr, "warning: \"guestfs_debug\" has no tests\n");
+  fprintf (stderr, "warning: \"guestfs_get_e2label\" has no tests\n");
+  fprintf (stderr, "warning: \"guestfs_get_e2uuid\" has no tests\n");
+  fprintf (stderr, "warning: \"guestfs_pvresize\" has no tests\n");
+  fprintf (stderr, "warning: \"guestfs_sfdisk_N\" has no tests\n");
+  fprintf (stderr, "warning: \"guestfs_sfdisk_l\" has no tests\n");
+  fprintf (stderr, "warning: \"guestfs_sfdisk_kernel_geometry\" has no tests\n");
+  fprintf (stderr, "warning: \"guestfs_sfdisk_disk_geometry\" has no tests\n");
+  fprintf (stderr, "warning: \"guestfs_vg_activate_all\" has no tests\n");
+  fprintf (stderr, "warning: \"guestfs_vg_activate\" has no tests\n");
+  fprintf (stderr, "warning: \"guestfs_resize2fs\" has no tests\n");
+  fprintf (stderr, "warning: \"guestfs_e2fsck_f\" has no tests\n");
+  fprintf (stderr, "warning: \"guestfs_sh\" has no tests\n");
+  fprintf (stderr, "warning: \"guestfs_sh_lines\" has no tests\n");
+  fprintf (stderr, "warning: \"guestfs_scrub_freespace\" has no tests\n");
+}
+
+static int test_mkdtemp_0_skip (void)
+{
+  const char *str;
+
+  str = getenv ("SKIP_TEST_MKDTEMP_0");
+  if (str && strcmp (str, "1") == 0) return 1;
+  str = getenv ("SKIP_TEST_MKDTEMP");
+  if (str && strcmp (str, "1") == 0) return 1;
+  return 0;
+}
+
+static int test_mkdtemp_0 (void)
+{
+  if (test_mkdtemp_0_skip ()) {
+    printf ("%s skipped (reason: SKIP_TEST_* variable set)\n", "test_mkdtemp_0");
+    return 0;
+  }
+
+  /* InitBasicFS for test_mkdtemp_0: create ext2 on /dev/sda1 */
+  {
+    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;
+  }
+  {
+    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";
+    char mountpoint[] = "/";
+    int r;
+    suppress_error = 0;
+    r = guestfs_mount (g, device, mountpoint);
+    if (r == -1)
+      return -1;
+  }
+  /* TestRun for mkdtemp (0) */
+  {
+    char path[] = "/tmp";
+    int r;
+    suppress_error = 0;
+    r = guestfs_mkdir (g, path);
+    if (r == -1)
+      return -1;
+  }
+  {
+    char template[] = "/tmp/tmpXXXXXX";
+    char *r;
+    suppress_error = 0;
+    r = guestfs_mkdtemp (g, template);
+    if (r == NULL)
+      return -1;
+    free (r);
+  }
+  return 0;
+}
+
+static int test_scrub_file_0_skip (void)
+{
+  const char *str;
+
+  str = getenv ("SKIP_TEST_SCRUB_FILE_0");
+  if (str && strcmp (str, "1") == 0) return 1;
+  str = getenv ("SKIP_TEST_SCRUB_FILE");
+  if (str && strcmp (str, "1") == 0) return 1;
+  return 0;
+}
+
+static int test_scrub_file_0 (void)
+{
+  if (test_scrub_file_0_skip ()) {
+    printf ("%s skipped (reason: SKIP_TEST_* variable set)\n", "test_scrub_file_0");
+    return 0;
+  }
+
+  /* InitBasicFS for test_scrub_file_0: create ext2 on /dev/sda1 */
+  {
+    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;
+  }
+  {
+    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";
+    char mountpoint[] = "/";
+    int r;
+    suppress_error = 0;
+    r = guestfs_mount (g, device, mountpoint);
+    if (r == -1)
+      return -1;
+  }
+  /* TestRun for scrub_file (0) */
+  {
+    char path[] = "/file";
+    char content[] = "content";
+    int r;
+    suppress_error = 0;
+    r = guestfs_write_file (g, path, content, 0);
+    if (r == -1)
+      return -1;
+  }
+  {
+    char file[] = "/file";
+    int r;
+    suppress_error = 0;
+    r = guestfs_scrub_file (g, file);
+    if (r == -1)
+      return -1;
+  }
+  return 0;
+}
+
+static int test_scrub_device_0_skip (void)
+{
+  const char *str;
+
+  str = getenv ("SKIP_TEST_SCRUB_DEVICE_0");
+  if (str && strcmp (str, "1") == 0) return 1;
+  str = getenv ("SKIP_TEST_SCRUB_DEVICE");
+  if (str && strcmp (str, "1") == 0) return 1;
+  return 0;
+}
+
+static int test_scrub_device_0 (void)
+{
+  if (test_scrub_device_0_skip ()) {
+    printf ("%s skipped (reason: SKIP_TEST_* variable set)\n", "test_scrub_device_0");
+    return 0;
+  }
+
+  /* InitNone|InitEmpty for test_scrub_device_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;
+  }
+  /* TestRun for scrub_device (0) */
+  {
+    char device[] = "/dev/sdc";
+    int r;
+    suppress_error = 0;
+    r = guestfs_scrub_device (g, device);
+    if (r == -1)
+      return -1;
+  }
+  return 0;
+}
+
+static int test_glob_expand_0_skip (void)
+{
+  const char *str;
+
+  str = getenv ("SKIP_TEST_GLOB_EXPAND_0");
+  if (str && strcmp (str, "1") == 0) return 1;
+  str = getenv ("SKIP_TEST_GLOB_EXPAND");
+  if (str && strcmp (str, "1") == 0) return 1;
+  return 0;
+}
+
+static int test_glob_expand_0 (void)
+{
+  if (test_glob_expand_0_skip ()) {
+    printf ("%s skipped (reason: SKIP_TEST_* variable set)\n", "test_glob_expand_0");
+    return 0;
+  }
+
+  /* InitBasicFS for test_glob_expand_0: create ext2 on /dev/sda1 */
+  {
+    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;
+  }
+  {
+    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";
+    char mountpoint[] = "/";
+    int r;
+    suppress_error = 0;
+    r = guestfs_mount (g, device, mountpoint);
+    if (r == -1)
+      return -1;
+  }
+  /* TestOutputList for glob_expand (0) */
+  {
+    char path[] = "/a/b/c";
+    int r;
+    suppress_error = 0;
+    r = guestfs_mkdir_p (g, path);
+    if (r == -1)
+      return -1;
+  }
+  {
+    char path[] = "/a/b/c/d";
+    int r;
+    suppress_error = 0;
+    r = guestfs_touch (g, path);
+    if (r == -1)
+      return -1;
+  }
+  {
+    char path[] = "/a/b/c/e";
+    int r;
+    suppress_error = 0;
+    r = guestfs_touch (g, path);
+    if (r == -1)
+      return -1;
+  }
+  {
+    char pattern[] = "/a/b/c/*";
+    char **r;
+    int i;
+    suppress_error = 0;
+    r = guestfs_glob_expand (g, pattern);
+    if (r == NULL)
+      return -1;
+    if (!r[0]) {
+      fprintf (stderr, "test_glob_expand_0: short list returned from command\n");
+      print_strings (r);
+      return -1;
+    }
+    {
+      char expected[] = "/a/b/c/d";
+      if (strcmp (r[0], expected) != 0) {
+        fprintf (stderr, "test_glob_expand_0: expected \"%s\" but got \"%s\"\n", expected, r[0]);
+        return -1;
+      }
+    }
+    if (!r[1]) {
+      fprintf (stderr, "test_glob_expand_0: short list returned from command\n");
+      print_strings (r);
+      return -1;
+    }
+    {
+      char expected[] = "/a/b/c/e";
+      if (strcmp (r[1], expected) != 0) {
+        fprintf (stderr, "test_glob_expand_0: expected \"%s\" but got \"%s\"\n", expected, r[1]);
+        return -1;
+      }
+    }
+    if (r[2] != NULL) {
+      fprintf (stderr, "test_glob_expand_0: extra elements returned from command\n");
+      print_strings (r);
+      return -1;
+    }
+    for (i = 0; r[i] != NULL; ++i)
+      free (r[i]);
+    free (r);
+  }
+  return 0;
+}
+
+static int test_glob_expand_1_skip (void)
+{
+  const char *str;
+
+  str = getenv ("SKIP_TEST_GLOB_EXPAND_1");
+  if (str && strcmp (str, "1") == 0) return 1;
+  str = getenv ("SKIP_TEST_GLOB_EXPAND");
+  if (str && strcmp (str, "1") == 0) return 1;
+  return 0;
+}
+
+static int test_glob_expand_1 (void)
+{
+  if (test_glob_expand_1_skip ()) {
+    printf ("%s skipped (reason: SKIP_TEST_* variable set)\n", "test_glob_expand_1");
+    return 0;
+  }
+
+  /* InitBasicFS for test_glob_expand_1: create ext2 on /dev/sda1 */
+  {
+    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;
+  }
+  {
+    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";
+    char mountpoint[] = "/";
+    int r;
+    suppress_error = 0;
+    r = guestfs_mount (g, device, mountpoint);
+    if (r == -1)
+      return -1;
+  }
+  /* TestOutputList for glob_expand (1) */
+  {
+    char path[] = "/a/b/c";
+    int r;
+    suppress_error = 0;
+    r = guestfs_mkdir_p (g, path);
+    if (r == -1)
+      return -1;
+  }
+  {
+    char path[] = "/a/b/c/d";
+    int r;
+    suppress_error = 0;
+    r = guestfs_touch (g, path);
+    if (r == -1)
+      return -1;
+  }
+  {
+    char path[] = "/a/b/c/e";
+    int r;
+    suppress_error = 0;
+    r = guestfs_touch (g, path);
+    if (r == -1)
+      return -1;
+  }
+  {
+    char pattern[] = "/a/*/c/*";
+    char **r;
+    int i;
+    suppress_error = 0;
+    r = guestfs_glob_expand (g, pattern);
+    if (r == NULL)
+      return -1;
+    if (!r[0]) {
+      fprintf (stderr, "test_glob_expand_1: short list returned from command\n");
+      print_strings (r);
+      return -1;
+    }
+    {
+      char expected[] = "/a/b/c/d";
+      if (strcmp (r[0], expected) != 0) {
+        fprintf (stderr, "test_glob_expand_1: expected \"%s\" but got \"%s\"\n", expected, r[0]);
+        return -1;
+      }
+    }
+    if (!r[1]) {
+      fprintf (stderr, "test_glob_expand_1: short list returned from command\n");
+      print_strings (r);
+      return -1;
+    }
+    {
+      char expected[] = "/a/b/c/e";
+      if (strcmp (r[1], expected) != 0) {
+        fprintf (stderr, "test_glob_expand_1: expected \"%s\" but got \"%s\"\n", expected, r[1]);
+        return -1;
+      }
+    }
+    if (r[2] != NULL) {
+      fprintf (stderr, "test_glob_expand_1: extra elements returned from command\n");
+      print_strings (r);
+      return -1;
+    }
+    for (i = 0; r[i] != NULL; ++i)
+      free (r[i]);
+    free (r);
+  }
+  return 0;
+}
+
+static int test_glob_expand_2_skip (void)
+{
+  const char *str;
+
+  str = getenv ("SKIP_TEST_GLOB_EXPAND_2");
+  if (str && strcmp (str, "1") == 0) return 1;
+  str = getenv ("SKIP_TEST_GLOB_EXPAND");
+  if (str && strcmp (str, "1") == 0) return 1;
+  return 0;
+}
+
+static int test_glob_expand_2 (void)
+{
+  if (test_glob_expand_2_skip ()) {
+    printf ("%s skipped (reason: SKIP_TEST_* variable set)\n", "test_glob_expand_2");
+    return 0;
+  }
+
+  /* InitBasicFS for test_glob_expand_2: create ext2 on /dev/sda1 */
+  {
+    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;
+  }
+  {
+    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";
+    char mountpoint[] = "/";
+    int r;
+    suppress_error = 0;
+    r = guestfs_mount (g, device, mountpoint);
+    if (r == -1)
+      return -1;
+  }
+  /* TestOutputList for glob_expand (2) */
+  {
+    char path[] = "/a/b/c";
+    int r;
+    suppress_error = 0;
+    r = guestfs_mkdir_p (g, path);
+    if (r == -1)
+      return -1;
+  }
+  {
+    char path[] = "/a/b/c/d";
+    int r;
+    suppress_error = 0;
+    r = guestfs_touch (g, path);
+    if (r == -1)
+      return -1;
+  }
+  {
+    char path[] = "/a/b/c/e";
+    int r;
+    suppress_error = 0;
+    r = guestfs_touch (g, path);
+    if (r == -1)
+      return -1;
+  }
+  {
+    char pattern[] = "/a/*/x/*";
+    char **r;
+    int i;
+    suppress_error = 0;
+    r = guestfs_glob_expand (g, pattern);
+    if (r == NULL)
+      return -1;
+    if (r[0] != NULL) {
+      fprintf (stderr, "test_glob_expand_2: extra elements returned from command\n");
+      print_strings (r);
+      return -1;
+    }
+    for (i = 0; r[i] != NULL; ++i)
+      free (r[i]);
+    free (r);
+  }
+  return 0;
+}
+
+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)
 {
 {
-  int i;
+  const char *str;
 
 
-  for (i = 0; argv[i] != NULL; i += 2)
-    printf ("%s: %s\n", argv[i], argv[i+1]);
+  str = getenv ("SKIP_TEST_SLEEP_0");
+  if (str && strcmp (str, "1") == 0) return 1;
+  str = getenv ("SKIP_TEST_SLEEP");
+  if (str && strcmp (str, "1") == 0) return 1;
+  return 0;
 }
 }
-*/
 
 
-static void no_test_warnings (void)
+static int test_sleep_0 (void)
 {
 {
-  fprintf (stderr, "warning: \"guestfs_test0\" has no tests\n");
-  fprintf (stderr, "warning: \"guestfs_test0rint\" has no tests\n");
-  fprintf (stderr, "warning: \"guestfs_test0rinterr\" has no tests\n");
-  fprintf (stderr, "warning: \"guestfs_test0rint64\" has no tests\n");
-  fprintf (stderr, "warning: \"guestfs_test0rint64err\" has no tests\n");
-  fprintf (stderr, "warning: \"guestfs_test0rbool\" has no tests\n");
-  fprintf (stderr, "warning: \"guestfs_test0rboolerr\" has no tests\n");
-  fprintf (stderr, "warning: \"guestfs_test0rconststring\" has no tests\n");
-  fprintf (stderr, "warning: \"guestfs_test0rconststringerr\" has no tests\n");
-  fprintf (stderr, "warning: \"guestfs_test0rstring\" has no tests\n");
-  fprintf (stderr, "warning: \"guestfs_test0rstringerr\" has no tests\n");
-  fprintf (stderr, "warning: \"guestfs_test0rstringlist\" has no tests\n");
-  fprintf (stderr, "warning: \"guestfs_test0rstringlisterr\" has no tests\n");
-  fprintf (stderr, "warning: \"guestfs_test0rintbool\" has no tests\n");
-  fprintf (stderr, "warning: \"guestfs_test0rintboolerr\" has no tests\n");
-  fprintf (stderr, "warning: \"guestfs_test0rpvlist\" has no tests\n");
-  fprintf (stderr, "warning: \"guestfs_test0rpvlisterr\" has no tests\n");
-  fprintf (stderr, "warning: \"guestfs_test0rvglist\" has no tests\n");
-  fprintf (stderr, "warning: \"guestfs_test0rvglisterr\" has no tests\n");
-  fprintf (stderr, "warning: \"guestfs_test0rlvlist\" has no tests\n");
-  fprintf (stderr, "warning: \"guestfs_test0rlvlisterr\" has no tests\n");
-  fprintf (stderr, "warning: \"guestfs_test0rstat\" has no tests\n");
-  fprintf (stderr, "warning: \"guestfs_test0rstaterr\" has no tests\n");
-  fprintf (stderr, "warning: \"guestfs_test0rstatvfs\" has no tests\n");
-  fprintf (stderr, "warning: \"guestfs_test0rstatvfserr\" has no tests\n");
-  fprintf (stderr, "warning: \"guestfs_test0rhashtable\" has no tests\n");
-  fprintf (stderr, "warning: \"guestfs_test0rhashtableerr\" has no tests\n");
-  fprintf (stderr, "warning: \"guestfs_launch\" has no tests\n");
-  fprintf (stderr, "warning: \"guestfs_wait_ready\" has no tests\n");
-  fprintf (stderr, "warning: \"guestfs_kill_subprocess\" has no tests\n");
-  fprintf (stderr, "warning: \"guestfs_add_drive\" has no tests\n");
-  fprintf (stderr, "warning: \"guestfs_add_cdrom\" has no tests\n");
-  fprintf (stderr, "warning: \"guestfs_add_drive_ro\" has no tests\n");
-  fprintf (stderr, "warning: \"guestfs_config\" has no tests\n");
-  fprintf (stderr, "warning: \"guestfs_set_qemu\" has no tests\n");
-  fprintf (stderr, "warning: \"guestfs_get_qemu\" has no tests\n");
-  fprintf (stderr, "warning: \"guestfs_set_path\" has no tests\n");
-  fprintf (stderr, "warning: \"guestfs_get_path\" has no tests\n");
-  fprintf (stderr, "warning: \"guestfs_set_append\" has no tests\n");
-  fprintf (stderr, "warning: \"guestfs_get_append\" has no tests\n");
-  fprintf (stderr, "warning: \"guestfs_set_autosync\" has no tests\n");
-  fprintf (stderr, "warning: \"guestfs_get_autosync\" has no tests\n");
-  fprintf (stderr, "warning: \"guestfs_set_verbose\" has no tests\n");
-  fprintf (stderr, "warning: \"guestfs_get_verbose\" has no tests\n");
-  fprintf (stderr, "warning: \"guestfs_is_ready\" has no tests\n");
-  fprintf (stderr, "warning: \"guestfs_is_config\" has no tests\n");
-  fprintf (stderr, "warning: \"guestfs_is_launching\" has no tests\n");
-  fprintf (stderr, "warning: \"guestfs_is_busy\" has no tests\n");
-  fprintf (stderr, "warning: \"guestfs_get_state\" has no tests\n");
-  fprintf (stderr, "warning: \"guestfs_set_busy\" has no tests\n");
-  fprintf (stderr, "warning: \"guestfs_set_ready\" has no tests\n");
-  fprintf (stderr, "warning: \"guestfs_end_busy\" has no tests\n");
-  fprintf (stderr, "warning: \"guestfs_ll\" has no tests\n");
-  fprintf (stderr, "warning: \"guestfs_pvs_full\" has no tests\n");
-  fprintf (stderr, "warning: \"guestfs_vgs_full\" has no tests\n");
-  fprintf (stderr, "warning: \"guestfs_lvs_full\" has no tests\n");
-  fprintf (stderr, "warning: \"guestfs_aug_init\" has no tests\n");
-  fprintf (stderr, "warning: \"guestfs_aug_close\" has no tests\n");
-  fprintf (stderr, "warning: \"guestfs_aug_defvar\" has no tests\n");
-  fprintf (stderr, "warning: \"guestfs_aug_defnode\" has no tests\n");
-  fprintf (stderr, "warning: \"guestfs_aug_get\" has no tests\n");
-  fprintf (stderr, "warning: \"guestfs_aug_set\" has no tests\n");
-  fprintf (stderr, "warning: \"guestfs_aug_insert\" has no tests\n");
-  fprintf (stderr, "warning: \"guestfs_aug_rm\" has no tests\n");
-  fprintf (stderr, "warning: \"guestfs_aug_mv\" has no tests\n");
-  fprintf (stderr, "warning: \"guestfs_aug_match\" has no tests\n");
-  fprintf (stderr, "warning: \"guestfs_aug_save\" has no tests\n");
-  fprintf (stderr, "warning: \"guestfs_aug_load\" has no tests\n");
-  fprintf (stderr, "warning: \"guestfs_aug_ls\" has no tests\n");
-  fprintf (stderr, "warning: \"guestfs_chmod\" has no tests\n");
-  fprintf (stderr, "warning: \"guestfs_chown\" has no tests\n");
-  fprintf (stderr, "warning: \"guestfs_sfdisk\" has no tests\n");
-  fprintf (stderr, "warning: \"guestfs_lvm_remove_all\" has no tests\n");
-  fprintf (stderr, "warning: \"guestfs_tune2fs_l\" has no tests\n");
-  fprintf (stderr, "warning: \"guestfs_blockdev_setbsz\" has no tests\n");
-  fprintf (stderr, "warning: \"guestfs_tar_out\" has no tests\n");
-  fprintf (stderr, "warning: \"guestfs_tgz_out\" has no tests\n");
-  fprintf (stderr, "warning: \"guestfs_mount_options\" has no tests\n");
-  fprintf (stderr, "warning: \"guestfs_mount_vfs\" has no tests\n");
-  fprintf (stderr, "warning: \"guestfs_debug\" has no tests\n");
-  fprintf (stderr, "warning: \"guestfs_get_e2label\" has no tests\n");
-  fprintf (stderr, "warning: \"guestfs_get_e2uuid\" has no tests\n");
-  fprintf (stderr, "warning: \"guestfs_pvresize\" has no tests\n");
-  fprintf (stderr, "warning: \"guestfs_sfdisk_N\" has no tests\n");
-  fprintf (stderr, "warning: \"guestfs_sfdisk_l\" has no tests\n");
-  fprintf (stderr, "warning: \"guestfs_sfdisk_kernel_geometry\" has no tests\n");
-  fprintf (stderr, "warning: \"guestfs_sfdisk_disk_geometry\" has no tests\n");
-  fprintf (stderr, "warning: \"guestfs_vg_activate_all\" has no tests\n");
-  fprintf (stderr, "warning: \"guestfs_vg_activate\" has no tests\n");
-  fprintf (stderr, "warning: \"guestfs_resize2fs\" has no tests\n");
-  fprintf (stderr, "warning: \"guestfs_e2fsck_f\" has no tests\n");
+  if (test_sleep_0_skip ()) {
+    printf ("%s skipped (reason: SKIP_TEST_* variable set)\n", "test_sleep_0");
+    return 0;
+  }
+
+  /* InitNone|InitEmpty for test_sleep_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;
+  }
+  /* TestRun for sleep (0) */
+  {
+    int r;
+    suppress_error = 0;
+    r = guestfs_sleep (g, 1);
+    if (r == -1)
+      return -1;
+  }
+  return 0;
 }
 
 static int test_find_0_skip (void)
 }
 
 static int test_find_0_skip (void)
@@ -176,7 +1022,6 @@ static int test_find_0 (void)
   /* InitBasicFS for test_find_0: create ext2 on /dev/sda1 */
   {
     char device[] = "/dev/sda";
   /* 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);
     int r;
     suppress_error = 0;
     r = guestfs_blockdev_setrw (g, device);
@@ -199,7 +1044,6 @@ static int test_find_0 (void)
   }
   {
     char device[] = "/dev/sda";
   }
   {
     char device[] = "/dev/sda";
-    device[5] = devchar;
     char lines_0[] = ",";
     char *lines[] = {
       lines_0,
     char lines_0[] = ",";
     char *lines[] = {
       lines_0,
@@ -214,7 +1058,6 @@ static int test_find_0 (void)
   {
     char fstype[] = "ext2";
     char device[] = "/dev/sda1";
   {
     char fstype[] = "ext2";
     char device[] = "/dev/sda1";
-    device[5] = devchar;
     int r;
     suppress_error = 0;
     r = guestfs_mkfs (g, fstype, device);
     int r;
     suppress_error = 0;
     r = guestfs_mkfs (g, fstype, device);
@@ -223,7 +1066,6 @@ static int test_find_0 (void)
   }
   {
     char device[] = "/dev/sda1";
   }
   {
     char device[] = "/dev/sda1";
-    device[5] = devchar;
     char mountpoint[] = "/";
     int r;
     suppress_error = 0;
     char mountpoint[] = "/";
     int r;
     suppress_error = 0;
@@ -285,7 +1127,6 @@ static int test_find_1 (void)
   /* InitBasicFS for test_find_1: create ext2 on /dev/sda1 */
   {
     char device[] = "/dev/sda";
   /* 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);
     int r;
     suppress_error = 0;
     r = guestfs_blockdev_setrw (g, device);
@@ -308,7 +1149,6 @@ static int test_find_1 (void)
   }
   {
     char device[] = "/dev/sda";
   }
   {
     char device[] = "/dev/sda";
-    device[5] = devchar;
     char lines_0[] = ",";
     char *lines[] = {
       lines_0,
     char lines_0[] = ",";
     char *lines[] = {
       lines_0,
@@ -323,7 +1163,6 @@ static int test_find_1 (void)
   {
     char fstype[] = "ext2";
     char device[] = "/dev/sda1";
   {
     char fstype[] = "ext2";
     char device[] = "/dev/sda1";
-    device[5] = devchar;
     int r;
     suppress_error = 0;
     r = guestfs_mkfs (g, fstype, device);
     int r;
     suppress_error = 0;
     r = guestfs_mkfs (g, fstype, device);
@@ -332,7 +1171,6 @@ static int test_find_1 (void)
   }
   {
     char device[] = "/dev/sda1";
   }
   {
     char device[] = "/dev/sda1";
-    device[5] = devchar;
     char mountpoint[] = "/";
     int r;
     suppress_error = 0;
     char mountpoint[] = "/";
     int r;
     suppress_error = 0;
@@ -454,7 +1292,6 @@ static int test_find_2 (void)
   /* InitBasicFS for test_find_2: create ext2 on /dev/sda1 */
   {
     char device[] = "/dev/sda";
   /* 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);
     int r;
     suppress_error = 0;
     r = guestfs_blockdev_setrw (g, device);
@@ -477,7 +1314,6 @@ static int test_find_2 (void)
   }
   {
     char device[] = "/dev/sda";
   }
   {
     char device[] = "/dev/sda";
-    device[5] = devchar;
     char lines_0[] = ",";
     char *lines[] = {
       lines_0,
     char lines_0[] = ",";
     char *lines[] = {
       lines_0,
@@ -492,7 +1328,6 @@ static int test_find_2 (void)
   {
     char fstype[] = "ext2";
     char device[] = "/dev/sda1";
   {
     char fstype[] = "ext2";
     char device[] = "/dev/sda1";
-    device[5] = devchar;
     int r;
     suppress_error = 0;
     r = guestfs_mkfs (g, fstype, device);
     int r;
     suppress_error = 0;
     r = guestfs_mkfs (g, fstype, device);
@@ -501,7 +1336,6 @@ static int test_find_2 (void)
   }
   {
     char device[] = "/dev/sda1";
   }
   {
     char device[] = "/dev/sda1";
-    device[5] = devchar;
     char mountpoint[] = "/";
     int r;
     suppress_error = 0;
     char mountpoint[] = "/";
     int r;
     suppress_error = 0;
@@ -591,7 +1425,6 @@ static int test_lvresize_0 (void)
   /* InitNone|InitEmpty for test_lvresize_0 */
   {
     char device[] = "/dev/sda";
   /* InitNone|InitEmpty for test_lvresize_0 */
   {
     char device[] = "/dev/sda";
-    device[5] = devchar;
     int r;
     suppress_error = 0;
     r = guestfs_blockdev_setrw (g, device);
     int r;
     suppress_error = 0;
     r = guestfs_blockdev_setrw (g, device);
@@ -616,7 +1449,6 @@ static int test_lvresize_0 (void)
   char expected[] = "test content";
   {
     char device[] = "/dev/sda";
   char expected[] = "test content";
   {
     char device[] = "/dev/sda";
-    device[5] = devchar;
     char lines_0[] = ",";
     char *lines[] = {
       lines_0,
     char lines_0[] = ",";
     char *lines[] = {
       lines_0,
@@ -630,7 +1462,6 @@ static int test_lvresize_0 (void)
   }
   {
     char device[] = "/dev/sda1";
   }
   {
     char device[] = "/dev/sda1";
-    device[5] = devchar;
     int r;
     suppress_error = 0;
     r = guestfs_pvcreate (g, device);
     int r;
     suppress_error = 0;
     r = guestfs_pvcreate (g, device);
@@ -640,7 +1471,6 @@ static int test_lvresize_0 (void)
   {
     char volgroup[] = "VG";
     char physvols_0[] = "/dev/sda1";
   {
     char volgroup[] = "VG";
     char physvols_0[] = "/dev/sda1";
-    physvols_0[5] = devchar;
     char *physvols[] = {
       physvols_0,
       NULL
     char *physvols[] = {
       physvols_0,
       NULL
@@ -765,7 +1595,6 @@ static int test_zerofree_0 (void)
   /* InitNone|InitEmpty for test_zerofree_0 */
   {
     char device[] = "/dev/sda";
   /* InitNone|InitEmpty for test_zerofree_0 */
   {
     char device[] = "/dev/sda";
-    device[5] = devchar;
     int r;
     suppress_error = 0;
     r = guestfs_blockdev_setrw (g, device);
     int r;
     suppress_error = 0;
     r = guestfs_blockdev_setrw (g, device);
@@ -790,7 +1619,6 @@ static int test_zerofree_0 (void)
   char expected[] = "test file";
   {
     char device[] = "/dev/sda";
   char expected[] = "test file";
   {
     char device[] = "/dev/sda";
-    device[5] = devchar;
     char lines_0[] = ",";
     char *lines[] = {
       lines_0,
     char lines_0[] = ",";
     char *lines[] = {
       lines_0,
@@ -805,7 +1633,6 @@ static int test_zerofree_0 (void)
   {
     char fstype[] = "ext3";
     char device[] = "/dev/sda1";
   {
     char fstype[] = "ext3";
     char device[] = "/dev/sda1";
-    device[5] = devchar;
     int r;
     suppress_error = 0;
     r = guestfs_mkfs (g, fstype, device);
     int r;
     suppress_error = 0;
     r = guestfs_mkfs (g, fstype, device);
@@ -814,7 +1641,6 @@ static int test_zerofree_0 (void)
   }
   {
     char device[] = "/dev/sda1";
   }
   {
     char device[] = "/dev/sda1";
-    device[5] = devchar;
     char mountpoint[] = "/";
     int r;
     suppress_error = 0;
     char mountpoint[] = "/";
     int r;
     suppress_error = 0;
@@ -833,7 +1659,6 @@ static int test_zerofree_0 (void)
   }
   {
     char pathordevice[] = "/dev/sda1";
   }
   {
     char pathordevice[] = "/dev/sda1";
-    pathordevice[5] = devchar;
     int r;
     suppress_error = 0;
     r = guestfs_umount (g, pathordevice);
     int r;
     suppress_error = 0;
     r = guestfs_umount (g, pathordevice);
@@ -842,7 +1667,6 @@ static int test_zerofree_0 (void)
   }
   {
     char device[] = "/dev/sda1";
   }
   {
     char device[] = "/dev/sda1";
-    device[5] = devchar;
     int r;
     suppress_error = 0;
     r = guestfs_zerofree (g, device);
     int r;
     suppress_error = 0;
     r = guestfs_zerofree (g, device);
@@ -851,7 +1675,6 @@ static int test_zerofree_0 (void)
   }
   {
     char device[] = "/dev/sda1";
   }
   {
     char device[] = "/dev/sda1";
-    device[5] = devchar;
     char mountpoint[] = "/";
     int r;
     suppress_error = 0;
     char mountpoint[] = "/";
     int r;
     suppress_error = 0;
@@ -896,7 +1719,6 @@ static int test_hexdump_0 (void)
   /* InitBasicFS for test_hexdump_0: create ext2 on /dev/sda1 */
   {
     char device[] = "/dev/sda";
   /* 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);
     int r;
     suppress_error = 0;
     r = guestfs_blockdev_setrw (g, device);
@@ -919,7 +1741,6 @@ static int test_hexdump_0 (void)
   }
   {
     char device[] = "/dev/sda";
   }
   {
     char device[] = "/dev/sda";
-    device[5] = devchar;
     char lines_0[] = ",";
     char *lines[] = {
       lines_0,
     char lines_0[] = ",";
     char *lines[] = {
       lines_0,
@@ -934,7 +1755,6 @@ static int test_hexdump_0 (void)
   {
     char fstype[] = "ext2";
     char device[] = "/dev/sda1";
   {
     char fstype[] = "ext2";
     char device[] = "/dev/sda1";
-    device[5] = devchar;
     int r;
     suppress_error = 0;
     r = guestfs_mkfs (g, fstype, device);
     int r;
     suppress_error = 0;
     r = guestfs_mkfs (g, fstype, device);
@@ -943,7 +1763,6 @@ static int test_hexdump_0 (void)
   }
   {
     char device[] = "/dev/sda1";
   }
   {
     char device[] = "/dev/sda1";
-    device[5] = devchar;
     char mountpoint[] = "/";
     int r;
     suppress_error = 0;
     char mountpoint[] = "/";
     int r;
     suppress_error = 0;
@@ -978,6 +1797,102 @@ static int test_hexdump_0 (void)
   return 0;
 }
 
   return 0;
 }
 
+static int test_hexdump_1_skip (void)
+{
+  const char *str;
+
+  str = getenv ("SKIP_TEST_HEXDUMP_1");
+  if (str && strcmp (str, "1") == 0) return 1;
+  str = getenv ("SKIP_TEST_HEXDUMP");
+  if (str && strcmp (str, "1") == 0) return 1;
+  return 0;
+}
+
+static int test_hexdump_1 (void)
+{
+  if (test_hexdump_1_skip ()) {
+    printf ("%s skipped (reason: SKIP_TEST_* variable set)\n", "test_hexdump_1");
+    return 0;
+  }
+
+  /* InitBasicFS for test_hexdump_1: create ext2 on /dev/sda1 */
+  {
+    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;
+  }
+  {
+    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";
+    char mountpoint[] = "/";
+    int r;
+    suppress_error = 0;
+    r = guestfs_mount (g, device, mountpoint);
+    if (r == -1)
+      return -1;
+  }
+  /* TestRun for hexdump (1) */
+  {
+    char options[] = "ro";
+    char vfstype[] = "squashfs";
+    char device[] = "/dev/sdd";
+    char mountpoint[] = "/";
+    int r;
+    suppress_error = 0;
+    r = guestfs_mount_vfs (g, options, vfstype, device, mountpoint);
+    if (r == -1)
+      return -1;
+  }
+  {
+    char path[] = "/100krandom";
+    char *r;
+    suppress_error = 0;
+    r = guestfs_hexdump (g, path);
+    if (r == NULL)
+      return -1;
+    free (r);
+  }
+  return 0;
+}
+
 static int test_strings_e_0_skip (void)
 {
   const char *str;
 static int test_strings_e_0_skip (void)
 {
   const char *str;
@@ -999,7 +1914,6 @@ static int test_strings_e_0 (void)
   /* InitBasicFS for test_strings_e_0: create ext2 on /dev/sda1 */
   {
     char device[] = "/dev/sda";
   /* 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);
     int r;
     suppress_error = 0;
     r = guestfs_blockdev_setrw (g, device);
@@ -1022,7 +1936,6 @@ static int test_strings_e_0 (void)
   }
   {
     char device[] = "/dev/sda";
   }
   {
     char device[] = "/dev/sda";
-    device[5] = devchar;
     char lines_0[] = ",";
     char *lines[] = {
       lines_0,
     char lines_0[] = ",";
     char *lines[] = {
       lines_0,
@@ -1037,7 +1950,6 @@ static int test_strings_e_0 (void)
   {
     char fstype[] = "ext2";
     char device[] = "/dev/sda1";
   {
     char fstype[] = "ext2";
     char device[] = "/dev/sda1";
-    device[5] = devchar;
     int r;
     suppress_error = 0;
     r = guestfs_mkfs (g, fstype, device);
     int r;
     suppress_error = 0;
     r = guestfs_mkfs (g, fstype, device);
@@ -1046,7 +1958,6 @@ static int test_strings_e_0 (void)
   }
   {
     char device[] = "/dev/sda1";
   }
   {
     char device[] = "/dev/sda1";
-    device[5] = devchar;
     char mountpoint[] = "/";
     int r;
     suppress_error = 0;
     char mountpoint[] = "/";
     int r;
     suppress_error = 0;
@@ -1128,7 +2039,6 @@ static int test_strings_0 (void)
   /* InitBasicFS for test_strings_0: create ext2 on /dev/sda1 */
   {
     char device[] = "/dev/sda";
   /* 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);
     int r;
     suppress_error = 0;
     r = guestfs_blockdev_setrw (g, device);
@@ -1151,7 +2061,6 @@ static int test_strings_0 (void)
   }
   {
     char device[] = "/dev/sda";
   }
   {
     char device[] = "/dev/sda";
-    device[5] = devchar;
     char lines_0[] = ",";
     char *lines[] = {
       lines_0,
     char lines_0[] = ",";
     char *lines[] = {
       lines_0,
@@ -1166,7 +2075,6 @@ static int test_strings_0 (void)
   {
     char fstype[] = "ext2";
     char device[] = "/dev/sda1";
   {
     char fstype[] = "ext2";
     char device[] = "/dev/sda1";
-    device[5] = devchar;
     int r;
     suppress_error = 0;
     r = guestfs_mkfs (g, fstype, device);
     int r;
     suppress_error = 0;
     r = guestfs_mkfs (g, fstype, device);
@@ -1175,7 +2083,6 @@ static int test_strings_0 (void)
   }
   {
     char device[] = "/dev/sda1";
   }
   {
     char device[] = "/dev/sda1";
-    device[5] = devchar;
     char mountpoint[] = "/";
     int r;
     suppress_error = 0;
     char mountpoint[] = "/";
     int r;
     suppress_error = 0;
@@ -1258,7 +2165,6 @@ static int test_strings_1 (void)
   /* InitBasicFS for test_strings_1: create ext2 on /dev/sda1 */
   {
     char device[] = "/dev/sda";
   /* 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);
     int r;
     suppress_error = 0;
     r = guestfs_blockdev_setrw (g, device);
@@ -1281,7 +2187,6 @@ static int test_strings_1 (void)
   }
   {
     char device[] = "/dev/sda";
   }
   {
     char device[] = "/dev/sda";
-    device[5] = devchar;
     char lines_0[] = ",";
     char *lines[] = {
       lines_0,
     char lines_0[] = ",";
     char *lines[] = {
       lines_0,
@@ -1296,7 +2201,6 @@ static int test_strings_1 (void)
   {
     char fstype[] = "ext2";
     char device[] = "/dev/sda1";
   {
     char fstype[] = "ext2";
     char device[] = "/dev/sda1";
-    device[5] = devchar;
     int r;
     suppress_error = 0;
     r = guestfs_mkfs (g, fstype, device);
     int r;
     suppress_error = 0;
     r = guestfs_mkfs (g, fstype, device);
@@ -1305,7 +2209,6 @@ static int test_strings_1 (void)
   }
   {
     char device[] = "/dev/sda1";
   }
   {
     char device[] = "/dev/sda1";
-    device[5] = devchar;
     char mountpoint[] = "/";
     int r;
     suppress_error = 0;
     char mountpoint[] = "/";
     int r;
     suppress_error = 0;
@@ -1363,7 +2266,6 @@ static int test_equal_0 (void)
   /* InitBasicFS for test_equal_0: create ext2 on /dev/sda1 */
   {
     char device[] = "/dev/sda";
   /* 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);
     int r;
     suppress_error = 0;
     r = guestfs_blockdev_setrw (g, device);
@@ -1386,7 +2288,6 @@ static int test_equal_0 (void)
   }
   {
     char device[] = "/dev/sda";
   }
   {
     char device[] = "/dev/sda";
-    device[5] = devchar;
     char lines_0[] = ",";
     char *lines[] = {
       lines_0,
     char lines_0[] = ",";
     char *lines[] = {
       lines_0,
@@ -1401,7 +2302,6 @@ static int test_equal_0 (void)
   {
     char fstype[] = "ext2";
     char device[] = "/dev/sda1";
   {
     char fstype[] = "ext2";
     char device[] = "/dev/sda1";
-    device[5] = devchar;
     int r;
     suppress_error = 0;
     r = guestfs_mkfs (g, fstype, device);
     int r;
     suppress_error = 0;
     r = guestfs_mkfs (g, fstype, device);
@@ -1410,7 +2310,6 @@ static int test_equal_0 (void)
   }
   {
     char device[] = "/dev/sda1";
   }
   {
     char device[] = "/dev/sda1";
-    device[5] = devchar;
     char mountpoint[] = "/";
     int r;
     suppress_error = 0;
     char mountpoint[] = "/";
     int r;
     suppress_error = 0;
@@ -1474,7 +2373,6 @@ static int test_equal_1 (void)
   /* InitBasicFS for test_equal_1: create ext2 on /dev/sda1 */
   {
     char device[] = "/dev/sda";
   /* 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);
     int r;
     suppress_error = 0;
     r = guestfs_blockdev_setrw (g, device);
@@ -1497,7 +2395,6 @@ static int test_equal_1 (void)
   }
   {
     char device[] = "/dev/sda";
   }
   {
     char device[] = "/dev/sda";
-    device[5] = devchar;
     char lines_0[] = ",";
     char *lines[] = {
       lines_0,
     char lines_0[] = ",";
     char *lines[] = {
       lines_0,
@@ -1512,7 +2409,6 @@ static int test_equal_1 (void)
   {
     char fstype[] = "ext2";
     char device[] = "/dev/sda1";
   {
     char fstype[] = "ext2";
     char device[] = "/dev/sda1";
-    device[5] = devchar;
     int r;
     suppress_error = 0;
     r = guestfs_mkfs (g, fstype, device);
     int r;
     suppress_error = 0;
     r = guestfs_mkfs (g, fstype, device);
@@ -1521,7 +2417,6 @@ static int test_equal_1 (void)
   }
   {
     char device[] = "/dev/sda1";
   }
   {
     char device[] = "/dev/sda1";
-    device[5] = devchar;
     char mountpoint[] = "/";
     int r;
     suppress_error = 0;
     char mountpoint[] = "/";
     int r;
     suppress_error = 0;
@@ -1585,7 +2480,6 @@ static int test_equal_2 (void)
   /* InitBasicFS for test_equal_2: create ext2 on /dev/sda1 */
   {
     char device[] = "/dev/sda";
   /* 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);
     int r;
     suppress_error = 0;
     r = guestfs_blockdev_setrw (g, device);
@@ -1608,7 +2502,6 @@ static int test_equal_2 (void)
   }
   {
     char device[] = "/dev/sda";
   }
   {
     char device[] = "/dev/sda";
-    device[5] = devchar;
     char lines_0[] = ",";
     char *lines[] = {
       lines_0,
     char lines_0[] = ",";
     char *lines[] = {
       lines_0,
@@ -1623,7 +2516,6 @@ static int test_equal_2 (void)
   {
     char fstype[] = "ext2";
     char device[] = "/dev/sda1";
   {
     char fstype[] = "ext2";
     char device[] = "/dev/sda1";
-    device[5] = devchar;
     int r;
     suppress_error = 0;
     r = guestfs_mkfs (g, fstype, device);
     int r;
     suppress_error = 0;
     r = guestfs_mkfs (g, fstype, device);
@@ -1632,7 +2524,6 @@ static int test_equal_2 (void)
   }
   {
     char device[] = "/dev/sda1";
   }
   {
     char device[] = "/dev/sda1";
-    device[5] = devchar;
     char mountpoint[] = "/";
     int r;
     suppress_error = 0;
     char mountpoint[] = "/";
     int r;
     suppress_error = 0;
@@ -1674,7 +2565,6 @@ static int test_ping_daemon_0 (void)
   /* InitNone|InitEmpty for test_ping_daemon_0 */
   {
     char device[] = "/dev/sda";
   /* 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);
     int r;
     suppress_error = 0;
     r = guestfs_blockdev_setrw (g, device);
@@ -1727,7 +2617,6 @@ static int test_dmesg_0 (void)
   /* InitNone|InitEmpty for test_dmesg_0 */
   {
     char device[] = "/dev/sda";
   /* InitNone|InitEmpty for test_dmesg_0 */
   {
     char device[] = "/dev/sda";
-    device[5] = devchar;
     int r;
     suppress_error = 0;
     r = guestfs_blockdev_setrw (g, device);
     int r;
     suppress_error = 0;
     r = guestfs_blockdev_setrw (g, device);
@@ -1781,7 +2670,6 @@ static int test_drop_caches_0 (void)
   /* InitNone|InitEmpty for test_drop_caches_0 */
   {
     char device[] = "/dev/sda";
   /* 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);
     int r;
     suppress_error = 0;
     r = guestfs_blockdev_setrw (g, device);
@@ -1834,7 +2722,6 @@ static int test_mv_0 (void)
   /* InitBasicFS for test_mv_0: create ext2 on /dev/sda1 */
   {
     char device[] = "/dev/sda";
   /* 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);
     int r;
     suppress_error = 0;
     r = guestfs_blockdev_setrw (g, device);
@@ -1857,7 +2744,6 @@ static int test_mv_0 (void)
   }
   {
     char device[] = "/dev/sda";
   }
   {
     char device[] = "/dev/sda";
-    device[5] = devchar;
     char lines_0[] = ",";
     char *lines[] = {
       lines_0,
     char lines_0[] = ",";
     char *lines[] = {
       lines_0,
@@ -1872,7 +2758,6 @@ static int test_mv_0 (void)
   {
     char fstype[] = "ext2";
     char device[] = "/dev/sda1";
   {
     char fstype[] = "ext2";
     char device[] = "/dev/sda1";
-    device[5] = devchar;
     int r;
     suppress_error = 0;
     r = guestfs_mkfs (g, fstype, device);
     int r;
     suppress_error = 0;
     r = guestfs_mkfs (g, fstype, device);
@@ -1881,7 +2766,6 @@ static int test_mv_0 (void)
   }
   {
     char device[] = "/dev/sda1";
   }
   {
     char device[] = "/dev/sda1";
-    device[5] = devchar;
     char mountpoint[] = "/";
     int r;
     suppress_error = 0;
     char mountpoint[] = "/";
     int r;
     suppress_error = 0;
@@ -1946,7 +2830,6 @@ static int test_mv_1 (void)
   /* InitBasicFS for test_mv_1: create ext2 on /dev/sda1 */
   {
     char device[] = "/dev/sda";
   /* 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);
     int r;
     suppress_error = 0;
     r = guestfs_blockdev_setrw (g, device);
@@ -1969,7 +2852,6 @@ static int test_mv_1 (void)
   }
   {
     char device[] = "/dev/sda";
   }
   {
     char device[] = "/dev/sda";
-    device[5] = devchar;
     char lines_0[] = ",";
     char *lines[] = {
       lines_0,
     char lines_0[] = ",";
     char *lines[] = {
       lines_0,
@@ -1984,7 +2866,6 @@ static int test_mv_1 (void)
   {
     char fstype[] = "ext2";
     char device[] = "/dev/sda1";
   {
     char fstype[] = "ext2";
     char device[] = "/dev/sda1";
-    device[5] = devchar;
     int r;
     suppress_error = 0;
     r = guestfs_mkfs (g, fstype, device);
     int r;
     suppress_error = 0;
     r = guestfs_mkfs (g, fstype, device);
@@ -1993,7 +2874,6 @@ static int test_mv_1 (void)
   }
   {
     char device[] = "/dev/sda1";
   }
   {
     char device[] = "/dev/sda1";
-    device[5] = devchar;
     char mountpoint[] = "/";
     int r;
     suppress_error = 0;
     char mountpoint[] = "/";
     int r;
     suppress_error = 0;
@@ -2056,7 +2936,6 @@ static int test_cp_a_0 (void)
   /* InitBasicFS for test_cp_a_0: create ext2 on /dev/sda1 */
   {
     char device[] = "/dev/sda";
   /* 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);
     int r;
     suppress_error = 0;
     r = guestfs_blockdev_setrw (g, device);
@@ -2079,7 +2958,6 @@ static int test_cp_a_0 (void)
   }
   {
     char device[] = "/dev/sda";
   }
   {
     char device[] = "/dev/sda";
-    device[5] = devchar;
     char lines_0[] = ",";
     char *lines[] = {
       lines_0,
     char lines_0[] = ",";
     char *lines[] = {
       lines_0,
@@ -2094,7 +2972,6 @@ static int test_cp_a_0 (void)
   {
     char fstype[] = "ext2";
     char device[] = "/dev/sda1";
   {
     char fstype[] = "ext2";
     char device[] = "/dev/sda1";
-    device[5] = devchar;
     int r;
     suppress_error = 0;
     r = guestfs_mkfs (g, fstype, device);
     int r;
     suppress_error = 0;
     r = guestfs_mkfs (g, fstype, device);
@@ -2103,7 +2980,6 @@ static int test_cp_a_0 (void)
   }
   {
     char device[] = "/dev/sda1";
   }
   {
     char device[] = "/dev/sda1";
-    device[5] = devchar;
     char mountpoint[] = "/";
     int r;
     suppress_error = 0;
     char mountpoint[] = "/";
     int r;
     suppress_error = 0;
@@ -2184,7 +3060,6 @@ static int test_cp_0 (void)
   /* InitBasicFS for test_cp_0: create ext2 on /dev/sda1 */
   {
     char device[] = "/dev/sda";
   /* 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);
     int r;
     suppress_error = 0;
     r = guestfs_blockdev_setrw (g, device);
@@ -2207,7 +3082,6 @@ static int test_cp_0 (void)
   }
   {
     char device[] = "/dev/sda";
   }
   {
     char device[] = "/dev/sda";
-    device[5] = devchar;
     char lines_0[] = ",";
     char *lines[] = {
       lines_0,
     char lines_0[] = ",";
     char *lines[] = {
       lines_0,
@@ -2222,7 +3096,6 @@ static int test_cp_0 (void)
   {
     char fstype[] = "ext2";
     char device[] = "/dev/sda1";
   {
     char fstype[] = "ext2";
     char device[] = "/dev/sda1";
-    device[5] = devchar;
     int r;
     suppress_error = 0;
     r = guestfs_mkfs (g, fstype, device);
     int r;
     suppress_error = 0;
     r = guestfs_mkfs (g, fstype, device);
@@ -2231,7 +3104,6 @@ static int test_cp_0 (void)
   }
   {
     char device[] = "/dev/sda1";
   }
   {
     char device[] = "/dev/sda1";
-    device[5] = devchar;
     char mountpoint[] = "/";
     int r;
     suppress_error = 0;
     char mountpoint[] = "/";
     int r;
     suppress_error = 0;
@@ -2296,7 +3168,6 @@ static int test_cp_1 (void)
   /* InitBasicFS for test_cp_1: create ext2 on /dev/sda1 */
   {
     char device[] = "/dev/sda";
   /* 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);
     int r;
     suppress_error = 0;
     r = guestfs_blockdev_setrw (g, device);
@@ -2319,7 +3190,6 @@ static int test_cp_1 (void)
   }
   {
     char device[] = "/dev/sda";
   }
   {
     char device[] = "/dev/sda";
-    device[5] = devchar;
     char lines_0[] = ",";
     char *lines[] = {
       lines_0,
     char lines_0[] = ",";
     char *lines[] = {
       lines_0,
@@ -2334,7 +3204,6 @@ static int test_cp_1 (void)
   {
     char fstype[] = "ext2";
     char device[] = "/dev/sda1";
   {
     char fstype[] = "ext2";
     char device[] = "/dev/sda1";
-    device[5] = devchar;
     int r;
     suppress_error = 0;
     r = guestfs_mkfs (g, fstype, device);
     int r;
     suppress_error = 0;
     r = guestfs_mkfs (g, fstype, device);
@@ -2343,7 +3212,6 @@ static int test_cp_1 (void)
   }
   {
     char device[] = "/dev/sda1";
   }
   {
     char device[] = "/dev/sda1";
-    device[5] = devchar;
     char mountpoint[] = "/";
     int r;
     suppress_error = 0;
     char mountpoint[] = "/";
     int r;
     suppress_error = 0;
@@ -2406,7 +3274,6 @@ static int test_cp_2 (void)
   /* InitBasicFS for test_cp_2: create ext2 on /dev/sda1 */
   {
     char device[] = "/dev/sda";
   /* 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);
     int r;
     suppress_error = 0;
     r = guestfs_blockdev_setrw (g, device);
@@ -2429,7 +3296,6 @@ static int test_cp_2 (void)
   }
   {
     char device[] = "/dev/sda";
   }
   {
     char device[] = "/dev/sda";
-    device[5] = devchar;
     char lines_0[] = ",";
     char *lines[] = {
       lines_0,
     char lines_0[] = ",";
     char *lines[] = {
       lines_0,
@@ -2444,7 +3310,6 @@ static int test_cp_2 (void)
   {
     char fstype[] = "ext2";
     char device[] = "/dev/sda1";
   {
     char fstype[] = "ext2";
     char device[] = "/dev/sda1";
-    device[5] = devchar;
     int r;
     suppress_error = 0;
     r = guestfs_mkfs (g, fstype, device);
     int r;
     suppress_error = 0;
     r = guestfs_mkfs (g, fstype, device);
@@ -2453,7 +3318,6 @@ static int test_cp_2 (void)
   }
   {
     char device[] = "/dev/sda1";
   }
   {
     char device[] = "/dev/sda1";
-    device[5] = devchar;
     char mountpoint[] = "/";
     int r;
     suppress_error = 0;
     char mountpoint[] = "/";
     int r;
     suppress_error = 0;
@@ -2526,7 +3390,6 @@ static int test_grub_install_0 (void)
   /* InitBasicFS for test_grub_install_0: create ext2 on /dev/sda1 */
   {
     char device[] = "/dev/sda";
   /* 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);
     int r;
     suppress_error = 0;
     r = guestfs_blockdev_setrw (g, device);
@@ -2549,7 +3412,6 @@ static int test_grub_install_0 (void)
   }
   {
     char device[] = "/dev/sda";
   }
   {
     char device[] = "/dev/sda";
-    device[5] = devchar;
     char lines_0[] = ",";
     char *lines[] = {
       lines_0,
     char lines_0[] = ",";
     char *lines[] = {
       lines_0,
@@ -2564,7 +3426,6 @@ static int test_grub_install_0 (void)
   {
     char fstype[] = "ext2";
     char device[] = "/dev/sda1";
   {
     char fstype[] = "ext2";
     char device[] = "/dev/sda1";
-    device[5] = devchar;
     int r;
     suppress_error = 0;
     r = guestfs_mkfs (g, fstype, device);
     int r;
     suppress_error = 0;
     r = guestfs_mkfs (g, fstype, device);
@@ -2573,7 +3434,6 @@ static int test_grub_install_0 (void)
   }
   {
     char device[] = "/dev/sda1";
   }
   {
     char device[] = "/dev/sda1";
-    device[5] = devchar;
     char mountpoint[] = "/";
     int r;
     suppress_error = 0;
     char mountpoint[] = "/";
     int r;
     suppress_error = 0;
@@ -2585,7 +3445,6 @@ static int test_grub_install_0 (void)
   {
     char root[] = "/";
     char device[] = "/dev/sda1";
   {
     char root[] = "/";
     char device[] = "/dev/sda1";
-    device[5] = devchar;
     int r;
     suppress_error = 0;
     r = guestfs_grub_install (g, root, device);
     int r;
     suppress_error = 0;
     r = guestfs_grub_install (g, root, device);
@@ -2628,7 +3487,6 @@ static int test_zero_0 (void)
   /* InitBasicFS for test_zero_0: create ext2 on /dev/sda1 */
   {
     char device[] = "/dev/sda";
   /* 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);
     int r;
     suppress_error = 0;
     r = guestfs_blockdev_setrw (g, device);
@@ -2651,7 +3509,6 @@ static int test_zero_0 (void)
   }
   {
     char device[] = "/dev/sda";
   }
   {
     char device[] = "/dev/sda";
-    device[5] = devchar;
     char lines_0[] = ",";
     char *lines[] = {
       lines_0,
     char lines_0[] = ",";
     char *lines[] = {
       lines_0,
@@ -2666,7 +3523,6 @@ static int test_zero_0 (void)
   {
     char fstype[] = "ext2";
     char device[] = "/dev/sda1";
   {
     char fstype[] = "ext2";
     char device[] = "/dev/sda1";
-    device[5] = devchar;
     int r;
     suppress_error = 0;
     r = guestfs_mkfs (g, fstype, device);
     int r;
     suppress_error = 0;
     r = guestfs_mkfs (g, fstype, device);
@@ -2675,7 +3531,6 @@ static int test_zero_0 (void)
   }
   {
     char device[] = "/dev/sda1";
   }
   {
     char device[] = "/dev/sda1";
-    device[5] = devchar;
     char mountpoint[] = "/";
     int r;
     suppress_error = 0;
     char mountpoint[] = "/";
     int r;
     suppress_error = 0;
@@ -2687,7 +3542,6 @@ static int test_zero_0 (void)
   char expected[] = "data";
   {
     char pathordevice[] = "/dev/sda1";
   char expected[] = "data";
   {
     char pathordevice[] = "/dev/sda1";
-    pathordevice[5] = devchar;
     int r;
     suppress_error = 0;
     r = guestfs_umount (g, pathordevice);
     int r;
     suppress_error = 0;
     r = guestfs_umount (g, pathordevice);
@@ -2696,7 +3550,6 @@ static int test_zero_0 (void)
   }
   {
     char device[] = "/dev/sda1";
   }
   {
     char device[] = "/dev/sda1";
-    device[5] = devchar;
     int r;
     suppress_error = 0;
     r = guestfs_zero (g, device);
     int r;
     suppress_error = 0;
     r = guestfs_zero (g, device);
@@ -2705,7 +3558,6 @@ static int test_zero_0 (void)
   }
   {
     char path[] = "/dev/sda1";
   }
   {
     char path[] = "/dev/sda1";
-    path[5] = devchar;
     char *r;
     suppress_error = 0;
     r = guestfs_file (g, path);
     char *r;
     suppress_error = 0;
     r = guestfs_file (g, path);
@@ -2741,7 +3593,6 @@ static int test_fsck_0 (void)
   /* InitBasicFS for test_fsck_0: create ext2 on /dev/sda1 */
   {
     char device[] = "/dev/sda";
   /* 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);
     int r;
     suppress_error = 0;
     r = guestfs_blockdev_setrw (g, device);
@@ -2764,7 +3615,6 @@ static int test_fsck_0 (void)
   }
   {
     char device[] = "/dev/sda";
   }
   {
     char device[] = "/dev/sda";
-    device[5] = devchar;
     char lines_0[] = ",";
     char *lines[] = {
       lines_0,
     char lines_0[] = ",";
     char *lines[] = {
       lines_0,
@@ -2779,7 +3629,6 @@ static int test_fsck_0 (void)
   {
     char fstype[] = "ext2";
     char device[] = "/dev/sda1";
   {
     char fstype[] = "ext2";
     char device[] = "/dev/sda1";
-    device[5] = devchar;
     int r;
     suppress_error = 0;
     r = guestfs_mkfs (g, fstype, device);
     int r;
     suppress_error = 0;
     r = guestfs_mkfs (g, fstype, device);
@@ -2788,7 +3637,6 @@ static int test_fsck_0 (void)
   }
   {
     char device[] = "/dev/sda1";
   }
   {
     char device[] = "/dev/sda1";
-    device[5] = devchar;
     char mountpoint[] = "/";
     int r;
     suppress_error = 0;
     char mountpoint[] = "/";
     int r;
     suppress_error = 0;
@@ -2799,7 +3647,6 @@ static int test_fsck_0 (void)
   /* TestOutputInt for fsck (0) */
   {
     char pathordevice[] = "/dev/sda1";
   /* TestOutputInt for fsck (0) */
   {
     char pathordevice[] = "/dev/sda1";
-    pathordevice[5] = devchar;
     int r;
     suppress_error = 0;
     r = guestfs_umount (g, pathordevice);
     int r;
     suppress_error = 0;
     r = guestfs_umount (g, pathordevice);
@@ -2809,7 +3656,6 @@ static int test_fsck_0 (void)
   {
     char fstype[] = "ext2";
     char device[] = "/dev/sda1";
   {
     char fstype[] = "ext2";
     char device[] = "/dev/sda1";
-    device[5] = devchar;
     int r;
     suppress_error = 0;
     r = guestfs_fsck (g, fstype, device);
     int r;
     suppress_error = 0;
     r = guestfs_fsck (g, fstype, device);
@@ -2844,7 +3690,6 @@ static int test_fsck_1 (void)
   /* InitBasicFS for test_fsck_1: create ext2 on /dev/sda1 */
   {
     char device[] = "/dev/sda";
   /* 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);
     int r;
     suppress_error = 0;
     r = guestfs_blockdev_setrw (g, device);
@@ -2867,7 +3712,6 @@ static int test_fsck_1 (void)
   }
   {
     char device[] = "/dev/sda";
   }
   {
     char device[] = "/dev/sda";
-    device[5] = devchar;
     char lines_0[] = ",";
     char *lines[] = {
       lines_0,
     char lines_0[] = ",";
     char *lines[] = {
       lines_0,
@@ -2882,7 +3726,6 @@ static int test_fsck_1 (void)
   {
     char fstype[] = "ext2";
     char device[] = "/dev/sda1";
   {
     char fstype[] = "ext2";
     char device[] = "/dev/sda1";
-    device[5] = devchar;
     int r;
     suppress_error = 0;
     r = guestfs_mkfs (g, fstype, device);
     int r;
     suppress_error = 0;
     r = guestfs_mkfs (g, fstype, device);
@@ -2891,7 +3734,6 @@ static int test_fsck_1 (void)
   }
   {
     char device[] = "/dev/sda1";
   }
   {
     char device[] = "/dev/sda1";
-    device[5] = devchar;
     char mountpoint[] = "/";
     int r;
     suppress_error = 0;
     char mountpoint[] = "/";
     int r;
     suppress_error = 0;
@@ -2902,7 +3744,6 @@ static int test_fsck_1 (void)
   /* TestOutputInt for fsck (1) */
   {
     char pathordevice[] = "/dev/sda1";
   /* TestOutputInt for fsck (1) */
   {
     char pathordevice[] = "/dev/sda1";
-    pathordevice[5] = devchar;
     int r;
     suppress_error = 0;
     r = guestfs_umount (g, pathordevice);
     int r;
     suppress_error = 0;
     r = guestfs_umount (g, pathordevice);
@@ -2911,7 +3752,6 @@ static int test_fsck_1 (void)
   }
   {
     char device[] = "/dev/sda1";
   }
   {
     char device[] = "/dev/sda1";
-    device[5] = devchar;
     int r;
     suppress_error = 0;
     r = guestfs_zero (g, device);
     int r;
     suppress_error = 0;
     r = guestfs_zero (g, device);
@@ -2921,7 +3761,6 @@ static int test_fsck_1 (void)
   {
     char fstype[] = "ext2";
     char device[] = "/dev/sda1";
   {
     char fstype[] = "ext2";
     char device[] = "/dev/sda1";
-    device[5] = devchar;
     int r;
     suppress_error = 0;
     r = guestfs_fsck (g, fstype, device);
     int r;
     suppress_error = 0;
     r = guestfs_fsck (g, fstype, device);
@@ -2956,7 +3795,6 @@ static int test_set_e2uuid_0 (void)
   /* InitBasicFS for test_set_e2uuid_0: create ext2 on /dev/sda1 */
   {
     char device[] = "/dev/sda";
   /* 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);
     int r;
     suppress_error = 0;
     r = guestfs_blockdev_setrw (g, device);
@@ -2979,7 +3817,6 @@ static int test_set_e2uuid_0 (void)
   }
   {
     char device[] = "/dev/sda";
   }
   {
     char device[] = "/dev/sda";
-    device[5] = devchar;
     char lines_0[] = ",";
     char *lines[] = {
       lines_0,
     char lines_0[] = ",";
     char *lines[] = {
       lines_0,
@@ -2994,7 +3831,6 @@ static int test_set_e2uuid_0 (void)
   {
     char fstype[] = "ext2";
     char device[] = "/dev/sda1";
   {
     char fstype[] = "ext2";
     char device[] = "/dev/sda1";
-    device[5] = devchar;
     int r;
     suppress_error = 0;
     r = guestfs_mkfs (g, fstype, device);
     int r;
     suppress_error = 0;
     r = guestfs_mkfs (g, fstype, device);
@@ -3003,7 +3839,6 @@ static int test_set_e2uuid_0 (void)
   }
   {
     char device[] = "/dev/sda1";
   }
   {
     char device[] = "/dev/sda1";
-    device[5] = devchar;
     char mountpoint[] = "/";
     int r;
     suppress_error = 0;
     char mountpoint[] = "/";
     int r;
     suppress_error = 0;
@@ -3015,7 +3850,6 @@ static int test_set_e2uuid_0 (void)
   char expected[] = "a3a61220-882b-4f61-89f4-cf24dcc7297d";
   {
     char device[] = "/dev/sda1";
   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;
     char uuid[] = "a3a61220-882b-4f61-89f4-cf24dcc7297d";
     int r;
     suppress_error = 0;
@@ -3025,7 +3859,6 @@ static int test_set_e2uuid_0 (void)
   }
   {
     char device[] = "/dev/sda1";
   }
   {
     char device[] = "/dev/sda1";
-    device[5] = devchar;
     char *r;
     suppress_error = 0;
     r = guestfs_get_e2uuid (g, device);
     char *r;
     suppress_error = 0;
     r = guestfs_get_e2uuid (g, device);
@@ -3061,7 +3894,6 @@ static int test_set_e2uuid_1 (void)
   /* InitBasicFS for test_set_e2uuid_1: create ext2 on /dev/sda1 */
   {
     char device[] = "/dev/sda";
   /* 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);
     int r;
     suppress_error = 0;
     r = guestfs_blockdev_setrw (g, device);
@@ -3084,7 +3916,6 @@ static int test_set_e2uuid_1 (void)
   }
   {
     char device[] = "/dev/sda";
   }
   {
     char device[] = "/dev/sda";
-    device[5] = devchar;
     char lines_0[] = ",";
     char *lines[] = {
       lines_0,
     char lines_0[] = ",";
     char *lines[] = {
       lines_0,
@@ -3099,7 +3930,6 @@ static int test_set_e2uuid_1 (void)
   {
     char fstype[] = "ext2";
     char device[] = "/dev/sda1";
   {
     char fstype[] = "ext2";
     char device[] = "/dev/sda1";
-    device[5] = devchar;
     int r;
     suppress_error = 0;
     r = guestfs_mkfs (g, fstype, device);
     int r;
     suppress_error = 0;
     r = guestfs_mkfs (g, fstype, device);
@@ -3108,7 +3938,6 @@ static int test_set_e2uuid_1 (void)
   }
   {
     char device[] = "/dev/sda1";
   }
   {
     char device[] = "/dev/sda1";
-    device[5] = devchar;
     char mountpoint[] = "/";
     int r;
     suppress_error = 0;
     char mountpoint[] = "/";
     int r;
     suppress_error = 0;
@@ -3120,7 +3949,6 @@ static int test_set_e2uuid_1 (void)
   char expected[] = "";
   {
     char device[] = "/dev/sda1";
   char expected[] = "";
   {
     char device[] = "/dev/sda1";
-    device[5] = devchar;
     char uuid[] = "clear";
     int r;
     suppress_error = 0;
     char uuid[] = "clear";
     int r;
     suppress_error = 0;
@@ -3130,7 +3958,6 @@ static int test_set_e2uuid_1 (void)
   }
   {
     char device[] = "/dev/sda1";
   }
   {
     char device[] = "/dev/sda1";
-    device[5] = devchar;
     char *r;
     suppress_error = 0;
     r = guestfs_get_e2uuid (g, device);
     char *r;
     suppress_error = 0;
     r = guestfs_get_e2uuid (g, device);
@@ -3166,7 +3993,6 @@ static int test_set_e2uuid_2 (void)
   /* InitBasicFS for test_set_e2uuid_2: create ext2 on /dev/sda1 */
   {
     char device[] = "/dev/sda";
   /* 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);
     int r;
     suppress_error = 0;
     r = guestfs_blockdev_setrw (g, device);
@@ -3189,7 +4015,6 @@ static int test_set_e2uuid_2 (void)
   }
   {
     char device[] = "/dev/sda";
   }
   {
     char device[] = "/dev/sda";
-    device[5] = devchar;
     char lines_0[] = ",";
     char *lines[] = {
       lines_0,
     char lines_0[] = ",";
     char *lines[] = {
       lines_0,
@@ -3204,7 +4029,6 @@ static int test_set_e2uuid_2 (void)
   {
     char fstype[] = "ext2";
     char device[] = "/dev/sda1";
   {
     char fstype[] = "ext2";
     char device[] = "/dev/sda1";
-    device[5] = devchar;
     int r;
     suppress_error = 0;
     r = guestfs_mkfs (g, fstype, device);
     int r;
     suppress_error = 0;
     r = guestfs_mkfs (g, fstype, device);
@@ -3213,7 +4037,6 @@ static int test_set_e2uuid_2 (void)
   }
   {
     char device[] = "/dev/sda1";
   }
   {
     char device[] = "/dev/sda1";
-    device[5] = devchar;
     char mountpoint[] = "/";
     int r;
     suppress_error = 0;
     char mountpoint[] = "/";
     int r;
     suppress_error = 0;
@@ -3224,7 +4047,6 @@ static int test_set_e2uuid_2 (void)
   /* TestRun for set_e2uuid (2) */
   {
     char device[] = "/dev/sda1";
   /* TestRun for set_e2uuid (2) */
   {
     char device[] = "/dev/sda1";
-    device[5] = devchar;
     char uuid[] = "random";
     int r;
     suppress_error = 0;
     char uuid[] = "random";
     int r;
     suppress_error = 0;
@@ -3256,7 +4078,6 @@ static int test_set_e2uuid_3 (void)
   /* InitBasicFS for test_set_e2uuid_3: create ext2 on /dev/sda1 */
   {
     char device[] = "/dev/sda";
   /* 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);
     int r;
     suppress_error = 0;
     r = guestfs_blockdev_setrw (g, device);
@@ -3279,7 +4100,6 @@ static int test_set_e2uuid_3 (void)
   }
   {
     char device[] = "/dev/sda";
   }
   {
     char device[] = "/dev/sda";
-    device[5] = devchar;
     char lines_0[] = ",";
     char *lines[] = {
       lines_0,
     char lines_0[] = ",";
     char *lines[] = {
       lines_0,
@@ -3294,7 +4114,6 @@ static int test_set_e2uuid_3 (void)
   {
     char fstype[] = "ext2";
     char device[] = "/dev/sda1";
   {
     char fstype[] = "ext2";
     char device[] = "/dev/sda1";
-    device[5] = devchar;
     int r;
     suppress_error = 0;
     r = guestfs_mkfs (g, fstype, device);
     int r;
     suppress_error = 0;
     r = guestfs_mkfs (g, fstype, device);
@@ -3303,7 +4122,6 @@ static int test_set_e2uuid_3 (void)
   }
   {
     char device[] = "/dev/sda1";
   }
   {
     char device[] = "/dev/sda1";
-    device[5] = devchar;
     char mountpoint[] = "/";
     int r;
     suppress_error = 0;
     char mountpoint[] = "/";
     int r;
     suppress_error = 0;
@@ -3314,7 +4132,6 @@ static int test_set_e2uuid_3 (void)
   /* TestRun for set_e2uuid (3) */
   {
     char device[] = "/dev/sda1";
   /* TestRun for set_e2uuid (3) */
   {
     char device[] = "/dev/sda1";
-    device[5] = devchar;
     char uuid[] = "time";
     int r;
     suppress_error = 0;
     char uuid[] = "time";
     int r;
     suppress_error = 0;
@@ -3346,7 +4163,6 @@ static int test_set_e2label_0 (void)
   /* InitBasicFS for test_set_e2label_0: create ext2 on /dev/sda1 */
   {
     char device[] = "/dev/sda";
   /* 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);
     int r;
     suppress_error = 0;
     r = guestfs_blockdev_setrw (g, device);
@@ -3369,7 +4185,6 @@ static int test_set_e2label_0 (void)
   }
   {
     char device[] = "/dev/sda";
   }
   {
     char device[] = "/dev/sda";
-    device[5] = devchar;
     char lines_0[] = ",";
     char *lines[] = {
       lines_0,
     char lines_0[] = ",";
     char *lines[] = {
       lines_0,
@@ -3384,7 +4199,6 @@ static int test_set_e2label_0 (void)
   {
     char fstype[] = "ext2";
     char device[] = "/dev/sda1";
   {
     char fstype[] = "ext2";
     char device[] = "/dev/sda1";
-    device[5] = devchar;
     int r;
     suppress_error = 0;
     r = guestfs_mkfs (g, fstype, device);
     int r;
     suppress_error = 0;
     r = guestfs_mkfs (g, fstype, device);
@@ -3393,7 +4207,6 @@ static int test_set_e2label_0 (void)
   }
   {
     char device[] = "/dev/sda1";
   }
   {
     char device[] = "/dev/sda1";
-    device[5] = devchar;
     char mountpoint[] = "/";
     int r;
     suppress_error = 0;
     char mountpoint[] = "/";
     int r;
     suppress_error = 0;
@@ -3405,7 +4218,6 @@ static int test_set_e2label_0 (void)
   char expected[] = "testlabel";
   {
     char device[] = "/dev/sda1";
   char expected[] = "testlabel";
   {
     char device[] = "/dev/sda1";
-    device[5] = devchar;
     char label[] = "testlabel";
     int r;
     suppress_error = 0;
     char label[] = "testlabel";
     int r;
     suppress_error = 0;
@@ -3415,7 +4227,6 @@ static int test_set_e2label_0 (void)
   }
   {
     char device[] = "/dev/sda1";
   }
   {
     char device[] = "/dev/sda1";
-    device[5] = devchar;
     char *r;
     suppress_error = 0;
     r = guestfs_get_e2label (g, device);
     char *r;
     suppress_error = 0;
     r = guestfs_get_e2label (g, device);
@@ -3451,7 +4262,6 @@ static int test_pvremove_0 (void)
   /* InitNone|InitEmpty for test_pvremove_0 */
   {
     char device[] = "/dev/sda";
   /* InitNone|InitEmpty for test_pvremove_0 */
   {
     char device[] = "/dev/sda";
-    device[5] = devchar;
     int r;
     suppress_error = 0;
     r = guestfs_blockdev_setrw (g, device);
     int r;
     suppress_error = 0;
     r = guestfs_blockdev_setrw (g, device);
@@ -3472,10 +4282,9 @@ static int test_pvremove_0 (void)
     if (r == -1)
       return -1;
   }
     if (r == -1)
       return -1;
   }
-  /* TestOutputList for pvremove (0) */
+  /* TestOutputListOfDevices for pvremove (0) */
   {
     char device[] = "/dev/sda";
   {
     char device[] = "/dev/sda";
-    device[5] = devchar;
     char lines_0[] = ",";
     char *lines[] = {
       lines_0,
     char lines_0[] = ",";
     char *lines[] = {
       lines_0,
@@ -3489,7 +4298,6 @@ static int test_pvremove_0 (void)
   }
   {
     char device[] = "/dev/sda1";
   }
   {
     char device[] = "/dev/sda1";
-    device[5] = devchar;
     int r;
     suppress_error = 0;
     r = guestfs_pvcreate (g, device);
     int r;
     suppress_error = 0;
     r = guestfs_pvcreate (g, device);
@@ -3499,7 +4307,6 @@ static int test_pvremove_0 (void)
   {
     char volgroup[] = "VG";
     char physvols_0[] = "/dev/sda1";
   {
     char volgroup[] = "VG";
     char physvols_0[] = "/dev/sda1";
-    physvols_0[5] = devchar;
     char *physvols[] = {
       physvols_0,
       NULL
     char *physvols[] = {
       physvols_0,
       NULL
@@ -3538,7 +4345,6 @@ static int test_pvremove_0 (void)
   }
   {
     char device[] = "/dev/sda1";
   }
   {
     char device[] = "/dev/sda1";
-    device[5] = devchar;
     int r;
     suppress_error = 0;
     r = guestfs_pvremove (g, device);
     int r;
     suppress_error = 0;
     r = guestfs_pvremove (g, device);
@@ -3585,7 +4391,6 @@ static int test_pvremove_1 (void)
   /* InitNone|InitEmpty for test_pvremove_1 */
   {
     char device[] = "/dev/sda";
   /* InitNone|InitEmpty for test_pvremove_1 */
   {
     char device[] = "/dev/sda";
-    device[5] = devchar;
     int r;
     suppress_error = 0;
     r = guestfs_blockdev_setrw (g, device);
     int r;
     suppress_error = 0;
     r = guestfs_blockdev_setrw (g, device);
@@ -3606,10 +4411,9 @@ static int test_pvremove_1 (void)
     if (r == -1)
       return -1;
   }
     if (r == -1)
       return -1;
   }
-  /* TestOutputList for pvremove (1) */
+  /* TestOutputListOfDevices for pvremove (1) */
   {
     char device[] = "/dev/sda";
   {
     char device[] = "/dev/sda";
-    device[5] = devchar;
     char lines_0[] = ",";
     char *lines[] = {
       lines_0,
     char lines_0[] = ",";
     char *lines[] = {
       lines_0,
@@ -3623,7 +4427,6 @@ static int test_pvremove_1 (void)
   }
   {
     char device[] = "/dev/sda1";
   }
   {
     char device[] = "/dev/sda1";
-    device[5] = devchar;
     int r;
     suppress_error = 0;
     r = guestfs_pvcreate (g, device);
     int r;
     suppress_error = 0;
     r = guestfs_pvcreate (g, device);
@@ -3633,7 +4436,6 @@ static int test_pvremove_1 (void)
   {
     char volgroup[] = "VG";
     char physvols_0[] = "/dev/sda1";
   {
     char volgroup[] = "VG";
     char physvols_0[] = "/dev/sda1";
-    physvols_0[5] = devchar;
     char *physvols[] = {
       physvols_0,
       NULL
     char *physvols[] = {
       physvols_0,
       NULL
@@ -3672,7 +4474,6 @@ static int test_pvremove_1 (void)
   }
   {
     char device[] = "/dev/sda1";
   }
   {
     char device[] = "/dev/sda1";
-    device[5] = devchar;
     int r;
     suppress_error = 0;
     r = guestfs_pvremove (g, device);
     int r;
     suppress_error = 0;
     r = guestfs_pvremove (g, device);
@@ -3719,7 +4520,6 @@ static int test_pvremove_2 (void)
   /* InitNone|InitEmpty for test_pvremove_2 */
   {
     char device[] = "/dev/sda";
   /* InitNone|InitEmpty for test_pvremove_2 */
   {
     char device[] = "/dev/sda";
-    device[5] = devchar;
     int r;
     suppress_error = 0;
     r = guestfs_blockdev_setrw (g, device);
     int r;
     suppress_error = 0;
     r = guestfs_blockdev_setrw (g, device);
@@ -3740,10 +4540,9 @@ static int test_pvremove_2 (void)
     if (r == -1)
       return -1;
   }
     if (r == -1)
       return -1;
   }
-  /* TestOutputList for pvremove (2) */
+  /* TestOutputListOfDevices for pvremove (2) */
   {
     char device[] = "/dev/sda";
   {
     char device[] = "/dev/sda";
-    device[5] = devchar;
     char lines_0[] = ",";
     char *lines[] = {
       lines_0,
     char lines_0[] = ",";
     char *lines[] = {
       lines_0,
@@ -3757,7 +4556,6 @@ static int test_pvremove_2 (void)
   }
   {
     char device[] = "/dev/sda1";
   }
   {
     char device[] = "/dev/sda1";
-    device[5] = devchar;
     int r;
     suppress_error = 0;
     r = guestfs_pvcreate (g, device);
     int r;
     suppress_error = 0;
     r = guestfs_pvcreate (g, device);
@@ -3767,7 +4565,6 @@ static int test_pvremove_2 (void)
   {
     char volgroup[] = "VG";
     char physvols_0[] = "/dev/sda1";
   {
     char volgroup[] = "VG";
     char physvols_0[] = "/dev/sda1";
-    physvols_0[5] = devchar;
     char *physvols[] = {
       physvols_0,
       NULL
     char *physvols[] = {
       physvols_0,
       NULL
@@ -3806,7 +4603,6 @@ static int test_pvremove_2 (void)
   }
   {
     char device[] = "/dev/sda1";
   }
   {
     char device[] = "/dev/sda1";
-    device[5] = devchar;
     int r;
     suppress_error = 0;
     r = guestfs_pvremove (g, device);
     int r;
     suppress_error = 0;
     r = guestfs_pvremove (g, device);
@@ -3853,7 +4649,6 @@ static int test_vgremove_0 (void)
   /* InitNone|InitEmpty for test_vgremove_0 */
   {
     char device[] = "/dev/sda";
   /* InitNone|InitEmpty for test_vgremove_0 */
   {
     char device[] = "/dev/sda";
-    device[5] = devchar;
     int r;
     suppress_error = 0;
     r = guestfs_blockdev_setrw (g, device);
     int r;
     suppress_error = 0;
     r = guestfs_blockdev_setrw (g, device);
@@ -3877,7 +4672,6 @@ static int test_vgremove_0 (void)
   /* TestOutputList for vgremove (0) */
   {
     char device[] = "/dev/sda";
   /* TestOutputList for vgremove (0) */
   {
     char device[] = "/dev/sda";
-    device[5] = devchar;
     char lines_0[] = ",";
     char *lines[] = {
       lines_0,
     char lines_0[] = ",";
     char *lines[] = {
       lines_0,
@@ -3891,7 +4685,6 @@ static int test_vgremove_0 (void)
   }
   {
     char device[] = "/dev/sda1";
   }
   {
     char device[] = "/dev/sda1";
-    device[5] = devchar;
     int r;
     suppress_error = 0;
     r = guestfs_pvcreate (g, device);
     int r;
     suppress_error = 0;
     r = guestfs_pvcreate (g, device);
@@ -3901,7 +4694,6 @@ static int test_vgremove_0 (void)
   {
     char volgroup[] = "VG";
     char physvols_0[] = "/dev/sda1";
   {
     char volgroup[] = "VG";
     char physvols_0[] = "/dev/sda1";
-    physvols_0[5] = devchar;
     char *physvols[] = {
       physvols_0,
       NULL
     char *physvols[] = {
       physvols_0,
       NULL
@@ -3978,7 +4770,6 @@ static int test_vgremove_1 (void)
   /* InitNone|InitEmpty for test_vgremove_1 */
   {
     char device[] = "/dev/sda";
   /* InitNone|InitEmpty for test_vgremove_1 */
   {
     char device[] = "/dev/sda";
-    device[5] = devchar;
     int r;
     suppress_error = 0;
     r = guestfs_blockdev_setrw (g, device);
     int r;
     suppress_error = 0;
     r = guestfs_blockdev_setrw (g, device);
@@ -4002,7 +4793,6 @@ static int test_vgremove_1 (void)
   /* TestOutputList for vgremove (1) */
   {
     char device[] = "/dev/sda";
   /* TestOutputList for vgremove (1) */
   {
     char device[] = "/dev/sda";
-    device[5] = devchar;
     char lines_0[] = ",";
     char *lines[] = {
       lines_0,
     char lines_0[] = ",";
     char *lines[] = {
       lines_0,
@@ -4016,7 +4806,6 @@ static int test_vgremove_1 (void)
   }
   {
     char device[] = "/dev/sda1";
   }
   {
     char device[] = "/dev/sda1";
-    device[5] = devchar;
     int r;
     suppress_error = 0;
     r = guestfs_pvcreate (g, device);
     int r;
     suppress_error = 0;
     r = guestfs_pvcreate (g, device);
@@ -4026,7 +4815,6 @@ static int test_vgremove_1 (void)
   {
     char volgroup[] = "VG";
     char physvols_0[] = "/dev/sda1";
   {
     char volgroup[] = "VG";
     char physvols_0[] = "/dev/sda1";
-    physvols_0[5] = devchar;
     char *physvols[] = {
       physvols_0,
       NULL
     char *physvols[] = {
       physvols_0,
       NULL
@@ -4103,7 +4891,6 @@ static int test_lvremove_0 (void)
   /* InitNone|InitEmpty for test_lvremove_0 */
   {
     char device[] = "/dev/sda";
   /* InitNone|InitEmpty for test_lvremove_0 */
   {
     char device[] = "/dev/sda";
-    device[5] = devchar;
     int r;
     suppress_error = 0;
     r = guestfs_blockdev_setrw (g, device);
     int r;
     suppress_error = 0;
     r = guestfs_blockdev_setrw (g, device);
@@ -4127,7 +4914,6 @@ static int test_lvremove_0 (void)
   /* TestOutputList for lvremove (0) */
   {
     char device[] = "/dev/sda";
   /* TestOutputList for lvremove (0) */
   {
     char device[] = "/dev/sda";
-    device[5] = devchar;
     char lines_0[] = ",";
     char *lines[] = {
       lines_0,
     char lines_0[] = ",";
     char *lines[] = {
       lines_0,
@@ -4141,7 +4927,6 @@ static int test_lvremove_0 (void)
   }
   {
     char device[] = "/dev/sda1";
   }
   {
     char device[] = "/dev/sda1";
-    device[5] = devchar;
     int r;
     suppress_error = 0;
     r = guestfs_pvcreate (g, device);
     int r;
     suppress_error = 0;
     r = guestfs_pvcreate (g, device);
@@ -4151,7 +4936,6 @@ static int test_lvremove_0 (void)
   {
     char volgroup[] = "VG";
     char physvols_0[] = "/dev/sda1";
   {
     char volgroup[] = "VG";
     char physvols_0[] = "/dev/sda1";
-    physvols_0[5] = devchar;
     char *physvols[] = {
       physvols_0,
       NULL
     char *physvols[] = {
       physvols_0,
       NULL
@@ -4240,7 +5024,6 @@ static int test_lvremove_1 (void)
   /* InitNone|InitEmpty for test_lvremove_1 */
   {
     char device[] = "/dev/sda";
   /* InitNone|InitEmpty for test_lvremove_1 */
   {
     char device[] = "/dev/sda";
-    device[5] = devchar;
     int r;
     suppress_error = 0;
     r = guestfs_blockdev_setrw (g, device);
     int r;
     suppress_error = 0;
     r = guestfs_blockdev_setrw (g, device);
@@ -4264,7 +5047,6 @@ static int test_lvremove_1 (void)
   /* TestOutputList for lvremove (1) */
   {
     char device[] = "/dev/sda";
   /* TestOutputList for lvremove (1) */
   {
     char device[] = "/dev/sda";
-    device[5] = devchar;
     char lines_0[] = ",";
     char *lines[] = {
       lines_0,
     char lines_0[] = ",";
     char *lines[] = {
       lines_0,
@@ -4278,7 +5060,6 @@ static int test_lvremove_1 (void)
   }
   {
     char device[] = "/dev/sda1";
   }
   {
     char device[] = "/dev/sda1";
-    device[5] = devchar;
     int r;
     suppress_error = 0;
     r = guestfs_pvcreate (g, device);
     int r;
     suppress_error = 0;
     r = guestfs_pvcreate (g, device);
@@ -4288,7 +5069,6 @@ static int test_lvremove_1 (void)
   {
     char volgroup[] = "VG";
     char physvols_0[] = "/dev/sda1";
   {
     char volgroup[] = "VG";
     char physvols_0[] = "/dev/sda1";
-    physvols_0[5] = devchar;
     char *physvols[] = {
       physvols_0,
       NULL
     char *physvols[] = {
       physvols_0,
       NULL
@@ -4365,7 +5145,6 @@ static int test_lvremove_2 (void)
   /* InitNone|InitEmpty for test_lvremove_2 */
   {
     char device[] = "/dev/sda";
   /* InitNone|InitEmpty for test_lvremove_2 */
   {
     char device[] = "/dev/sda";
-    device[5] = devchar;
     int r;
     suppress_error = 0;
     r = guestfs_blockdev_setrw (g, device);
     int r;
     suppress_error = 0;
     r = guestfs_blockdev_setrw (g, device);
@@ -4389,7 +5168,6 @@ static int test_lvremove_2 (void)
   /* TestOutputList for lvremove (2) */
   {
     char device[] = "/dev/sda";
   /* TestOutputList for lvremove (2) */
   {
     char device[] = "/dev/sda";
-    device[5] = devchar;
     char lines_0[] = ",";
     char *lines[] = {
       lines_0,
     char lines_0[] = ",";
     char *lines[] = {
       lines_0,
@@ -4403,7 +5181,6 @@ static int test_lvremove_2 (void)
   }
   {
     char device[] = "/dev/sda1";
   }
   {
     char device[] = "/dev/sda1";
-    device[5] = devchar;
     int r;
     suppress_error = 0;
     r = guestfs_pvcreate (g, device);
     int r;
     suppress_error = 0;
     r = guestfs_pvcreate (g, device);
@@ -4413,7 +5190,6 @@ static int test_lvremove_2 (void)
   {
     char volgroup[] = "VG";
     char physvols_0[] = "/dev/sda1";
   {
     char volgroup[] = "VG";
     char physvols_0[] = "/dev/sda1";
-    physvols_0[5] = devchar;
     char *physvols[] = {
       physvols_0,
       NULL
     char *physvols[] = {
       physvols_0,
       NULL
@@ -4502,7 +5278,6 @@ static int test_mount_ro_0 (void)
   /* InitBasicFS for test_mount_ro_0: create ext2 on /dev/sda1 */
   {
     char device[] = "/dev/sda";
   /* 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);
     int r;
     suppress_error = 0;
     r = guestfs_blockdev_setrw (g, device);
@@ -4525,7 +5300,6 @@ static int test_mount_ro_0 (void)
   }
   {
     char device[] = "/dev/sda";
   }
   {
     char device[] = "/dev/sda";
-    device[5] = devchar;
     char lines_0[] = ",";
     char *lines[] = {
       lines_0,
     char lines_0[] = ",";
     char *lines[] = {
       lines_0,
@@ -4540,7 +5314,6 @@ static int test_mount_ro_0 (void)
   {
     char fstype[] = "ext2";
     char device[] = "/dev/sda1";
   {
     char fstype[] = "ext2";
     char device[] = "/dev/sda1";
-    device[5] = devchar;
     int r;
     suppress_error = 0;
     r = guestfs_mkfs (g, fstype, device);
     int r;
     suppress_error = 0;
     r = guestfs_mkfs (g, fstype, device);
@@ -4549,7 +5322,6 @@ static int test_mount_ro_0 (void)
   }
   {
     char device[] = "/dev/sda1";
   }
   {
     char device[] = "/dev/sda1";
-    device[5] = devchar;
     char mountpoint[] = "/";
     int r;
     suppress_error = 0;
     char mountpoint[] = "/";
     int r;
     suppress_error = 0;
@@ -4568,7 +5340,6 @@ static int test_mount_ro_0 (void)
   }
   {
     char device[] = "/dev/sda1";
   }
   {
     char device[] = "/dev/sda1";
-    device[5] = devchar;
     char mountpoint[] = "/";
     int r;
     suppress_error = 0;
     char mountpoint[] = "/";
     int r;
     suppress_error = 0;
@@ -4608,7 +5379,6 @@ static int test_mount_ro_1 (void)
   /* InitBasicFS for test_mount_ro_1: create ext2 on /dev/sda1 */
   {
     char device[] = "/dev/sda";
   /* 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);
     int r;
     suppress_error = 0;
     r = guestfs_blockdev_setrw (g, device);
@@ -4631,7 +5401,6 @@ static int test_mount_ro_1 (void)
   }
   {
     char device[] = "/dev/sda";
   }
   {
     char device[] = "/dev/sda";
-    device[5] = devchar;
     char lines_0[] = ",";
     char *lines[] = {
       lines_0,
     char lines_0[] = ",";
     char *lines[] = {
       lines_0,
@@ -4646,7 +5415,6 @@ static int test_mount_ro_1 (void)
   {
     char fstype[] = "ext2";
     char device[] = "/dev/sda1";
   {
     char fstype[] = "ext2";
     char device[] = "/dev/sda1";
-    device[5] = devchar;
     int r;
     suppress_error = 0;
     r = guestfs_mkfs (g, fstype, device);
     int r;
     suppress_error = 0;
     r = guestfs_mkfs (g, fstype, device);
@@ -4655,7 +5423,6 @@ static int test_mount_ro_1 (void)
   }
   {
     char device[] = "/dev/sda1";
   }
   {
     char device[] = "/dev/sda1";
-    device[5] = devchar;
     char mountpoint[] = "/";
     int r;
     suppress_error = 0;
     char mountpoint[] = "/";
     int r;
     suppress_error = 0;
@@ -4684,7 +5451,6 @@ static int test_mount_ro_1 (void)
   }
   {
     char device[] = "/dev/sda1";
   }
   {
     char device[] = "/dev/sda1";
-    device[5] = devchar;
     char mountpoint[] = "/";
     int r;
     suppress_error = 0;
     char mountpoint[] = "/";
     int r;
     suppress_error = 0;
@@ -4729,7 +5495,6 @@ static int test_tgz_in_0 (void)
   /* InitBasicFS for test_tgz_in_0: create ext2 on /dev/sda1 */
   {
     char device[] = "/dev/sda";
   /* 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);
     int r;
     suppress_error = 0;
     r = guestfs_blockdev_setrw (g, device);
@@ -4752,7 +5517,6 @@ static int test_tgz_in_0 (void)
   }
   {
     char device[] = "/dev/sda";
   }
   {
     char device[] = "/dev/sda";
-    device[5] = devchar;
     char lines_0[] = ",";
     char *lines[] = {
       lines_0,
     char lines_0[] = ",";
     char *lines[] = {
       lines_0,
@@ -4767,7 +5531,6 @@ static int test_tgz_in_0 (void)
   {
     char fstype[] = "ext2";
     char device[] = "/dev/sda1";
   {
     char fstype[] = "ext2";
     char device[] = "/dev/sda1";
-    device[5] = devchar;
     int r;
     suppress_error = 0;
     r = guestfs_mkfs (g, fstype, device);
     int r;
     suppress_error = 0;
     r = guestfs_mkfs (g, fstype, device);
@@ -4776,7 +5539,6 @@ static int test_tgz_in_0 (void)
   }
   {
     char device[] = "/dev/sda1";
   }
   {
     char device[] = "/dev/sda1";
-    device[5] = devchar;
     char mountpoint[] = "/";
     int r;
     suppress_error = 0;
     char mountpoint[] = "/";
     int r;
     suppress_error = 0;
@@ -4831,7 +5593,6 @@ static int test_tar_in_0 (void)
   /* InitBasicFS for test_tar_in_0: create ext2 on /dev/sda1 */
   {
     char device[] = "/dev/sda";
   /* 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);
     int r;
     suppress_error = 0;
     r = guestfs_blockdev_setrw (g, device);
@@ -4854,7 +5615,6 @@ static int test_tar_in_0 (void)
   }
   {
     char device[] = "/dev/sda";
   }
   {
     char device[] = "/dev/sda";
-    device[5] = devchar;
     char lines_0[] = ",";
     char *lines[] = {
       lines_0,
     char lines_0[] = ",";
     char *lines[] = {
       lines_0,
@@ -4869,7 +5629,6 @@ static int test_tar_in_0 (void)
   {
     char fstype[] = "ext2";
     char device[] = "/dev/sda1";
   {
     char fstype[] = "ext2";
     char device[] = "/dev/sda1";
-    device[5] = devchar;
     int r;
     suppress_error = 0;
     r = guestfs_mkfs (g, fstype, device);
     int r;
     suppress_error = 0;
     r = guestfs_mkfs (g, fstype, device);
@@ -4878,7 +5637,6 @@ static int test_tar_in_0 (void)
   }
   {
     char device[] = "/dev/sda1";
   }
   {
     char device[] = "/dev/sda1";
-    device[5] = devchar;
     char mountpoint[] = "/";
     int r;
     suppress_error = 0;
     char mountpoint[] = "/";
     int r;
     suppress_error = 0;
@@ -4933,7 +5691,6 @@ static int test_checksum_0 (void)
   /* InitBasicFS for test_checksum_0: create ext2 on /dev/sda1 */
   {
     char device[] = "/dev/sda";
   /* 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);
     int r;
     suppress_error = 0;
     r = guestfs_blockdev_setrw (g, device);
@@ -4956,7 +5713,6 @@ static int test_checksum_0 (void)
   }
   {
     char device[] = "/dev/sda";
   }
   {
     char device[] = "/dev/sda";
-    device[5] = devchar;
     char lines_0[] = ",";
     char *lines[] = {
       lines_0,
     char lines_0[] = ",";
     char *lines[] = {
       lines_0,
@@ -4971,7 +5727,6 @@ static int test_checksum_0 (void)
   {
     char fstype[] = "ext2";
     char device[] = "/dev/sda1";
   {
     char fstype[] = "ext2";
     char device[] = "/dev/sda1";
-    device[5] = devchar;
     int r;
     suppress_error = 0;
     r = guestfs_mkfs (g, fstype, device);
     int r;
     suppress_error = 0;
     r = guestfs_mkfs (g, fstype, device);
@@ -4980,7 +5735,6 @@ static int test_checksum_0 (void)
   }
   {
     char device[] = "/dev/sda1";
   }
   {
     char device[] = "/dev/sda1";
-    device[5] = devchar;
     char mountpoint[] = "/";
     int r;
     suppress_error = 0;
     char mountpoint[] = "/";
     int r;
     suppress_error = 0;
@@ -5037,7 +5791,6 @@ static int test_checksum_1 (void)
   /* InitBasicFS for test_checksum_1: create ext2 on /dev/sda1 */
   {
     char device[] = "/dev/sda";
   /* 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);
     int r;
     suppress_error = 0;
     r = guestfs_blockdev_setrw (g, device);
@@ -5060,7 +5813,6 @@ static int test_checksum_1 (void)
   }
   {
     char device[] = "/dev/sda";
   }
   {
     char device[] = "/dev/sda";
-    device[5] = devchar;
     char lines_0[] = ",";
     char *lines[] = {
       lines_0,
     char lines_0[] = ",";
     char *lines[] = {
       lines_0,
@@ -5075,7 +5827,6 @@ static int test_checksum_1 (void)
   {
     char fstype[] = "ext2";
     char device[] = "/dev/sda1";
   {
     char fstype[] = "ext2";
     char device[] = "/dev/sda1";
-    device[5] = devchar;
     int r;
     suppress_error = 0;
     r = guestfs_mkfs (g, fstype, device);
     int r;
     suppress_error = 0;
     r = guestfs_mkfs (g, fstype, device);
@@ -5084,7 +5835,6 @@ static int test_checksum_1 (void)
   }
   {
     char device[] = "/dev/sda1";
   }
   {
     char device[] = "/dev/sda1";
-    device[5] = devchar;
     char mountpoint[] = "/";
     int r;
     suppress_error = 0;
     char mountpoint[] = "/";
     int r;
     suppress_error = 0;
@@ -5127,7 +5877,6 @@ static int test_checksum_2 (void)
   /* InitBasicFS for test_checksum_2: create ext2 on /dev/sda1 */
   {
     char device[] = "/dev/sda";
   /* 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);
     int r;
     suppress_error = 0;
     r = guestfs_blockdev_setrw (g, device);
@@ -5150,7 +5899,6 @@ static int test_checksum_2 (void)
   }
   {
     char device[] = "/dev/sda";
   }
   {
     char device[] = "/dev/sda";
-    device[5] = devchar;
     char lines_0[] = ",";
     char *lines[] = {
       lines_0,
     char lines_0[] = ",";
     char *lines[] = {
       lines_0,
@@ -5165,7 +5913,6 @@ static int test_checksum_2 (void)
   {
     char fstype[] = "ext2";
     char device[] = "/dev/sda1";
   {
     char fstype[] = "ext2";
     char device[] = "/dev/sda1";
-    device[5] = devchar;
     int r;
     suppress_error = 0;
     r = guestfs_mkfs (g, fstype, device);
     int r;
     suppress_error = 0;
     r = guestfs_mkfs (g, fstype, device);
@@ -5174,7 +5921,6 @@ static int test_checksum_2 (void)
   }
   {
     char device[] = "/dev/sda1";
   }
   {
     char device[] = "/dev/sda1";
-    device[5] = devchar;
     char mountpoint[] = "/";
     int r;
     suppress_error = 0;
     char mountpoint[] = "/";
     int r;
     suppress_error = 0;
@@ -5231,7 +5977,6 @@ static int test_checksum_3 (void)
   /* InitBasicFS for test_checksum_3: create ext2 on /dev/sda1 */
   {
     char device[] = "/dev/sda";
   /* 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);
     int r;
     suppress_error = 0;
     r = guestfs_blockdev_setrw (g, device);
@@ -5254,7 +5999,6 @@ static int test_checksum_3 (void)
   }
   {
     char device[] = "/dev/sda";
   }
   {
     char device[] = "/dev/sda";
-    device[5] = devchar;
     char lines_0[] = ",";
     char *lines[] = {
       lines_0,
     char lines_0[] = ",";
     char *lines[] = {
       lines_0,
@@ -5269,7 +6013,6 @@ static int test_checksum_3 (void)
   {
     char fstype[] = "ext2";
     char device[] = "/dev/sda1";
   {
     char fstype[] = "ext2";
     char device[] = "/dev/sda1";
-    device[5] = devchar;
     int r;
     suppress_error = 0;
     r = guestfs_mkfs (g, fstype, device);
     int r;
     suppress_error = 0;
     r = guestfs_mkfs (g, fstype, device);
@@ -5278,7 +6021,6 @@ static int test_checksum_3 (void)
   }
   {
     char device[] = "/dev/sda1";
   }
   {
     char device[] = "/dev/sda1";
-    device[5] = devchar;
     char mountpoint[] = "/";
     int r;
     suppress_error = 0;
     char mountpoint[] = "/";
     int r;
     suppress_error = 0;
@@ -5335,7 +6077,6 @@ static int test_checksum_4 (void)
   /* InitBasicFS for test_checksum_4: create ext2 on /dev/sda1 */
   {
     char device[] = "/dev/sda";
   /* 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);
     int r;
     suppress_error = 0;
     r = guestfs_blockdev_setrw (g, device);
@@ -5358,7 +6099,6 @@ static int test_checksum_4 (void)
   }
   {
     char device[] = "/dev/sda";
   }
   {
     char device[] = "/dev/sda";
-    device[5] = devchar;
     char lines_0[] = ",";
     char *lines[] = {
       lines_0,
     char lines_0[] = ",";
     char *lines[] = {
       lines_0,
@@ -5373,7 +6113,6 @@ static int test_checksum_4 (void)
   {
     char fstype[] = "ext2";
     char device[] = "/dev/sda1";
   {
     char fstype[] = "ext2";
     char device[] = "/dev/sda1";
-    device[5] = devchar;
     int r;
     suppress_error = 0;
     r = guestfs_mkfs (g, fstype, device);
     int r;
     suppress_error = 0;
     r = guestfs_mkfs (g, fstype, device);
@@ -5382,7 +6121,6 @@ static int test_checksum_4 (void)
   }
   {
     char device[] = "/dev/sda1";
   }
   {
     char device[] = "/dev/sda1";
-    device[5] = devchar;
     char mountpoint[] = "/";
     int r;
     suppress_error = 0;
     char mountpoint[] = "/";
     int r;
     suppress_error = 0;
@@ -5439,7 +6177,6 @@ static int test_checksum_5 (void)
   /* InitBasicFS for test_checksum_5: create ext2 on /dev/sda1 */
   {
     char device[] = "/dev/sda";
   /* 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);
     int r;
     suppress_error = 0;
     r = guestfs_blockdev_setrw (g, device);
@@ -5462,7 +6199,6 @@ static int test_checksum_5 (void)
   }
   {
     char device[] = "/dev/sda";
   }
   {
     char device[] = "/dev/sda";
-    device[5] = devchar;
     char lines_0[] = ",";
     char *lines[] = {
       lines_0,
     char lines_0[] = ",";
     char *lines[] = {
       lines_0,
@@ -5477,7 +6213,6 @@ static int test_checksum_5 (void)
   {
     char fstype[] = "ext2";
     char device[] = "/dev/sda1";
   {
     char fstype[] = "ext2";
     char device[] = "/dev/sda1";
-    device[5] = devchar;
     int r;
     suppress_error = 0;
     r = guestfs_mkfs (g, fstype, device);
     int r;
     suppress_error = 0;
     r = guestfs_mkfs (g, fstype, device);
@@ -5486,7 +6221,6 @@ static int test_checksum_5 (void)
   }
   {
     char device[] = "/dev/sda1";
   }
   {
     char device[] = "/dev/sda1";
-    device[5] = devchar;
     char mountpoint[] = "/";
     int r;
     suppress_error = 0;
     char mountpoint[] = "/";
     int r;
     suppress_error = 0;
@@ -5543,7 +6277,6 @@ static int test_checksum_6 (void)
   /* InitBasicFS for test_checksum_6: create ext2 on /dev/sda1 */
   {
     char device[] = "/dev/sda";
   /* 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);
     int r;
     suppress_error = 0;
     r = guestfs_blockdev_setrw (g, device);
@@ -5566,7 +6299,6 @@ static int test_checksum_6 (void)
   }
   {
     char device[] = "/dev/sda";
   }
   {
     char device[] = "/dev/sda";
-    device[5] = devchar;
     char lines_0[] = ",";
     char *lines[] = {
       lines_0,
     char lines_0[] = ",";
     char *lines[] = {
       lines_0,
@@ -5581,7 +6313,6 @@ static int test_checksum_6 (void)
   {
     char fstype[] = "ext2";
     char device[] = "/dev/sda1";
   {
     char fstype[] = "ext2";
     char device[] = "/dev/sda1";
-    device[5] = devchar;
     int r;
     suppress_error = 0;
     r = guestfs_mkfs (g, fstype, device);
     int r;
     suppress_error = 0;
     r = guestfs_mkfs (g, fstype, device);
@@ -5590,7 +6321,6 @@ static int test_checksum_6 (void)
   }
   {
     char device[] = "/dev/sda1";
   }
   {
     char device[] = "/dev/sda1";
-    device[5] = devchar;
     char mountpoint[] = "/";
     int r;
     suppress_error = 0;
     char mountpoint[] = "/";
     int r;
     suppress_error = 0;
@@ -5647,7 +6377,6 @@ static int test_checksum_7 (void)
   /* InitBasicFS for test_checksum_7: create ext2 on /dev/sda1 */
   {
     char device[] = "/dev/sda";
   /* 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);
     int r;
     suppress_error = 0;
     r = guestfs_blockdev_setrw (g, device);
@@ -5670,7 +6399,6 @@ static int test_checksum_7 (void)
   }
   {
     char device[] = "/dev/sda";
   }
   {
     char device[] = "/dev/sda";
-    device[5] = devchar;
     char lines_0[] = ",";
     char *lines[] = {
       lines_0,
     char lines_0[] = ",";
     char *lines[] = {
       lines_0,
@@ -5685,7 +6413,6 @@ static int test_checksum_7 (void)
   {
     char fstype[] = "ext2";
     char device[] = "/dev/sda1";
   {
     char fstype[] = "ext2";
     char device[] = "/dev/sda1";
-    device[5] = devchar;
     int r;
     suppress_error = 0;
     r = guestfs_mkfs (g, fstype, device);
     int r;
     suppress_error = 0;
     r = guestfs_mkfs (g, fstype, device);
@@ -5694,7 +6421,6 @@ static int test_checksum_7 (void)
   }
   {
     char device[] = "/dev/sda1";
   }
   {
     char device[] = "/dev/sda1";
-    device[5] = devchar;
     char mountpoint[] = "/";
     int r;
     suppress_error = 0;
     char mountpoint[] = "/";
     int r;
     suppress_error = 0;
@@ -5751,7 +6477,6 @@ static int test_checksum_8 (void)
   /* InitBasicFS for test_checksum_8: create ext2 on /dev/sda1 */
   {
     char device[] = "/dev/sda";
   /* 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);
     int r;
     suppress_error = 0;
     r = guestfs_blockdev_setrw (g, device);
@@ -5774,7 +6499,6 @@ static int test_checksum_8 (void)
   }
   {
     char device[] = "/dev/sda";
   }
   {
     char device[] = "/dev/sda";
-    device[5] = devchar;
     char lines_0[] = ",";
     char *lines[] = {
       lines_0,
     char lines_0[] = ",";
     char *lines[] = {
       lines_0,
@@ -5789,7 +6513,6 @@ static int test_checksum_8 (void)
   {
     char fstype[] = "ext2";
     char device[] = "/dev/sda1";
   {
     char fstype[] = "ext2";
     char device[] = "/dev/sda1";
-    device[5] = devchar;
     int r;
     suppress_error = 0;
     r = guestfs_mkfs (g, fstype, device);
     int r;
     suppress_error = 0;
     r = guestfs_mkfs (g, fstype, device);
@@ -5798,7 +6521,6 @@ static int test_checksum_8 (void)
   }
   {
     char device[] = "/dev/sda1";
   }
   {
     char device[] = "/dev/sda1";
-    device[5] = devchar;
     char mountpoint[] = "/";
     int r;
     suppress_error = 0;
     char mountpoint[] = "/";
     int r;
     suppress_error = 0;
@@ -5809,12 +6531,13 @@ static int test_checksum_8 (void)
   /* TestOutput for checksum (8) */
   char expected[] = "46d6ca27ee07cdc6fa99c2e138cc522c";
   {
   /* TestOutput for checksum (8) */
   char expected[] = "46d6ca27ee07cdc6fa99c2e138cc522c";
   {
+    char options[] = "ro";
+    char vfstype[] = "squashfs";
     char device[] = "/dev/sdd";
     char device[] = "/dev/sdd";
-    device[5] = devchar;
     char mountpoint[] = "/";
     int r;
     suppress_error = 0;
     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;
   }
     if (r == -1)
       return -1;
   }
@@ -5856,7 +6579,6 @@ static int test_download_0 (void)
   /* InitBasicFS for test_download_0: create ext2 on /dev/sda1 */
   {
     char device[] = "/dev/sda";
   /* 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);
     int r;
     suppress_error = 0;
     r = guestfs_blockdev_setrw (g, device);
@@ -5879,7 +6601,6 @@ static int test_download_0 (void)
   }
   {
     char device[] = "/dev/sda";
   }
   {
     char device[] = "/dev/sda";
-    device[5] = devchar;
     char lines_0[] = ",";
     char *lines[] = {
       lines_0,
     char lines_0[] = ",";
     char *lines[] = {
       lines_0,
@@ -5894,7 +6615,6 @@ static int test_download_0 (void)
   {
     char fstype[] = "ext2";
     char device[] = "/dev/sda1";
   {
     char fstype[] = "ext2";
     char device[] = "/dev/sda1";
-    device[5] = devchar;
     int r;
     suppress_error = 0;
     r = guestfs_mkfs (g, fstype, device);
     int r;
     suppress_error = 0;
     r = guestfs_mkfs (g, fstype, device);
@@ -5903,7 +6623,6 @@ static int test_download_0 (void)
   }
   {
     char device[] = "/dev/sda1";
   }
   {
     char device[] = "/dev/sda1";
-    device[5] = devchar;
     char mountpoint[] = "/";
     int r;
     suppress_error = 0;
     char mountpoint[] = "/";
     int r;
     suppress_error = 0;
@@ -5975,7 +6694,6 @@ static int test_upload_0 (void)
   /* InitBasicFS for test_upload_0: create ext2 on /dev/sda1 */
   {
     char device[] = "/dev/sda";
   /* 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);
     int r;
     suppress_error = 0;
     r = guestfs_blockdev_setrw (g, device);
@@ -5998,7 +6716,6 @@ static int test_upload_0 (void)
   }
   {
     char device[] = "/dev/sda";
   }
   {
     char device[] = "/dev/sda";
-    device[5] = devchar;
     char lines_0[] = ",";
     char *lines[] = {
       lines_0,
     char lines_0[] = ",";
     char *lines[] = {
       lines_0,
@@ -6013,7 +6730,6 @@ static int test_upload_0 (void)
   {
     char fstype[] = "ext2";
     char device[] = "/dev/sda1";
   {
     char fstype[] = "ext2";
     char device[] = "/dev/sda1";
-    device[5] = devchar;
     int r;
     suppress_error = 0;
     r = guestfs_mkfs (g, fstype, device);
     int r;
     suppress_error = 0;
     r = guestfs_mkfs (g, fstype, device);
@@ -6022,7 +6738,6 @@ static int test_upload_0 (void)
   }
   {
     char device[] = "/dev/sda1";
   }
   {
     char device[] = "/dev/sda1";
-    device[5] = devchar;
     char mountpoint[] = "/";
     int r;
     suppress_error = 0;
     char mountpoint[] = "/";
     int r;
     suppress_error = 0;
@@ -6078,7 +6793,6 @@ static int test_blockdev_rereadpt_0 (void)
   /* InitNone|InitEmpty for test_blockdev_rereadpt_0 */
   {
     char device[] = "/dev/sda";
   /* 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);
     int r;
     suppress_error = 0;
     r = guestfs_blockdev_setrw (g, device);
@@ -6102,7 +6816,6 @@ static int test_blockdev_rereadpt_0 (void)
   /* TestRun for blockdev_rereadpt (0) */
   {
     char device[] = "/dev/sda";
   /* TestRun for blockdev_rereadpt (0) */
   {
     char device[] = "/dev/sda";
-    device[5] = devchar;
     int r;
     suppress_error = 0;
     r = guestfs_blockdev_rereadpt (g, device);
     int r;
     suppress_error = 0;
     r = guestfs_blockdev_rereadpt (g, device);
@@ -6133,7 +6846,6 @@ static int test_blockdev_flushbufs_0 (void)
   /* InitNone|InitEmpty for test_blockdev_flushbufs_0 */
   {
     char device[] = "/dev/sda";
   /* 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);
     int r;
     suppress_error = 0;
     r = guestfs_blockdev_setrw (g, device);
@@ -6157,7 +6869,6 @@ static int test_blockdev_flushbufs_0 (void)
   /* TestRun for blockdev_flushbufs (0) */
   {
     char device[] = "/dev/sda";
   /* TestRun for blockdev_flushbufs (0) */
   {
     char device[] = "/dev/sda";
-    device[5] = devchar;
     int r;
     suppress_error = 0;
     r = guestfs_blockdev_flushbufs (g, device);
     int r;
     suppress_error = 0;
     r = guestfs_blockdev_flushbufs (g, device);
@@ -6188,7 +6899,6 @@ static int test_blockdev_getsize64_0 (void)
   /* InitNone|InitEmpty for test_blockdev_getsize64_0 */
   {
     char device[] = "/dev/sda";
   /* 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);
     int r;
     suppress_error = 0;
     r = guestfs_blockdev_setrw (g, device);
@@ -6212,7 +6922,6 @@ static int test_blockdev_getsize64_0 (void)
   /* TestOutputInt for blockdev_getsize64 (0) */
   {
     char device[] = "/dev/sda";
   /* TestOutputInt for blockdev_getsize64 (0) */
   {
     char device[] = "/dev/sda";
-    device[5] = devchar;
     int64_t r;
     suppress_error = 0;
     r = guestfs_blockdev_getsize64 (g, device);
     int64_t r;
     suppress_error = 0;
     r = guestfs_blockdev_getsize64 (g, device);
@@ -6247,7 +6956,6 @@ static int test_blockdev_getsz_0 (void)
   /* InitNone|InitEmpty for test_blockdev_getsz_0 */
   {
     char device[] = "/dev/sda";
   /* 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);
     int r;
     suppress_error = 0;
     r = guestfs_blockdev_setrw (g, device);
@@ -6271,7 +6979,6 @@ static int test_blockdev_getsz_0 (void)
   /* TestOutputInt for blockdev_getsz (0) */
   {
     char device[] = "/dev/sda";
   /* TestOutputInt for blockdev_getsz (0) */
   {
     char device[] = "/dev/sda";
-    device[5] = devchar;
     int64_t r;
     suppress_error = 0;
     r = guestfs_blockdev_getsz (g, device);
     int64_t r;
     suppress_error = 0;
     r = guestfs_blockdev_getsz (g, device);
@@ -6306,7 +7013,6 @@ static int test_blockdev_getbsz_0 (void)
   /* InitNone|InitEmpty for test_blockdev_getbsz_0 */
   {
     char device[] = "/dev/sda";
   /* 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);
     int r;
     suppress_error = 0;
     r = guestfs_blockdev_setrw (g, device);
@@ -6330,7 +7036,6 @@ static int test_blockdev_getbsz_0 (void)
   /* TestOutputInt for blockdev_getbsz (0) */
   {
     char device[] = "/dev/sda";
   /* TestOutputInt for blockdev_getbsz (0) */
   {
     char device[] = "/dev/sda";
-    device[5] = devchar;
     int r;
     suppress_error = 0;
     r = guestfs_blockdev_getbsz (g, device);
     int r;
     suppress_error = 0;
     r = guestfs_blockdev_getbsz (g, device);
@@ -6365,7 +7070,6 @@ static int test_blockdev_getss_0 (void)
   /* InitNone|InitEmpty for test_blockdev_getss_0 */
   {
     char device[] = "/dev/sda";
   /* 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);
     int r;
     suppress_error = 0;
     r = guestfs_blockdev_setrw (g, device);
@@ -6389,7 +7093,6 @@ static int test_blockdev_getss_0 (void)
   /* TestOutputInt for blockdev_getss (0) */
   {
     char device[] = "/dev/sda";
   /* TestOutputInt for blockdev_getss (0) */
   {
     char device[] = "/dev/sda";
-    device[5] = devchar;
     int r;
     suppress_error = 0;
     r = guestfs_blockdev_getss (g, device);
     int r;
     suppress_error = 0;
     r = guestfs_blockdev_getss (g, device);
@@ -6424,7 +7127,6 @@ static int test_blockdev_getro_0 (void)
   /* InitNone|InitEmpty for test_blockdev_getro_0 */
   {
     char device[] = "/dev/sda";
   /* 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);
     int r;
     suppress_error = 0;
     r = guestfs_blockdev_setrw (g, device);
@@ -6448,7 +7150,6 @@ static int test_blockdev_getro_0 (void)
   /* TestOutputTrue for blockdev_getro (0) */
   {
     char device[] = "/dev/sda";
   /* TestOutputTrue for blockdev_getro (0) */
   {
     char device[] = "/dev/sda";
-    device[5] = devchar;
     int r;
     suppress_error = 0;
     r = guestfs_blockdev_setro (g, device);
     int r;
     suppress_error = 0;
     r = guestfs_blockdev_setro (g, device);
@@ -6457,7 +7158,6 @@ static int test_blockdev_getro_0 (void)
   }
   {
     char device[] = "/dev/sda";
   }
   {
     char device[] = "/dev/sda";
-    device[5] = devchar;
     int r;
     suppress_error = 0;
     r = guestfs_blockdev_getro (g, device);
     int r;
     suppress_error = 0;
     r = guestfs_blockdev_getro (g, device);
@@ -6492,7 +7192,6 @@ static int test_blockdev_setrw_0 (void)
   /* InitNone|InitEmpty for test_blockdev_setrw_0 */
   {
     char device[] = "/dev/sda";
   /* 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);
     int r;
     suppress_error = 0;
     r = guestfs_blockdev_setrw (g, device);
@@ -6516,7 +7215,6 @@ static int test_blockdev_setrw_0 (void)
   /* TestOutputFalse for blockdev_setrw (0) */
   {
     char device[] = "/dev/sda";
   /* TestOutputFalse for blockdev_setrw (0) */
   {
     char device[] = "/dev/sda";
-    device[5] = devchar;
     int r;
     suppress_error = 0;
     r = guestfs_blockdev_setrw (g, device);
     int r;
     suppress_error = 0;
     r = guestfs_blockdev_setrw (g, device);
@@ -6525,7 +7223,6 @@ static int test_blockdev_setrw_0 (void)
   }
   {
     char device[] = "/dev/sda";
   }
   {
     char device[] = "/dev/sda";
-    device[5] = devchar;
     int r;
     suppress_error = 0;
     r = guestfs_blockdev_getro (g, device);
     int r;
     suppress_error = 0;
     r = guestfs_blockdev_getro (g, device);
@@ -6560,7 +7257,6 @@ static int test_blockdev_setro_0 (void)
   /* InitNone|InitEmpty for test_blockdev_setro_0 */
   {
     char device[] = "/dev/sda";
   /* 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);
     int r;
     suppress_error = 0;
     r = guestfs_blockdev_setrw (g, device);
@@ -6584,7 +7280,6 @@ static int test_blockdev_setro_0 (void)
   /* TestOutputTrue for blockdev_setro (0) */
   {
     char device[] = "/dev/sda";
   /* TestOutputTrue for blockdev_setro (0) */
   {
     char device[] = "/dev/sda";
-    device[5] = devchar;
     int r;
     suppress_error = 0;
     r = guestfs_blockdev_setro (g, device);
     int r;
     suppress_error = 0;
     r = guestfs_blockdev_setro (g, device);
@@ -6593,7 +7288,6 @@ static int test_blockdev_setro_0 (void)
   }
   {
     char device[] = "/dev/sda";
   }
   {
     char device[] = "/dev/sda";
-    device[5] = devchar;
     int r;
     suppress_error = 0;
     r = guestfs_blockdev_getro (g, device);
     int r;
     suppress_error = 0;
     r = guestfs_blockdev_getro (g, device);
@@ -6628,7 +7322,6 @@ static int test_statvfs_0 (void)
   /* InitBasicFS for test_statvfs_0: create ext2 on /dev/sda1 */
   {
     char device[] = "/dev/sda";
   /* 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);
     int r;
     suppress_error = 0;
     r = guestfs_blockdev_setrw (g, device);
@@ -6651,7 +7344,6 @@ static int test_statvfs_0 (void)
   }
   {
     char device[] = "/dev/sda";
   }
   {
     char device[] = "/dev/sda";
-    device[5] = devchar;
     char lines_0[] = ",";
     char *lines[] = {
       lines_0,
     char lines_0[] = ",";
     char *lines[] = {
       lines_0,
@@ -6666,7 +7358,6 @@ static int test_statvfs_0 (void)
   {
     char fstype[] = "ext2";
     char device[] = "/dev/sda1";
   {
     char fstype[] = "ext2";
     char device[] = "/dev/sda1";
-    device[5] = devchar;
     int r;
     suppress_error = 0;
     r = guestfs_mkfs (g, fstype, device);
     int r;
     suppress_error = 0;
     r = guestfs_mkfs (g, fstype, device);
@@ -6675,7 +7366,6 @@ static int test_statvfs_0 (void)
   }
   {
     char device[] = "/dev/sda1";
   }
   {
     char device[] = "/dev/sda1";
-    device[5] = devchar;
     char mountpoint[] = "/";
     int r;
     suppress_error = 0;
     char mountpoint[] = "/";
     int r;
     suppress_error = 0;
@@ -6732,7 +7422,6 @@ static int test_lstat_0 (void)
   /* InitBasicFS for test_lstat_0: create ext2 on /dev/sda1 */
   {
     char device[] = "/dev/sda";
   /* 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);
     int r;
     suppress_error = 0;
     r = guestfs_blockdev_setrw (g, device);
@@ -6755,7 +7444,6 @@ static int test_lstat_0 (void)
   }
   {
     char device[] = "/dev/sda";
   }
   {
     char device[] = "/dev/sda";
-    device[5] = devchar;
     char lines_0[] = ",";
     char *lines[] = {
       lines_0,
     char lines_0[] = ",";
     char *lines[] = {
       lines_0,
@@ -6770,7 +7458,6 @@ static int test_lstat_0 (void)
   {
     char fstype[] = "ext2";
     char device[] = "/dev/sda1";
   {
     char fstype[] = "ext2";
     char device[] = "/dev/sda1";
-    device[5] = devchar;
     int r;
     suppress_error = 0;
     r = guestfs_mkfs (g, fstype, device);
     int r;
     suppress_error = 0;
     r = guestfs_mkfs (g, fstype, device);
@@ -6779,7 +7466,6 @@ static int test_lstat_0 (void)
   }
   {
     char device[] = "/dev/sda1";
   }
   {
     char device[] = "/dev/sda1";
-    device[5] = devchar;
     char mountpoint[] = "/";
     int r;
     suppress_error = 0;
     char mountpoint[] = "/";
     int r;
     suppress_error = 0;
@@ -6834,7 +7520,6 @@ static int test_stat_0 (void)
   /* InitBasicFS for test_stat_0: create ext2 on /dev/sda1 */
   {
     char device[] = "/dev/sda";
   /* 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);
     int r;
     suppress_error = 0;
     r = guestfs_blockdev_setrw (g, device);
@@ -6857,7 +7542,6 @@ static int test_stat_0 (void)
   }
   {
     char device[] = "/dev/sda";
   }
   {
     char device[] = "/dev/sda";
-    device[5] = devchar;
     char lines_0[] = ",";
     char *lines[] = {
       lines_0,
     char lines_0[] = ",";
     char *lines[] = {
       lines_0,
@@ -6872,7 +7556,6 @@ static int test_stat_0 (void)
   {
     char fstype[] = "ext2";
     char device[] = "/dev/sda1";
   {
     char fstype[] = "ext2";
     char device[] = "/dev/sda1";
-    device[5] = devchar;
     int r;
     suppress_error = 0;
     r = guestfs_mkfs (g, fstype, device);
     int r;
     suppress_error = 0;
     r = guestfs_mkfs (g, fstype, device);
@@ -6881,7 +7564,6 @@ static int test_stat_0 (void)
   }
   {
     char device[] = "/dev/sda1";
   }
   {
     char device[] = "/dev/sda1";
-    device[5] = devchar;
     char mountpoint[] = "/";
     int r;
     suppress_error = 0;
     char mountpoint[] = "/";
     int r;
     suppress_error = 0;
@@ -6936,7 +7618,6 @@ static int test_command_lines_0 (void)
   /* InitBasicFS for test_command_lines_0: create ext2 on /dev/sda1 */
   {
     char device[] = "/dev/sda";
   /* 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);
     int r;
     suppress_error = 0;
     r = guestfs_blockdev_setrw (g, device);
@@ -6959,7 +7640,6 @@ static int test_command_lines_0 (void)
   }
   {
     char device[] = "/dev/sda";
   }
   {
     char device[] = "/dev/sda";
-    device[5] = devchar;
     char lines_0[] = ",";
     char *lines[] = {
       lines_0,
     char lines_0[] = ",";
     char *lines[] = {
       lines_0,
@@ -6974,7 +7654,6 @@ static int test_command_lines_0 (void)
   {
     char fstype[] = "ext2";
     char device[] = "/dev/sda1";
   {
     char fstype[] = "ext2";
     char device[] = "/dev/sda1";
-    device[5] = devchar;
     int r;
     suppress_error = 0;
     r = guestfs_mkfs (g, fstype, device);
     int r;
     suppress_error = 0;
     r = guestfs_mkfs (g, fstype, device);
@@ -6983,7 +7662,6 @@ static int test_command_lines_0 (void)
   }
   {
     char device[] = "/dev/sda1";
   }
   {
     char device[] = "/dev/sda1";
-    device[5] = devchar;
     char mountpoint[] = "/";
     int r;
     suppress_error = 0;
     char mountpoint[] = "/";
     int r;
     suppress_error = 0;
@@ -7067,7 +7745,6 @@ static int test_command_lines_1 (void)
   /* InitBasicFS for test_command_lines_1: create ext2 on /dev/sda1 */
   {
     char device[] = "/dev/sda";
   /* 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);
     int r;
     suppress_error = 0;
     r = guestfs_blockdev_setrw (g, device);
@@ -7090,7 +7767,6 @@ static int test_command_lines_1 (void)
   }
   {
     char device[] = "/dev/sda";
   }
   {
     char device[] = "/dev/sda";
-    device[5] = devchar;
     char lines_0[] = ",";
     char *lines[] = {
       lines_0,
     char lines_0[] = ",";
     char *lines[] = {
       lines_0,
@@ -7105,7 +7781,6 @@ static int test_command_lines_1 (void)
   {
     char fstype[] = "ext2";
     char device[] = "/dev/sda1";
   {
     char fstype[] = "ext2";
     char device[] = "/dev/sda1";
-    device[5] = devchar;
     int r;
     suppress_error = 0;
     r = guestfs_mkfs (g, fstype, device);
     int r;
     suppress_error = 0;
     r = guestfs_mkfs (g, fstype, device);
@@ -7114,7 +7789,6 @@ static int test_command_lines_1 (void)
   }
   {
     char device[] = "/dev/sda1";
   }
   {
     char device[] = "/dev/sda1";
-    device[5] = devchar;
     char mountpoint[] = "/";
     int r;
     suppress_error = 0;
     char mountpoint[] = "/";
     int r;
     suppress_error = 0;
@@ -7198,7 +7872,6 @@ static int test_command_lines_2 (void)
   /* InitBasicFS for test_command_lines_2: create ext2 on /dev/sda1 */
   {
     char device[] = "/dev/sda";
   /* 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);
     int r;
     suppress_error = 0;
     r = guestfs_blockdev_setrw (g, device);
@@ -7221,7 +7894,6 @@ static int test_command_lines_2 (void)
   }
   {
     char device[] = "/dev/sda";
   }
   {
     char device[] = "/dev/sda";
-    device[5] = devchar;
     char lines_0[] = ",";
     char *lines[] = {
       lines_0,
     char lines_0[] = ",";
     char *lines[] = {
       lines_0,
@@ -7236,7 +7908,6 @@ static int test_command_lines_2 (void)
   {
     char fstype[] = "ext2";
     char device[] = "/dev/sda1";
   {
     char fstype[] = "ext2";
     char device[] = "/dev/sda1";
-    device[5] = devchar;
     int r;
     suppress_error = 0;
     r = guestfs_mkfs (g, fstype, device);
     int r;
     suppress_error = 0;
     r = guestfs_mkfs (g, fstype, device);
@@ -7245,7 +7916,6 @@ static int test_command_lines_2 (void)
   }
   {
     char device[] = "/dev/sda1";
   }
   {
     char device[] = "/dev/sda1";
-    device[5] = devchar;
     char mountpoint[] = "/";
     int r;
     suppress_error = 0;
     char mountpoint[] = "/";
     int r;
     suppress_error = 0;
@@ -7341,7 +8011,6 @@ static int test_command_lines_3 (void)
   /* InitBasicFS for test_command_lines_3: create ext2 on /dev/sda1 */
   {
     char device[] = "/dev/sda";
   /* 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);
     int r;
     suppress_error = 0;
     r = guestfs_blockdev_setrw (g, device);
@@ -7364,7 +8033,6 @@ static int test_command_lines_3 (void)
   }
   {
     char device[] = "/dev/sda";
   }
   {
     char device[] = "/dev/sda";
-    device[5] = devchar;
     char lines_0[] = ",";
     char *lines[] = {
       lines_0,
     char lines_0[] = ",";
     char *lines[] = {
       lines_0,
@@ -7379,7 +8047,6 @@ static int test_command_lines_3 (void)
   {
     char fstype[] = "ext2";
     char device[] = "/dev/sda1";
   {
     char fstype[] = "ext2";
     char device[] = "/dev/sda1";
-    device[5] = devchar;
     int r;
     suppress_error = 0;
     r = guestfs_mkfs (g, fstype, device);
     int r;
     suppress_error = 0;
     r = guestfs_mkfs (g, fstype, device);
@@ -7388,7 +8055,6 @@ static int test_command_lines_3 (void)
   }
   {
     char device[] = "/dev/sda1";
   }
   {
     char device[] = "/dev/sda1";
-    device[5] = devchar;
     char mountpoint[] = "/";
     int r;
     suppress_error = 0;
     char mountpoint[] = "/";
     int r;
     suppress_error = 0;
@@ -7484,7 +8150,6 @@ static int test_command_lines_4 (void)
   /* InitBasicFS for test_command_lines_4: create ext2 on /dev/sda1 */
   {
     char device[] = "/dev/sda";
   /* 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);
     int r;
     suppress_error = 0;
     r = guestfs_blockdev_setrw (g, device);
@@ -7507,7 +8172,6 @@ static int test_command_lines_4 (void)
   }
   {
     char device[] = "/dev/sda";
   }
   {
     char device[] = "/dev/sda";
-    device[5] = devchar;
     char lines_0[] = ",";
     char *lines[] = {
       lines_0,
     char lines_0[] = ",";
     char *lines[] = {
       lines_0,
@@ -7522,7 +8186,6 @@ static int test_command_lines_4 (void)
   {
     char fstype[] = "ext2";
     char device[] = "/dev/sda1";
   {
     char fstype[] = "ext2";
     char device[] = "/dev/sda1";
-    device[5] = devchar;
     int r;
     suppress_error = 0;
     r = guestfs_mkfs (g, fstype, device);
     int r;
     suppress_error = 0;
     r = guestfs_mkfs (g, fstype, device);
@@ -7531,7 +8194,6 @@ static int test_command_lines_4 (void)
   }
   {
     char device[] = "/dev/sda1";
   }
   {
     char device[] = "/dev/sda1";
-    device[5] = devchar;
     char mountpoint[] = "/";
     int r;
     suppress_error = 0;
     char mountpoint[] = "/";
     int r;
     suppress_error = 0;
@@ -7639,7 +8301,6 @@ static int test_command_lines_5 (void)
   /* InitBasicFS for test_command_lines_5: create ext2 on /dev/sda1 */
   {
     char device[] = "/dev/sda";
   /* 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);
     int r;
     suppress_error = 0;
     r = guestfs_blockdev_setrw (g, device);
@@ -7662,7 +8323,6 @@ static int test_command_lines_5 (void)
   }
   {
     char device[] = "/dev/sda";
   }
   {
     char device[] = "/dev/sda";
-    device[5] = devchar;
     char lines_0[] = ",";
     char *lines[] = {
       lines_0,
     char lines_0[] = ",";
     char *lines[] = {
       lines_0,
@@ -7677,7 +8337,6 @@ static int test_command_lines_5 (void)
   {
     char fstype[] = "ext2";
     char device[] = "/dev/sda1";
   {
     char fstype[] = "ext2";
     char device[] = "/dev/sda1";
-    device[5] = devchar;
     int r;
     suppress_error = 0;
     r = guestfs_mkfs (g, fstype, device);
     int r;
     suppress_error = 0;
     r = guestfs_mkfs (g, fstype, device);
@@ -7686,7 +8345,6 @@ static int test_command_lines_5 (void)
   }
   {
     char device[] = "/dev/sda1";
   }
   {
     char device[] = "/dev/sda1";
-    device[5] = devchar;
     char mountpoint[] = "/";
     int r;
     suppress_error = 0;
     char mountpoint[] = "/";
     int r;
     suppress_error = 0;
@@ -7806,7 +8464,6 @@ static int test_command_lines_6 (void)
   /* InitBasicFS for test_command_lines_6: create ext2 on /dev/sda1 */
   {
     char device[] = "/dev/sda";
   /* 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);
     int r;
     suppress_error = 0;
     r = guestfs_blockdev_setrw (g, device);
@@ -7829,7 +8486,6 @@ static int test_command_lines_6 (void)
   }
   {
     char device[] = "/dev/sda";
   }
   {
     char device[] = "/dev/sda";
-    device[5] = devchar;
     char lines_0[] = ",";
     char *lines[] = {
       lines_0,
     char lines_0[] = ",";
     char *lines[] = {
       lines_0,
@@ -7844,7 +8500,6 @@ static int test_command_lines_6 (void)
   {
     char fstype[] = "ext2";
     char device[] = "/dev/sda1";
   {
     char fstype[] = "ext2";
     char device[] = "/dev/sda1";
-    device[5] = devchar;
     int r;
     suppress_error = 0;
     r = guestfs_mkfs (g, fstype, device);
     int r;
     suppress_error = 0;
     r = guestfs_mkfs (g, fstype, device);
@@ -7853,7 +8508,6 @@ static int test_command_lines_6 (void)
   }
   {
     char device[] = "/dev/sda1";
   }
   {
     char device[] = "/dev/sda1";
-    device[5] = devchar;
     char mountpoint[] = "/";
     int r;
     suppress_error = 0;
     char mountpoint[] = "/";
     int r;
     suppress_error = 0;
@@ -7925,7 +8579,6 @@ static int test_command_lines_7 (void)
   /* InitBasicFS for test_command_lines_7: create ext2 on /dev/sda1 */
   {
     char device[] = "/dev/sda";
   /* 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);
     int r;
     suppress_error = 0;
     r = guestfs_blockdev_setrw (g, device);
@@ -7948,7 +8601,6 @@ static int test_command_lines_7 (void)
   }
   {
     char device[] = "/dev/sda";
   }
   {
     char device[] = "/dev/sda";
-    device[5] = devchar;
     char lines_0[] = ",";
     char *lines[] = {
       lines_0,
     char lines_0[] = ",";
     char *lines[] = {
       lines_0,
@@ -7963,7 +8615,6 @@ static int test_command_lines_7 (void)
   {
     char fstype[] = "ext2";
     char device[] = "/dev/sda1";
   {
     char fstype[] = "ext2";
     char device[] = "/dev/sda1";
-    device[5] = devchar;
     int r;
     suppress_error = 0;
     r = guestfs_mkfs (g, fstype, device);
     int r;
     suppress_error = 0;
     r = guestfs_mkfs (g, fstype, device);
@@ -7972,7 +8623,6 @@ static int test_command_lines_7 (void)
   }
   {
     char device[] = "/dev/sda1";
   }
   {
     char device[] = "/dev/sda1";
-    device[5] = devchar;
     char mountpoint[] = "/";
     int r;
     suppress_error = 0;
     char mountpoint[] = "/";
     int r;
     suppress_error = 0;
@@ -8056,7 +8706,6 @@ static int test_command_lines_8 (void)
   /* InitBasicFS for test_command_lines_8: create ext2 on /dev/sda1 */
   {
     char device[] = "/dev/sda";
   /* 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);
     int r;
     suppress_error = 0;
     r = guestfs_blockdev_setrw (g, device);
@@ -8079,7 +8728,6 @@ static int test_command_lines_8 (void)
   }
   {
     char device[] = "/dev/sda";
   }
   {
     char device[] = "/dev/sda";
-    device[5] = devchar;
     char lines_0[] = ",";
     char *lines[] = {
       lines_0,
     char lines_0[] = ",";
     char *lines[] = {
       lines_0,
@@ -8094,7 +8742,6 @@ static int test_command_lines_8 (void)
   {
     char fstype[] = "ext2";
     char device[] = "/dev/sda1";
   {
     char fstype[] = "ext2";
     char device[] = "/dev/sda1";
-    device[5] = devchar;
     int r;
     suppress_error = 0;
     r = guestfs_mkfs (g, fstype, device);
     int r;
     suppress_error = 0;
     r = guestfs_mkfs (g, fstype, device);
@@ -8103,7 +8750,6 @@ static int test_command_lines_8 (void)
   }
   {
     char device[] = "/dev/sda1";
   }
   {
     char device[] = "/dev/sda1";
-    device[5] = devchar;
     char mountpoint[] = "/";
     int r;
     suppress_error = 0;
     char mountpoint[] = "/";
     int r;
     suppress_error = 0;
@@ -8199,7 +8845,6 @@ static int test_command_lines_9 (void)
   /* InitBasicFS for test_command_lines_9: create ext2 on /dev/sda1 */
   {
     char device[] = "/dev/sda";
   /* 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);
     int r;
     suppress_error = 0;
     r = guestfs_blockdev_setrw (g, device);
@@ -8222,7 +8867,6 @@ static int test_command_lines_9 (void)
   }
   {
     char device[] = "/dev/sda";
   }
   {
     char device[] = "/dev/sda";
-    device[5] = devchar;
     char lines_0[] = ",";
     char *lines[] = {
       lines_0,
     char lines_0[] = ",";
     char *lines[] = {
       lines_0,
@@ -8237,7 +8881,6 @@ static int test_command_lines_9 (void)
   {
     char fstype[] = "ext2";
     char device[] = "/dev/sda1";
   {
     char fstype[] = "ext2";
     char device[] = "/dev/sda1";
-    device[5] = devchar;
     int r;
     suppress_error = 0;
     r = guestfs_mkfs (g, fstype, device);
     int r;
     suppress_error = 0;
     r = guestfs_mkfs (g, fstype, device);
@@ -8246,7 +8889,6 @@ static int test_command_lines_9 (void)
   }
   {
     char device[] = "/dev/sda1";
   }
   {
     char device[] = "/dev/sda1";
-    device[5] = devchar;
     char mountpoint[] = "/";
     int r;
     suppress_error = 0;
     char mountpoint[] = "/";
     int r;
     suppress_error = 0;
@@ -8342,7 +8984,6 @@ static int test_command_lines_10 (void)
   /* InitBasicFS for test_command_lines_10: create ext2 on /dev/sda1 */
   {
     char device[] = "/dev/sda";
   /* 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);
     int r;
     suppress_error = 0;
     r = guestfs_blockdev_setrw (g, device);
@@ -8365,7 +9006,6 @@ static int test_command_lines_10 (void)
   }
   {
     char device[] = "/dev/sda";
   }
   {
     char device[] = "/dev/sda";
-    device[5] = devchar;
     char lines_0[] = ",";
     char *lines[] = {
       lines_0,
     char lines_0[] = ",";
     char *lines[] = {
       lines_0,
@@ -8380,7 +9020,6 @@ static int test_command_lines_10 (void)
   {
     char fstype[] = "ext2";
     char device[] = "/dev/sda1";
   {
     char fstype[] = "ext2";
     char device[] = "/dev/sda1";
-    device[5] = devchar;
     int r;
     suppress_error = 0;
     r = guestfs_mkfs (g, fstype, device);
     int r;
     suppress_error = 0;
     r = guestfs_mkfs (g, fstype, device);
@@ -8389,7 +9028,6 @@ static int test_command_lines_10 (void)
   }
   {
     char device[] = "/dev/sda1";
   }
   {
     char device[] = "/dev/sda1";
-    device[5] = devchar;
     char mountpoint[] = "/";
     int r;
     suppress_error = 0;
     char mountpoint[] = "/";
     int r;
     suppress_error = 0;
@@ -8485,7 +9123,6 @@ static int test_command_0 (void)
   /* InitBasicFS for test_command_0: create ext2 on /dev/sda1 */
   {
     char device[] = "/dev/sda";
   /* 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);
     int r;
     suppress_error = 0;
     r = guestfs_blockdev_setrw (g, device);
@@ -8508,7 +9145,6 @@ static int test_command_0 (void)
   }
   {
     char device[] = "/dev/sda";
   }
   {
     char device[] = "/dev/sda";
-    device[5] = devchar;
     char lines_0[] = ",";
     char *lines[] = {
       lines_0,
     char lines_0[] = ",";
     char *lines[] = {
       lines_0,
@@ -8523,7 +9159,6 @@ static int test_command_0 (void)
   {
     char fstype[] = "ext2";
     char device[] = "/dev/sda1";
   {
     char fstype[] = "ext2";
     char device[] = "/dev/sda1";
-    device[5] = devchar;
     int r;
     suppress_error = 0;
     r = guestfs_mkfs (g, fstype, device);
     int r;
     suppress_error = 0;
     r = guestfs_mkfs (g, fstype, device);
@@ -8532,7 +9167,6 @@ static int test_command_0 (void)
   }
   {
     char device[] = "/dev/sda1";
   }
   {
     char device[] = "/dev/sda1";
-    device[5] = devchar;
     char mountpoint[] = "/";
     int r;
     suppress_error = 0;
     char mountpoint[] = "/";
     int r;
     suppress_error = 0;
@@ -8601,7 +9235,6 @@ static int test_command_1 (void)
   /* InitBasicFS for test_command_1: create ext2 on /dev/sda1 */
   {
     char device[] = "/dev/sda";
   /* 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);
     int r;
     suppress_error = 0;
     r = guestfs_blockdev_setrw (g, device);
@@ -8624,7 +9257,6 @@ static int test_command_1 (void)
   }
   {
     char device[] = "/dev/sda";
   }
   {
     char device[] = "/dev/sda";
-    device[5] = devchar;
     char lines_0[] = ",";
     char *lines[] = {
       lines_0,
     char lines_0[] = ",";
     char *lines[] = {
       lines_0,
@@ -8639,7 +9271,6 @@ static int test_command_1 (void)
   {
     char fstype[] = "ext2";
     char device[] = "/dev/sda1";
   {
     char fstype[] = "ext2";
     char device[] = "/dev/sda1";
-    device[5] = devchar;
     int r;
     suppress_error = 0;
     r = guestfs_mkfs (g, fstype, device);
     int r;
     suppress_error = 0;
     r = guestfs_mkfs (g, fstype, device);
@@ -8648,7 +9279,6 @@ static int test_command_1 (void)
   }
   {
     char device[] = "/dev/sda1";
   }
   {
     char device[] = "/dev/sda1";
-    device[5] = devchar;
     char mountpoint[] = "/";
     int r;
     suppress_error = 0;
     char mountpoint[] = "/";
     int r;
     suppress_error = 0;
@@ -8717,7 +9347,6 @@ static int test_command_2 (void)
   /* InitBasicFS for test_command_2: create ext2 on /dev/sda1 */
   {
     char device[] = "/dev/sda";
   /* 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);
     int r;
     suppress_error = 0;
     r = guestfs_blockdev_setrw (g, device);
@@ -8740,7 +9369,6 @@ static int test_command_2 (void)
   }
   {
     char device[] = "/dev/sda";
   }
   {
     char device[] = "/dev/sda";
-    device[5] = devchar;
     char lines_0[] = ",";
     char *lines[] = {
       lines_0,
     char lines_0[] = ",";
     char *lines[] = {
       lines_0,
@@ -8755,7 +9383,6 @@ static int test_command_2 (void)
   {
     char fstype[] = "ext2";
     char device[] = "/dev/sda1";
   {
     char fstype[] = "ext2";
     char device[] = "/dev/sda1";
-    device[5] = devchar;
     int r;
     suppress_error = 0;
     r = guestfs_mkfs (g, fstype, device);
     int r;
     suppress_error = 0;
     r = guestfs_mkfs (g, fstype, device);
@@ -8764,7 +9391,6 @@ static int test_command_2 (void)
   }
   {
     char device[] = "/dev/sda1";
   }
   {
     char device[] = "/dev/sda1";
-    device[5] = devchar;
     char mountpoint[] = "/";
     int r;
     suppress_error = 0;
     char mountpoint[] = "/";
     int r;
     suppress_error = 0;
@@ -8833,7 +9459,6 @@ static int test_command_3 (void)
   /* InitBasicFS for test_command_3: create ext2 on /dev/sda1 */
   {
     char device[] = "/dev/sda";
   /* 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);
     int r;
     suppress_error = 0;
     r = guestfs_blockdev_setrw (g, device);
@@ -8856,7 +9481,6 @@ static int test_command_3 (void)
   }
   {
     char device[] = "/dev/sda";
   }
   {
     char device[] = "/dev/sda";
-    device[5] = devchar;
     char lines_0[] = ",";
     char *lines[] = {
       lines_0,
     char lines_0[] = ",";
     char *lines[] = {
       lines_0,
@@ -8871,7 +9495,6 @@ static int test_command_3 (void)
   {
     char fstype[] = "ext2";
     char device[] = "/dev/sda1";
   {
     char fstype[] = "ext2";
     char device[] = "/dev/sda1";
-    device[5] = devchar;
     int r;
     suppress_error = 0;
     r = guestfs_mkfs (g, fstype, device);
     int r;
     suppress_error = 0;
     r = guestfs_mkfs (g, fstype, device);
@@ -8880,7 +9503,6 @@ static int test_command_3 (void)
   }
   {
     char device[] = "/dev/sda1";
   }
   {
     char device[] = "/dev/sda1";
-    device[5] = devchar;
     char mountpoint[] = "/";
     int r;
     suppress_error = 0;
     char mountpoint[] = "/";
     int r;
     suppress_error = 0;
@@ -8949,7 +9571,6 @@ static int test_command_4 (void)
   /* InitBasicFS for test_command_4: create ext2 on /dev/sda1 */
   {
     char device[] = "/dev/sda";
   /* 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);
     int r;
     suppress_error = 0;
     r = guestfs_blockdev_setrw (g, device);
@@ -8972,7 +9593,6 @@ static int test_command_4 (void)
   }
   {
     char device[] = "/dev/sda";
   }
   {
     char device[] = "/dev/sda";
-    device[5] = devchar;
     char lines_0[] = ",";
     char *lines[] = {
       lines_0,
     char lines_0[] = ",";
     char *lines[] = {
       lines_0,
@@ -8987,7 +9607,6 @@ static int test_command_4 (void)
   {
     char fstype[] = "ext2";
     char device[] = "/dev/sda1";
   {
     char fstype[] = "ext2";
     char device[] = "/dev/sda1";
-    device[5] = devchar;
     int r;
     suppress_error = 0;
     r = guestfs_mkfs (g, fstype, device);
     int r;
     suppress_error = 0;
     r = guestfs_mkfs (g, fstype, device);
@@ -8996,7 +9615,6 @@ static int test_command_4 (void)
   }
   {
     char device[] = "/dev/sda1";
   }
   {
     char device[] = "/dev/sda1";
-    device[5] = devchar;
     char mountpoint[] = "/";
     int r;
     suppress_error = 0;
     char mountpoint[] = "/";
     int r;
     suppress_error = 0;
@@ -9065,7 +9683,6 @@ static int test_command_5 (void)
   /* InitBasicFS for test_command_5: create ext2 on /dev/sda1 */
   {
     char device[] = "/dev/sda";
   /* 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);
     int r;
     suppress_error = 0;
     r = guestfs_blockdev_setrw (g, device);
@@ -9088,7 +9705,6 @@ static int test_command_5 (void)
   }
   {
     char device[] = "/dev/sda";
   }
   {
     char device[] = "/dev/sda";
-    device[5] = devchar;
     char lines_0[] = ",";
     char *lines[] = {
       lines_0,
     char lines_0[] = ",";
     char *lines[] = {
       lines_0,
@@ -9103,7 +9719,6 @@ static int test_command_5 (void)
   {
     char fstype[] = "ext2";
     char device[] = "/dev/sda1";
   {
     char fstype[] = "ext2";
     char device[] = "/dev/sda1";
-    device[5] = devchar;
     int r;
     suppress_error = 0;
     r = guestfs_mkfs (g, fstype, device);
     int r;
     suppress_error = 0;
     r = guestfs_mkfs (g, fstype, device);
@@ -9112,7 +9727,6 @@ static int test_command_5 (void)
   }
   {
     char device[] = "/dev/sda1";
   }
   {
     char device[] = "/dev/sda1";
-    device[5] = devchar;
     char mountpoint[] = "/";
     int r;
     suppress_error = 0;
     char mountpoint[] = "/";
     int r;
     suppress_error = 0;
@@ -9181,7 +9795,6 @@ static int test_command_6 (void)
   /* InitBasicFS for test_command_6: create ext2 on /dev/sda1 */
   {
     char device[] = "/dev/sda";
   /* 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);
     int r;
     suppress_error = 0;
     r = guestfs_blockdev_setrw (g, device);
@@ -9204,7 +9817,6 @@ static int test_command_6 (void)
   }
   {
     char device[] = "/dev/sda";
   }
   {
     char device[] = "/dev/sda";
-    device[5] = devchar;
     char lines_0[] = ",";
     char *lines[] = {
       lines_0,
     char lines_0[] = ",";
     char *lines[] = {
       lines_0,
@@ -9219,7 +9831,6 @@ static int test_command_6 (void)
   {
     char fstype[] = "ext2";
     char device[] = "/dev/sda1";
   {
     char fstype[] = "ext2";
     char device[] = "/dev/sda1";
-    device[5] = devchar;
     int r;
     suppress_error = 0;
     r = guestfs_mkfs (g, fstype, device);
     int r;
     suppress_error = 0;
     r = guestfs_mkfs (g, fstype, device);
@@ -9228,7 +9839,6 @@ static int test_command_6 (void)
   }
   {
     char device[] = "/dev/sda1";
   }
   {
     char device[] = "/dev/sda1";
-    device[5] = devchar;
     char mountpoint[] = "/";
     int r;
     suppress_error = 0;
     char mountpoint[] = "/";
     int r;
     suppress_error = 0;
@@ -9297,7 +9907,6 @@ static int test_command_7 (void)
   /* InitBasicFS for test_command_7: create ext2 on /dev/sda1 */
   {
     char device[] = "/dev/sda";
   /* 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);
     int r;
     suppress_error = 0;
     r = guestfs_blockdev_setrw (g, device);
@@ -9320,7 +9929,6 @@ static int test_command_7 (void)
   }
   {
     char device[] = "/dev/sda";
   }
   {
     char device[] = "/dev/sda";
-    device[5] = devchar;
     char lines_0[] = ",";
     char *lines[] = {
       lines_0,
     char lines_0[] = ",";
     char *lines[] = {
       lines_0,
@@ -9335,7 +9943,6 @@ static int test_command_7 (void)
   {
     char fstype[] = "ext2";
     char device[] = "/dev/sda1";
   {
     char fstype[] = "ext2";
     char device[] = "/dev/sda1";
-    device[5] = devchar;
     int r;
     suppress_error = 0;
     r = guestfs_mkfs (g, fstype, device);
     int r;
     suppress_error = 0;
     r = guestfs_mkfs (g, fstype, device);
@@ -9344,7 +9951,6 @@ static int test_command_7 (void)
   }
   {
     char device[] = "/dev/sda1";
   }
   {
     char device[] = "/dev/sda1";
-    device[5] = devchar;
     char mountpoint[] = "/";
     int r;
     suppress_error = 0;
     char mountpoint[] = "/";
     int r;
     suppress_error = 0;
@@ -9413,7 +10019,6 @@ static int test_command_8 (void)
   /* InitBasicFS for test_command_8: create ext2 on /dev/sda1 */
   {
     char device[] = "/dev/sda";
   /* 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);
     int r;
     suppress_error = 0;
     r = guestfs_blockdev_setrw (g, device);
@@ -9436,7 +10041,6 @@ static int test_command_8 (void)
   }
   {
     char device[] = "/dev/sda";
   }
   {
     char device[] = "/dev/sda";
-    device[5] = devchar;
     char lines_0[] = ",";
     char *lines[] = {
       lines_0,
     char lines_0[] = ",";
     char *lines[] = {
       lines_0,
@@ -9451,7 +10055,6 @@ static int test_command_8 (void)
   {
     char fstype[] = "ext2";
     char device[] = "/dev/sda1";
   {
     char fstype[] = "ext2";
     char device[] = "/dev/sda1";
-    device[5] = devchar;
     int r;
     suppress_error = 0;
     r = guestfs_mkfs (g, fstype, device);
     int r;
     suppress_error = 0;
     r = guestfs_mkfs (g, fstype, device);
@@ -9460,7 +10063,6 @@ static int test_command_8 (void)
   }
   {
     char device[] = "/dev/sda1";
   }
   {
     char device[] = "/dev/sda1";
-    device[5] = devchar;
     char mountpoint[] = "/";
     int r;
     suppress_error = 0;
     char mountpoint[] = "/";
     int r;
     suppress_error = 0;
@@ -9529,7 +10131,6 @@ static int test_command_9 (void)
   /* InitBasicFS for test_command_9: create ext2 on /dev/sda1 */
   {
     char device[] = "/dev/sda";
   /* 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);
     int r;
     suppress_error = 0;
     r = guestfs_blockdev_setrw (g, device);
@@ -9552,7 +10153,6 @@ static int test_command_9 (void)
   }
   {
     char device[] = "/dev/sda";
   }
   {
     char device[] = "/dev/sda";
-    device[5] = devchar;
     char lines_0[] = ",";
     char *lines[] = {
       lines_0,
     char lines_0[] = ",";
     char *lines[] = {
       lines_0,
@@ -9567,7 +10167,6 @@ static int test_command_9 (void)
   {
     char fstype[] = "ext2";
     char device[] = "/dev/sda1";
   {
     char fstype[] = "ext2";
     char device[] = "/dev/sda1";
-    device[5] = devchar;
     int r;
     suppress_error = 0;
     r = guestfs_mkfs (g, fstype, device);
     int r;
     suppress_error = 0;
     r = guestfs_mkfs (g, fstype, device);
@@ -9576,7 +10175,6 @@ static int test_command_9 (void)
   }
   {
     char device[] = "/dev/sda1";
   }
   {
     char device[] = "/dev/sda1";
-    device[5] = devchar;
     char mountpoint[] = "/";
     int r;
     suppress_error = 0;
     char mountpoint[] = "/";
     int r;
     suppress_error = 0;
@@ -9645,7 +10243,6 @@ static int test_command_10 (void)
   /* InitBasicFS for test_command_10: create ext2 on /dev/sda1 */
   {
     char device[] = "/dev/sda";
   /* 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);
     int r;
     suppress_error = 0;
     r = guestfs_blockdev_setrw (g, device);
@@ -9668,7 +10265,6 @@ static int test_command_10 (void)
   }
   {
     char device[] = "/dev/sda";
   }
   {
     char device[] = "/dev/sda";
-    device[5] = devchar;
     char lines_0[] = ",";
     char *lines[] = {
       lines_0,
     char lines_0[] = ",";
     char *lines[] = {
       lines_0,
@@ -9683,7 +10279,6 @@ static int test_command_10 (void)
   {
     char fstype[] = "ext2";
     char device[] = "/dev/sda1";
   {
     char fstype[] = "ext2";
     char device[] = "/dev/sda1";
-    device[5] = devchar;
     int r;
     suppress_error = 0;
     r = guestfs_mkfs (g, fstype, device);
     int r;
     suppress_error = 0;
     r = guestfs_mkfs (g, fstype, device);
@@ -9692,7 +10287,6 @@ static int test_command_10 (void)
   }
   {
     char device[] = "/dev/sda1";
   }
   {
     char device[] = "/dev/sda1";
-    device[5] = devchar;
     char mountpoint[] = "/";
     int r;
     suppress_error = 0;
     char mountpoint[] = "/";
     int r;
     suppress_error = 0;
@@ -9761,7 +10355,6 @@ static int test_command_11 (void)
   /* InitBasicFS for test_command_11: create ext2 on /dev/sda1 */
   {
     char device[] = "/dev/sda";
   /* 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);
     int r;
     suppress_error = 0;
     r = guestfs_blockdev_setrw (g, device);
@@ -9784,7 +10377,6 @@ static int test_command_11 (void)
   }
   {
     char device[] = "/dev/sda";
   }
   {
     char device[] = "/dev/sda";
-    device[5] = devchar;
     char lines_0[] = ",";
     char *lines[] = {
       lines_0,
     char lines_0[] = ",";
     char *lines[] = {
       lines_0,
@@ -9799,7 +10391,6 @@ static int test_command_11 (void)
   {
     char fstype[] = "ext2";
     char device[] = "/dev/sda1";
   {
     char fstype[] = "ext2";
     char device[] = "/dev/sda1";
-    device[5] = devchar;
     int r;
     suppress_error = 0;
     r = guestfs_mkfs (g, fstype, device);
     int r;
     suppress_error = 0;
     r = guestfs_mkfs (g, fstype, device);
@@ -9808,7 +10399,6 @@ static int test_command_11 (void)
   }
   {
     char device[] = "/dev/sda1";
   }
   {
     char device[] = "/dev/sda1";
-    device[5] = devchar;
     char mountpoint[] = "/";
     int r;
     suppress_error = 0;
     char mountpoint[] = "/";
     int r;
     suppress_error = 0;
@@ -9870,7 +10460,6 @@ static int test_file_0 (void)
   /* InitBasicFS for test_file_0: create ext2 on /dev/sda1 */
   {
     char device[] = "/dev/sda";
   /* 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);
     int r;
     suppress_error = 0;
     r = guestfs_blockdev_setrw (g, device);
@@ -9893,7 +10482,6 @@ static int test_file_0 (void)
   }
   {
     char device[] = "/dev/sda";
   }
   {
     char device[] = "/dev/sda";
-    device[5] = devchar;
     char lines_0[] = ",";
     char *lines[] = {
       lines_0,
     char lines_0[] = ",";
     char *lines[] = {
       lines_0,
@@ -9908,7 +10496,6 @@ static int test_file_0 (void)
   {
     char fstype[] = "ext2";
     char device[] = "/dev/sda1";
   {
     char fstype[] = "ext2";
     char device[] = "/dev/sda1";
-    device[5] = devchar;
     int r;
     suppress_error = 0;
     r = guestfs_mkfs (g, fstype, device);
     int r;
     suppress_error = 0;
     r = guestfs_mkfs (g, fstype, device);
@@ -9917,7 +10504,6 @@ static int test_file_0 (void)
   }
   {
     char device[] = "/dev/sda1";
   }
   {
     char device[] = "/dev/sda1";
-    device[5] = devchar;
     char mountpoint[] = "/";
     int r;
     suppress_error = 0;
     char mountpoint[] = "/";
     int r;
     suppress_error = 0;
@@ -9972,7 +10558,6 @@ static int test_file_1 (void)
   /* InitBasicFS for test_file_1: create ext2 on /dev/sda1 */
   {
     char device[] = "/dev/sda";
   /* 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);
     int r;
     suppress_error = 0;
     r = guestfs_blockdev_setrw (g, device);
@@ -9995,7 +10580,6 @@ static int test_file_1 (void)
   }
   {
     char device[] = "/dev/sda";
   }
   {
     char device[] = "/dev/sda";
-    device[5] = devchar;
     char lines_0[] = ",";
     char *lines[] = {
       lines_0,
     char lines_0[] = ",";
     char *lines[] = {
       lines_0,
@@ -10010,7 +10594,6 @@ static int test_file_1 (void)
   {
     char fstype[] = "ext2";
     char device[] = "/dev/sda1";
   {
     char fstype[] = "ext2";
     char device[] = "/dev/sda1";
-    device[5] = devchar;
     int r;
     suppress_error = 0;
     r = guestfs_mkfs (g, fstype, device);
     int r;
     suppress_error = 0;
     r = guestfs_mkfs (g, fstype, device);
@@ -10019,7 +10602,6 @@ static int test_file_1 (void)
   }
   {
     char device[] = "/dev/sda1";
   }
   {
     char device[] = "/dev/sda1";
-    device[5] = devchar;
     char mountpoint[] = "/";
     int r;
     suppress_error = 0;
     char mountpoint[] = "/";
     int r;
     suppress_error = 0;
@@ -10075,7 +10657,6 @@ static int test_file_2 (void)
   /* InitBasicFS for test_file_2: create ext2 on /dev/sda1 */
   {
     char device[] = "/dev/sda";
   /* 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);
     int r;
     suppress_error = 0;
     r = guestfs_blockdev_setrw (g, device);
@@ -10098,7 +10679,6 @@ static int test_file_2 (void)
   }
   {
     char device[] = "/dev/sda";
   }
   {
     char device[] = "/dev/sda";
-    device[5] = devchar;
     char lines_0[] = ",";
     char *lines[] = {
       lines_0,
     char lines_0[] = ",";
     char *lines[] = {
       lines_0,
@@ -10113,7 +10693,6 @@ static int test_file_2 (void)
   {
     char fstype[] = "ext2";
     char device[] = "/dev/sda1";
   {
     char fstype[] = "ext2";
     char device[] = "/dev/sda1";
-    device[5] = devchar;
     int r;
     suppress_error = 0;
     r = guestfs_mkfs (g, fstype, device);
     int r;
     suppress_error = 0;
     r = guestfs_mkfs (g, fstype, device);
@@ -10122,7 +10701,6 @@ static int test_file_2 (void)
   }
   {
     char device[] = "/dev/sda1";
   }
   {
     char device[] = "/dev/sda1";
-    device[5] = devchar;
     char mountpoint[] = "/";
     int r;
     suppress_error = 0;
     char mountpoint[] = "/";
     int r;
     suppress_error = 0;
@@ -10164,7 +10742,6 @@ static int test_umount_all_0 (void)
   /* InitBasicFS for test_umount_all_0: create ext2 on /dev/sda1 */
   {
     char device[] = "/dev/sda";
   /* 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);
     int r;
     suppress_error = 0;
     r = guestfs_blockdev_setrw (g, device);
@@ -10187,7 +10764,6 @@ static int test_umount_all_0 (void)
   }
   {
     char device[] = "/dev/sda";
   }
   {
     char device[] = "/dev/sda";
-    device[5] = devchar;
     char lines_0[] = ",";
     char *lines[] = {
       lines_0,
     char lines_0[] = ",";
     char *lines[] = {
       lines_0,
@@ -10202,7 +10778,6 @@ static int test_umount_all_0 (void)
   {
     char fstype[] = "ext2";
     char device[] = "/dev/sda1";
   {
     char fstype[] = "ext2";
     char device[] = "/dev/sda1";
-    device[5] = devchar;
     int r;
     suppress_error = 0;
     r = guestfs_mkfs (g, fstype, device);
     int r;
     suppress_error = 0;
     r = guestfs_mkfs (g, fstype, device);
@@ -10211,7 +10786,6 @@ static int test_umount_all_0 (void)
   }
   {
     char device[] = "/dev/sda1";
   }
   {
     char device[] = "/dev/sda1";
-    device[5] = devchar;
     char mountpoint[] = "/";
     int r;
     suppress_error = 0;
     char mountpoint[] = "/";
     int r;
     suppress_error = 0;
@@ -10267,7 +10841,6 @@ static int test_umount_all_1 (void)
   /* InitNone|InitEmpty for test_umount_all_1 */
   {
     char device[] = "/dev/sda";
   /* 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);
     int r;
     suppress_error = 0;
     r = guestfs_blockdev_setrw (g, device);
@@ -10291,7 +10864,6 @@ static int test_umount_all_1 (void)
   /* TestOutputList for umount_all (1) */
   {
     char device[] = "/dev/sda";
   /* TestOutputList for umount_all (1) */
   {
     char device[] = "/dev/sda";
-    device[5] = devchar;
     char lines_0[] = ",10";
     char lines_1[] = ",20";
     char lines_2[] = ",";
     char lines_0[] = ",10";
     char lines_1[] = ",20";
     char lines_2[] = ",";
@@ -10310,7 +10882,6 @@ static int test_umount_all_1 (void)
   {
     char fstype[] = "ext2";
     char device[] = "/dev/sda1";
   {
     char fstype[] = "ext2";
     char device[] = "/dev/sda1";
-    device[5] = devchar;
     int r;
     suppress_error = 0;
     r = guestfs_mkfs (g, fstype, device);
     int r;
     suppress_error = 0;
     r = guestfs_mkfs (g, fstype, device);
@@ -10320,7 +10891,6 @@ static int test_umount_all_1 (void)
   {
     char fstype[] = "ext2";
     char device[] = "/dev/sda2";
   {
     char fstype[] = "ext2";
     char device[] = "/dev/sda2";
-    device[5] = devchar;
     int r;
     suppress_error = 0;
     r = guestfs_mkfs (g, fstype, device);
     int r;
     suppress_error = 0;
     r = guestfs_mkfs (g, fstype, device);
@@ -10330,7 +10900,6 @@ static int test_umount_all_1 (void)
   {
     char fstype[] = "ext2";
     char device[] = "/dev/sda3";
   {
     char fstype[] = "ext2";
     char device[] = "/dev/sda3";
-    device[5] = devchar;
     int r;
     suppress_error = 0;
     r = guestfs_mkfs (g, fstype, device);
     int r;
     suppress_error = 0;
     r = guestfs_mkfs (g, fstype, device);
@@ -10339,7 +10908,6 @@ static int test_umount_all_1 (void)
   }
   {
     char device[] = "/dev/sda1";
   }
   {
     char device[] = "/dev/sda1";
-    device[5] = devchar;
     char mountpoint[] = "/";
     int r;
     suppress_error = 0;
     char mountpoint[] = "/";
     int r;
     suppress_error = 0;
@@ -10357,7 +10925,6 @@ static int test_umount_all_1 (void)
   }
   {
     char device[] = "/dev/sda2";
   }
   {
     char device[] = "/dev/sda2";
-    device[5] = devchar;
     char mountpoint[] = "/mp1";
     int r;
     suppress_error = 0;
     char mountpoint[] = "/mp1";
     int r;
     suppress_error = 0;
@@ -10375,7 +10942,6 @@ static int test_umount_all_1 (void)
   }
   {
     char device[] = "/dev/sda3";
   }
   {
     char device[] = "/dev/sda3";
-    device[5] = devchar;
     char mountpoint[] = "/mp1/mp2";
     int r;
     suppress_error = 0;
     char mountpoint[] = "/mp1/mp2";
     int r;
     suppress_error = 0;
@@ -10438,7 +11004,6 @@ static int test_mounts_0 (void)
   /* InitBasicFS for test_mounts_0: create ext2 on /dev/sda1 */
   {
     char device[] = "/dev/sda";
   /* 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);
     int r;
     suppress_error = 0;
     r = guestfs_blockdev_setrw (g, device);
@@ -10461,7 +11026,6 @@ static int test_mounts_0 (void)
   }
   {
     char device[] = "/dev/sda";
   }
   {
     char device[] = "/dev/sda";
-    device[5] = devchar;
     char lines_0[] = ",";
     char *lines[] = {
       lines_0,
     char lines_0[] = ",";
     char *lines[] = {
       lines_0,
@@ -10476,7 +11040,6 @@ static int test_mounts_0 (void)
   {
     char fstype[] = "ext2";
     char device[] = "/dev/sda1";
   {
     char fstype[] = "ext2";
     char device[] = "/dev/sda1";
-    device[5] = devchar;
     int r;
     suppress_error = 0;
     r = guestfs_mkfs (g, fstype, device);
     int r;
     suppress_error = 0;
     r = guestfs_mkfs (g, fstype, device);
@@ -10485,7 +11048,6 @@ static int test_mounts_0 (void)
   }
   {
     char device[] = "/dev/sda1";
   }
   {
     char device[] = "/dev/sda1";
-    device[5] = devchar;
     char mountpoint[] = "/";
     int r;
     suppress_error = 0;
     char mountpoint[] = "/";
     int r;
     suppress_error = 0;
@@ -10493,7 +11055,7 @@ static int test_mounts_0 (void)
     if (r == -1)
       return -1;
   }
     if (r == -1)
       return -1;
   }
-  /* TestOutputList for mounts (0) */
+  /* TestOutputListOfDevices for mounts (0) */
   {
     char **r;
     int i;
   {
     char **r;
     int i;
@@ -10508,7 +11070,7 @@ static int test_mounts_0 (void)
     }
     {
       char expected[] = "/dev/sda1";
     }
     {
       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;
       if (strcmp (r[0], expected) != 0) {
         fprintf (stderr, "test_mounts_0: expected \"%s\" but got \"%s\"\n", expected, r[0]);
         return -1;
@@ -10547,7 +11109,6 @@ static int test_umount_0 (void)
   /* InitNone|InitEmpty for test_umount_0 */
   {
     char device[] = "/dev/sda";
   /* InitNone|InitEmpty for test_umount_0 */
   {
     char device[] = "/dev/sda";
-    device[5] = devchar;
     int r;
     suppress_error = 0;
     r = guestfs_blockdev_setrw (g, device);
     int r;
     suppress_error = 0;
     r = guestfs_blockdev_setrw (g, device);
@@ -10568,10 +11129,9 @@ static int test_umount_0 (void)
     if (r == -1)
       return -1;
   }
     if (r == -1)
       return -1;
   }
-  /* TestOutputList for umount (0) */
+  /* TestOutputListOfDevices for umount (0) */
   {
     char device[] = "/dev/sda";
   {
     char device[] = "/dev/sda";
-    device[5] = devchar;
     char lines_0[] = ",";
     char *lines[] = {
       lines_0,
     char lines_0[] = ",";
     char *lines[] = {
       lines_0,
@@ -10586,7 +11146,6 @@ static int test_umount_0 (void)
   {
     char fstype[] = "ext2";
     char device[] = "/dev/sda1";
   {
     char fstype[] = "ext2";
     char device[] = "/dev/sda1";
-    device[5] = devchar;
     int r;
     suppress_error = 0;
     r = guestfs_mkfs (g, fstype, device);
     int r;
     suppress_error = 0;
     r = guestfs_mkfs (g, fstype, device);
@@ -10595,7 +11154,6 @@ static int test_umount_0 (void)
   }
   {
     char device[] = "/dev/sda1";
   }
   {
     char device[] = "/dev/sda1";
-    device[5] = devchar;
     char mountpoint[] = "/";
     int r;
     suppress_error = 0;
     char mountpoint[] = "/";
     int r;
     suppress_error = 0;
@@ -10617,7 +11175,7 @@ static int test_umount_0 (void)
     }
     {
       char expected[] = "/dev/sda1";
     }
     {
       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;
       if (strcmp (r[0], expected) != 0) {
         fprintf (stderr, "test_umount_0: expected \"%s\" but got \"%s\"\n", expected, r[0]);
         return -1;
@@ -10656,7 +11214,6 @@ static int test_umount_1 (void)
   /* InitNone|InitEmpty for test_umount_1 */
   {
     char device[] = "/dev/sda";
   /* InitNone|InitEmpty for test_umount_1 */
   {
     char device[] = "/dev/sda";
-    device[5] = devchar;
     int r;
     suppress_error = 0;
     r = guestfs_blockdev_setrw (g, device);
     int r;
     suppress_error = 0;
     r = guestfs_blockdev_setrw (g, device);
@@ -10680,7 +11237,6 @@ static int test_umount_1 (void)
   /* TestOutputList for umount (1) */
   {
     char device[] = "/dev/sda";
   /* TestOutputList for umount (1) */
   {
     char device[] = "/dev/sda";
-    device[5] = devchar;
     char lines_0[] = ",";
     char *lines[] = {
       lines_0,
     char lines_0[] = ",";
     char *lines[] = {
       lines_0,
@@ -10695,7 +11251,6 @@ static int test_umount_1 (void)
   {
     char fstype[] = "ext2";
     char device[] = "/dev/sda1";
   {
     char fstype[] = "ext2";
     char device[] = "/dev/sda1";
-    device[5] = devchar;
     int r;
     suppress_error = 0;
     r = guestfs_mkfs (g, fstype, device);
     int r;
     suppress_error = 0;
     r = guestfs_mkfs (g, fstype, device);
@@ -10704,7 +11259,6 @@ static int test_umount_1 (void)
   }
   {
     char device[] = "/dev/sda1";
   }
   {
     char device[] = "/dev/sda1";
-    device[5] = devchar;
     char mountpoint[] = "/";
     int r;
     suppress_error = 0;
     char mountpoint[] = "/";
     int r;
     suppress_error = 0;
@@ -10760,7 +11314,6 @@ static int test_write_file_0 (void)
   /* InitBasicFS for test_write_file_0: create ext2 on /dev/sda1 */
   {
     char device[] = "/dev/sda";
   /* 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);
     int r;
     suppress_error = 0;
     r = guestfs_blockdev_setrw (g, device);
@@ -10783,7 +11336,6 @@ static int test_write_file_0 (void)
   }
   {
     char device[] = "/dev/sda";
   }
   {
     char device[] = "/dev/sda";
-    device[5] = devchar;
     char lines_0[] = ",";
     char *lines[] = {
       lines_0,
     char lines_0[] = ",";
     char *lines[] = {
       lines_0,
@@ -10798,7 +11350,6 @@ static int test_write_file_0 (void)
   {
     char fstype[] = "ext2";
     char device[] = "/dev/sda1";
   {
     char fstype[] = "ext2";
     char device[] = "/dev/sda1";
-    device[5] = devchar;
     int r;
     suppress_error = 0;
     r = guestfs_mkfs (g, fstype, device);
     int r;
     suppress_error = 0;
     r = guestfs_mkfs (g, fstype, device);
@@ -10807,7 +11358,6 @@ static int test_write_file_0 (void)
   }
   {
     char device[] = "/dev/sda1";
   }
   {
     char device[] = "/dev/sda1";
-    device[5] = devchar;
     char mountpoint[] = "/";
     int r;
     suppress_error = 0;
     char mountpoint[] = "/";
     int r;
     suppress_error = 0;
@@ -10863,7 +11413,6 @@ static int test_write_file_1 (void)
   /* InitBasicFS for test_write_file_1: create ext2 on /dev/sda1 */
   {
     char device[] = "/dev/sda";
   /* 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);
     int r;
     suppress_error = 0;
     r = guestfs_blockdev_setrw (g, device);
@@ -10886,7 +11435,6 @@ static int test_write_file_1 (void)
   }
   {
     char device[] = "/dev/sda";
   }
   {
     char device[] = "/dev/sda";
-    device[5] = devchar;
     char lines_0[] = ",";
     char *lines[] = {
       lines_0,
     char lines_0[] = ",";
     char *lines[] = {
       lines_0,
@@ -10901,7 +11449,6 @@ static int test_write_file_1 (void)
   {
     char fstype[] = "ext2";
     char device[] = "/dev/sda1";
   {
     char fstype[] = "ext2";
     char device[] = "/dev/sda1";
-    device[5] = devchar;
     int r;
     suppress_error = 0;
     r = guestfs_mkfs (g, fstype, device);
     int r;
     suppress_error = 0;
     r = guestfs_mkfs (g, fstype, device);
@@ -10910,7 +11457,6 @@ static int test_write_file_1 (void)
   }
   {
     char device[] = "/dev/sda1";
   }
   {
     char device[] = "/dev/sda1";
-    device[5] = devchar;
     char mountpoint[] = "/";
     int r;
     suppress_error = 0;
     char mountpoint[] = "/";
     int r;
     suppress_error = 0;
@@ -10966,7 +11512,6 @@ static int test_write_file_2 (void)
   /* InitBasicFS for test_write_file_2: create ext2 on /dev/sda1 */
   {
     char device[] = "/dev/sda";
   /* 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);
     int r;
     suppress_error = 0;
     r = guestfs_blockdev_setrw (g, device);
@@ -10989,7 +11534,6 @@ static int test_write_file_2 (void)
   }
   {
     char device[] = "/dev/sda";
   }
   {
     char device[] = "/dev/sda";
-    device[5] = devchar;
     char lines_0[] = ",";
     char *lines[] = {
       lines_0,
     char lines_0[] = ",";
     char *lines[] = {
       lines_0,
@@ -11004,7 +11548,6 @@ static int test_write_file_2 (void)
   {
     char fstype[] = "ext2";
     char device[] = "/dev/sda1";
   {
     char fstype[] = "ext2";
     char device[] = "/dev/sda1";
-    device[5] = devchar;
     int r;
     suppress_error = 0;
     r = guestfs_mkfs (g, fstype, device);
     int r;
     suppress_error = 0;
     r = guestfs_mkfs (g, fstype, device);
@@ -11013,7 +11556,6 @@ static int test_write_file_2 (void)
   }
   {
     char device[] = "/dev/sda1";
   }
   {
     char device[] = "/dev/sda1";
-    device[5] = devchar;
     char mountpoint[] = "/";
     int r;
     suppress_error = 0;
     char mountpoint[] = "/";
     int r;
     suppress_error = 0;
@@ -11069,7 +11611,6 @@ static int test_write_file_3 (void)
   /* InitBasicFS for test_write_file_3: create ext2 on /dev/sda1 */
   {
     char device[] = "/dev/sda";
   /* 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);
     int r;
     suppress_error = 0;
     r = guestfs_blockdev_setrw (g, device);
@@ -11092,7 +11633,6 @@ static int test_write_file_3 (void)
   }
   {
     char device[] = "/dev/sda";
   }
   {
     char device[] = "/dev/sda";
-    device[5] = devchar;
     char lines_0[] = ",";
     char *lines[] = {
       lines_0,
     char lines_0[] = ",";
     char *lines[] = {
       lines_0,
@@ -11107,7 +11647,6 @@ static int test_write_file_3 (void)
   {
     char fstype[] = "ext2";
     char device[] = "/dev/sda1";
   {
     char fstype[] = "ext2";
     char device[] = "/dev/sda1";
-    device[5] = devchar;
     int r;
     suppress_error = 0;
     r = guestfs_mkfs (g, fstype, device);
     int r;
     suppress_error = 0;
     r = guestfs_mkfs (g, fstype, device);
@@ -11116,7 +11655,6 @@ static int test_write_file_3 (void)
   }
   {
     char device[] = "/dev/sda1";
   }
   {
     char device[] = "/dev/sda1";
-    device[5] = devchar;
     char mountpoint[] = "/";
     int r;
     suppress_error = 0;
     char mountpoint[] = "/";
     int r;
     suppress_error = 0;
@@ -11172,7 +11710,6 @@ static int test_write_file_4 (void)
   /* InitBasicFS for test_write_file_4: create ext2 on /dev/sda1 */
   {
     char device[] = "/dev/sda";
   /* 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);
     int r;
     suppress_error = 0;
     r = guestfs_blockdev_setrw (g, device);
@@ -11195,7 +11732,6 @@ static int test_write_file_4 (void)
   }
   {
     char device[] = "/dev/sda";
   }
   {
     char device[] = "/dev/sda";
-    device[5] = devchar;
     char lines_0[] = ",";
     char *lines[] = {
       lines_0,
     char lines_0[] = ",";
     char *lines[] = {
       lines_0,
@@ -11210,7 +11746,6 @@ static int test_write_file_4 (void)
   {
     char fstype[] = "ext2";
     char device[] = "/dev/sda1";
   {
     char fstype[] = "ext2";
     char device[] = "/dev/sda1";
-    device[5] = devchar;
     int r;
     suppress_error = 0;
     r = guestfs_mkfs (g, fstype, device);
     int r;
     suppress_error = 0;
     r = guestfs_mkfs (g, fstype, device);
@@ -11219,7 +11754,6 @@ static int test_write_file_4 (void)
   }
   {
     char device[] = "/dev/sda1";
   }
   {
     char device[] = "/dev/sda1";
-    device[5] = devchar;
     char mountpoint[] = "/";
     int r;
     suppress_error = 0;
     char mountpoint[] = "/";
     int r;
     suppress_error = 0;
@@ -11275,7 +11809,6 @@ static int test_write_file_5 (void)
   /* InitBasicFS for test_write_file_5: create ext2 on /dev/sda1 */
   {
     char device[] = "/dev/sda";
   /* 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);
     int r;
     suppress_error = 0;
     r = guestfs_blockdev_setrw (g, device);
@@ -11298,7 +11831,6 @@ static int test_write_file_5 (void)
   }
   {
     char device[] = "/dev/sda";
   }
   {
     char device[] = "/dev/sda";
-    device[5] = devchar;
     char lines_0[] = ",";
     char *lines[] = {
       lines_0,
     char lines_0[] = ",";
     char *lines[] = {
       lines_0,
@@ -11313,7 +11845,6 @@ static int test_write_file_5 (void)
   {
     char fstype[] = "ext2";
     char device[] = "/dev/sda1";
   {
     char fstype[] = "ext2";
     char device[] = "/dev/sda1";
-    device[5] = devchar;
     int r;
     suppress_error = 0;
     r = guestfs_mkfs (g, fstype, device);
     int r;
     suppress_error = 0;
     r = guestfs_mkfs (g, fstype, device);
@@ -11322,7 +11853,6 @@ static int test_write_file_5 (void)
   }
   {
     char device[] = "/dev/sda1";
   }
   {
     char device[] = "/dev/sda1";
-    device[5] = devchar;
     char mountpoint[] = "/";
     int r;
     suppress_error = 0;
     char mountpoint[] = "/";
     int r;
     suppress_error = 0;
@@ -11378,7 +11908,6 @@ static int test_mkfs_0 (void)
   /* InitNone|InitEmpty for test_mkfs_0 */
   {
     char device[] = "/dev/sda";
   /* InitNone|InitEmpty for test_mkfs_0 */
   {
     char device[] = "/dev/sda";
-    device[5] = devchar;
     int r;
     suppress_error = 0;
     r = guestfs_blockdev_setrw (g, device);
     int r;
     suppress_error = 0;
     r = guestfs_blockdev_setrw (g, device);
@@ -11403,7 +11932,6 @@ static int test_mkfs_0 (void)
   char expected[] = "new file contents";
   {
     char device[] = "/dev/sda";
   char expected[] = "new file contents";
   {
     char device[] = "/dev/sda";
-    device[5] = devchar;
     char lines_0[] = ",";
     char *lines[] = {
       lines_0,
     char lines_0[] = ",";
     char *lines[] = {
       lines_0,
@@ -11418,7 +11946,6 @@ static int test_mkfs_0 (void)
   {
     char fstype[] = "ext2";
     char device[] = "/dev/sda1";
   {
     char fstype[] = "ext2";
     char device[] = "/dev/sda1";
-    device[5] = devchar;
     int r;
     suppress_error = 0;
     r = guestfs_mkfs (g, fstype, device);
     int r;
     suppress_error = 0;
     r = guestfs_mkfs (g, fstype, device);
@@ -11427,7 +11954,6 @@ static int test_mkfs_0 (void)
   }
   {
     char device[] = "/dev/sda1";
   }
   {
     char device[] = "/dev/sda1";
-    device[5] = devchar;
     char mountpoint[] = "/";
     int r;
     suppress_error = 0;
     char mountpoint[] = "/";
     int r;
     suppress_error = 0;
@@ -11481,7 +12007,6 @@ static int test_lvcreate_0 (void)
   /* InitNone|InitEmpty for test_lvcreate_0 */
   {
     char device[] = "/dev/sda";
   /* InitNone|InitEmpty for test_lvcreate_0 */
   {
     char device[] = "/dev/sda";
-    device[5] = devchar;
     int r;
     suppress_error = 0;
     r = guestfs_blockdev_setrw (g, device);
     int r;
     suppress_error = 0;
     r = guestfs_blockdev_setrw (g, device);
@@ -11505,7 +12030,6 @@ static int test_lvcreate_0 (void)
   /* TestOutputList for lvcreate (0) */
   {
     char device[] = "/dev/sda";
   /* TestOutputList for lvcreate (0) */
   {
     char device[] = "/dev/sda";
-    device[5] = devchar;
     char lines_0[] = ",10";
     char lines_1[] = ",20";
     char lines_2[] = ",";
     char lines_0[] = ",10";
     char lines_1[] = ",20";
     char lines_2[] = ",";
@@ -11523,7 +12047,6 @@ static int test_lvcreate_0 (void)
   }
   {
     char device[] = "/dev/sda1";
   }
   {
     char device[] = "/dev/sda1";
-    device[5] = devchar;
     int r;
     suppress_error = 0;
     r = guestfs_pvcreate (g, device);
     int r;
     suppress_error = 0;
     r = guestfs_pvcreate (g, device);
@@ -11532,7 +12055,6 @@ static int test_lvcreate_0 (void)
   }
   {
     char device[] = "/dev/sda2";
   }
   {
     char device[] = "/dev/sda2";
-    device[5] = devchar;
     int r;
     suppress_error = 0;
     r = guestfs_pvcreate (g, device);
     int r;
     suppress_error = 0;
     r = guestfs_pvcreate (g, device);
@@ -11541,7 +12063,6 @@ static int test_lvcreate_0 (void)
   }
   {
     char device[] = "/dev/sda3";
   }
   {
     char device[] = "/dev/sda3";
-    device[5] = devchar;
     int r;
     suppress_error = 0;
     r = guestfs_pvcreate (g, device);
     int r;
     suppress_error = 0;
     r = guestfs_pvcreate (g, device);
@@ -11551,9 +12072,7 @@ static int test_lvcreate_0 (void)
   {
     char volgroup[] = "VG1";
     char physvols_0[] = "/dev/sda1";
   {
     char volgroup[] = "VG1";
     char physvols_0[] = "/dev/sda1";
-    physvols_0[5] = devchar;
     char physvols_1[] = "/dev/sda2";
     char physvols_1[] = "/dev/sda2";
-    physvols_1[5] = devchar;
     char *physvols[] = {
       physvols_0,
       physvols_1,
     char *physvols[] = {
       physvols_0,
       physvols_1,
@@ -11568,7 +12087,6 @@ static int test_lvcreate_0 (void)
   {
     char volgroup[] = "VG2";
     char physvols_0[] = "/dev/sda3";
   {
     char volgroup[] = "VG2";
     char physvols_0[] = "/dev/sda3";
-    physvols_0[5] = devchar;
     char *physvols[] = {
       physvols_0,
       NULL
     char *physvols[] = {
       physvols_0,
       NULL
@@ -11724,7 +12242,6 @@ static int test_vgcreate_0 (void)
   /* InitNone|InitEmpty for test_vgcreate_0 */
   {
     char device[] = "/dev/sda";
   /* InitNone|InitEmpty for test_vgcreate_0 */
   {
     char device[] = "/dev/sda";
-    device[5] = devchar;
     int r;
     suppress_error = 0;
     r = guestfs_blockdev_setrw (g, device);
     int r;
     suppress_error = 0;
     r = guestfs_blockdev_setrw (g, device);
@@ -11748,7 +12265,6 @@ static int test_vgcreate_0 (void)
   /* TestOutputList for vgcreate (0) */
   {
     char device[] = "/dev/sda";
   /* TestOutputList for vgcreate (0) */
   {
     char device[] = "/dev/sda";
-    device[5] = devchar;
     char lines_0[] = ",10";
     char lines_1[] = ",20";
     char lines_2[] = ",";
     char lines_0[] = ",10";
     char lines_1[] = ",20";
     char lines_2[] = ",";
@@ -11766,7 +12282,6 @@ static int test_vgcreate_0 (void)
   }
   {
     char device[] = "/dev/sda1";
   }
   {
     char device[] = "/dev/sda1";
-    device[5] = devchar;
     int r;
     suppress_error = 0;
     r = guestfs_pvcreate (g, device);
     int r;
     suppress_error = 0;
     r = guestfs_pvcreate (g, device);
@@ -11775,7 +12290,6 @@ static int test_vgcreate_0 (void)
   }
   {
     char device[] = "/dev/sda2";
   }
   {
     char device[] = "/dev/sda2";
-    device[5] = devchar;
     int r;
     suppress_error = 0;
     r = guestfs_pvcreate (g, device);
     int r;
     suppress_error = 0;
     r = guestfs_pvcreate (g, device);
@@ -11784,7 +12298,6 @@ static int test_vgcreate_0 (void)
   }
   {
     char device[] = "/dev/sda3";
   }
   {
     char device[] = "/dev/sda3";
-    device[5] = devchar;
     int r;
     suppress_error = 0;
     r = guestfs_pvcreate (g, device);
     int r;
     suppress_error = 0;
     r = guestfs_pvcreate (g, device);
@@ -11794,9 +12307,7 @@ static int test_vgcreate_0 (void)
   {
     char volgroup[] = "VG1";
     char physvols_0[] = "/dev/sda1";
   {
     char volgroup[] = "VG1";
     char physvols_0[] = "/dev/sda1";
-    physvols_0[5] = devchar;
     char physvols_1[] = "/dev/sda2";
     char physvols_1[] = "/dev/sda2";
-    physvols_1[5] = devchar;
     char *physvols[] = {
       physvols_0,
       physvols_1,
     char *physvols[] = {
       physvols_0,
       physvols_1,
@@ -11811,7 +12322,6 @@ static int test_vgcreate_0 (void)
   {
     char volgroup[] = "VG2";
     char physvols_0[] = "/dev/sda3";
   {
     char volgroup[] = "VG2";
     char physvols_0[] = "/dev/sda3";
-    physvols_0[5] = devchar;
     char *physvols[] = {
       physvols_0,
       NULL
     char *physvols[] = {
       physvols_0,
       NULL
@@ -11886,7 +12396,6 @@ static int test_pvcreate_0 (void)
   /* InitNone|InitEmpty for test_pvcreate_0 */
   {
     char device[] = "/dev/sda";
   /* InitNone|InitEmpty for test_pvcreate_0 */
   {
     char device[] = "/dev/sda";
-    device[5] = devchar;
     int r;
     suppress_error = 0;
     r = guestfs_blockdev_setrw (g, device);
     int r;
     suppress_error = 0;
     r = guestfs_blockdev_setrw (g, device);
@@ -11907,10 +12416,9 @@ static int test_pvcreate_0 (void)
     if (r == -1)
       return -1;
   }
     if (r == -1)
       return -1;
   }
-  /* TestOutputList for pvcreate (0) */
+  /* TestOutputListOfDevices for pvcreate (0) */
   {
     char device[] = "/dev/sda";
   {
     char device[] = "/dev/sda";
-    device[5] = devchar;
     char lines_0[] = ",10";
     char lines_1[] = ",20";
     char lines_2[] = ",";
     char lines_0[] = ",10";
     char lines_1[] = ",20";
     char lines_2[] = ",";
@@ -11928,7 +12436,6 @@ static int test_pvcreate_0 (void)
   }
   {
     char device[] = "/dev/sda1";
   }
   {
     char device[] = "/dev/sda1";
-    device[5] = devchar;
     int r;
     suppress_error = 0;
     r = guestfs_pvcreate (g, device);
     int r;
     suppress_error = 0;
     r = guestfs_pvcreate (g, device);
@@ -11937,7 +12444,6 @@ static int test_pvcreate_0 (void)
   }
   {
     char device[] = "/dev/sda2";
   }
   {
     char device[] = "/dev/sda2";
-    device[5] = devchar;
     int r;
     suppress_error = 0;
     r = guestfs_pvcreate (g, device);
     int r;
     suppress_error = 0;
     r = guestfs_pvcreate (g, device);
@@ -11946,7 +12452,6 @@ static int test_pvcreate_0 (void)
   }
   {
     char device[] = "/dev/sda3";
   }
   {
     char device[] = "/dev/sda3";
-    device[5] = devchar;
     int r;
     suppress_error = 0;
     r = guestfs_pvcreate (g, device);
     int r;
     suppress_error = 0;
     r = guestfs_pvcreate (g, device);
@@ -11967,7 +12472,7 @@ static int test_pvcreate_0 (void)
     }
     {
       char expected[] = "/dev/sda1";
     }
     {
       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;
       if (strcmp (r[0], expected) != 0) {
         fprintf (stderr, "test_pvcreate_0: expected \"%s\" but got \"%s\"\n", expected, r[0]);
         return -1;
@@ -11980,7 +12485,7 @@ static int test_pvcreate_0 (void)
     }
     {
       char expected[] = "/dev/sda2";
     }
     {
       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;
       if (strcmp (r[1], expected) != 0) {
         fprintf (stderr, "test_pvcreate_0: expected \"%s\" but got \"%s\"\n", expected, r[1]);
         return -1;
@@ -11993,7 +12498,7 @@ static int test_pvcreate_0 (void)
     }
     {
       char expected[] = "/dev/sda3";
     }
     {
       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;
       if (strcmp (r[2], expected) != 0) {
         fprintf (stderr, "test_pvcreate_0: expected \"%s\" but got \"%s\"\n", expected, r[2]);
         return -1;
@@ -12032,7 +12537,6 @@ static int test_is_dir_0 (void)
   /* InitBasicFS for test_is_dir_0: create ext2 on /dev/sda1 */
   {
     char device[] = "/dev/sda";
   /* 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);
     int r;
     suppress_error = 0;
     r = guestfs_blockdev_setrw (g, device);
@@ -12055,7 +12559,6 @@ static int test_is_dir_0 (void)
   }
   {
     char device[] = "/dev/sda";
   }
   {
     char device[] = "/dev/sda";
-    device[5] = devchar;
     char lines_0[] = ",";
     char *lines[] = {
       lines_0,
     char lines_0[] = ",";
     char *lines[] = {
       lines_0,
@@ -12070,7 +12573,6 @@ static int test_is_dir_0 (void)
   {
     char fstype[] = "ext2";
     char device[] = "/dev/sda1";
   {
     char fstype[] = "ext2";
     char device[] = "/dev/sda1";
-    device[5] = devchar;
     int r;
     suppress_error = 0;
     r = guestfs_mkfs (g, fstype, device);
     int r;
     suppress_error = 0;
     r = guestfs_mkfs (g, fstype, device);
@@ -12079,7 +12581,6 @@ static int test_is_dir_0 (void)
   }
   {
     char device[] = "/dev/sda1";
   }
   {
     char device[] = "/dev/sda1";
-    device[5] = devchar;
     char mountpoint[] = "/";
     int r;
     suppress_error = 0;
     char mountpoint[] = "/";
     int r;
     suppress_error = 0;
@@ -12132,7 +12633,6 @@ static int test_is_dir_1 (void)
   /* InitBasicFS for test_is_dir_1: create ext2 on /dev/sda1 */
   {
     char device[] = "/dev/sda";
   /* 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);
     int r;
     suppress_error = 0;
     r = guestfs_blockdev_setrw (g, device);
@@ -12155,7 +12655,6 @@ static int test_is_dir_1 (void)
   }
   {
     char device[] = "/dev/sda";
   }
   {
     char device[] = "/dev/sda";
-    device[5] = devchar;
     char lines_0[] = ",";
     char *lines[] = {
       lines_0,
     char lines_0[] = ",";
     char *lines[] = {
       lines_0,
@@ -12170,7 +12669,6 @@ static int test_is_dir_1 (void)
   {
     char fstype[] = "ext2";
     char device[] = "/dev/sda1";
   {
     char fstype[] = "ext2";
     char device[] = "/dev/sda1";
-    device[5] = devchar;
     int r;
     suppress_error = 0;
     r = guestfs_mkfs (g, fstype, device);
     int r;
     suppress_error = 0;
     r = guestfs_mkfs (g, fstype, device);
@@ -12179,7 +12677,6 @@ static int test_is_dir_1 (void)
   }
   {
     char device[] = "/dev/sda1";
   }
   {
     char device[] = "/dev/sda1";
-    device[5] = devchar;
     char mountpoint[] = "/";
     int r;
     suppress_error = 0;
     char mountpoint[] = "/";
     int r;
     suppress_error = 0;
@@ -12232,7 +12729,6 @@ static int test_is_file_0 (void)
   /* InitBasicFS for test_is_file_0: create ext2 on /dev/sda1 */
   {
     char device[] = "/dev/sda";
   /* 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);
     int r;
     suppress_error = 0;
     r = guestfs_blockdev_setrw (g, device);
@@ -12255,7 +12751,6 @@ static int test_is_file_0 (void)
   }
   {
     char device[] = "/dev/sda";
   }
   {
     char device[] = "/dev/sda";
-    device[5] = devchar;
     char lines_0[] = ",";
     char *lines[] = {
       lines_0,
     char lines_0[] = ",";
     char *lines[] = {
       lines_0,
@@ -12270,7 +12765,6 @@ static int test_is_file_0 (void)
   {
     char fstype[] = "ext2";
     char device[] = "/dev/sda1";
   {
     char fstype[] = "ext2";
     char device[] = "/dev/sda1";
-    device[5] = devchar;
     int r;
     suppress_error = 0;
     r = guestfs_mkfs (g, fstype, device);
     int r;
     suppress_error = 0;
     r = guestfs_mkfs (g, fstype, device);
@@ -12279,7 +12773,6 @@ static int test_is_file_0 (void)
   }
   {
     char device[] = "/dev/sda1";
   }
   {
     char device[] = "/dev/sda1";
-    device[5] = devchar;
     char mountpoint[] = "/";
     int r;
     suppress_error = 0;
     char mountpoint[] = "/";
     int r;
     suppress_error = 0;
@@ -12332,7 +12825,6 @@ static int test_is_file_1 (void)
   /* InitBasicFS for test_is_file_1: create ext2 on /dev/sda1 */
   {
     char device[] = "/dev/sda";
   /* 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);
     int r;
     suppress_error = 0;
     r = guestfs_blockdev_setrw (g, device);
@@ -12355,7 +12847,6 @@ static int test_is_file_1 (void)
   }
   {
     char device[] = "/dev/sda";
   }
   {
     char device[] = "/dev/sda";
-    device[5] = devchar;
     char lines_0[] = ",";
     char *lines[] = {
       lines_0,
     char lines_0[] = ",";
     char *lines[] = {
       lines_0,
@@ -12370,7 +12861,6 @@ static int test_is_file_1 (void)
   {
     char fstype[] = "ext2";
     char device[] = "/dev/sda1";
   {
     char fstype[] = "ext2";
     char device[] = "/dev/sda1";
-    device[5] = devchar;
     int r;
     suppress_error = 0;
     r = guestfs_mkfs (g, fstype, device);
     int r;
     suppress_error = 0;
     r = guestfs_mkfs (g, fstype, device);
@@ -12379,7 +12869,6 @@ static int test_is_file_1 (void)
   }
   {
     char device[] = "/dev/sda1";
   }
   {
     char device[] = "/dev/sda1";
-    device[5] = devchar;
     char mountpoint[] = "/";
     int r;
     suppress_error = 0;
     char mountpoint[] = "/";
     int r;
     suppress_error = 0;
@@ -12432,7 +12921,6 @@ static int test_exists_0 (void)
   /* InitBasicFS for test_exists_0: create ext2 on /dev/sda1 */
   {
     char device[] = "/dev/sda";
   /* 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);
     int r;
     suppress_error = 0;
     r = guestfs_blockdev_setrw (g, device);
@@ -12455,7 +12943,6 @@ static int test_exists_0 (void)
   }
   {
     char device[] = "/dev/sda";
   }
   {
     char device[] = "/dev/sda";
-    device[5] = devchar;
     char lines_0[] = ",";
     char *lines[] = {
       lines_0,
     char lines_0[] = ",";
     char *lines[] = {
       lines_0,
@@ -12470,7 +12957,6 @@ static int test_exists_0 (void)
   {
     char fstype[] = "ext2";
     char device[] = "/dev/sda1";
   {
     char fstype[] = "ext2";
     char device[] = "/dev/sda1";
-    device[5] = devchar;
     int r;
     suppress_error = 0;
     r = guestfs_mkfs (g, fstype, device);
     int r;
     suppress_error = 0;
     r = guestfs_mkfs (g, fstype, device);
@@ -12479,7 +12965,6 @@ static int test_exists_0 (void)
   }
   {
     char device[] = "/dev/sda1";
   }
   {
     char device[] = "/dev/sda1";
-    device[5] = devchar;
     char mountpoint[] = "/";
     int r;
     suppress_error = 0;
     char mountpoint[] = "/";
     int r;
     suppress_error = 0;
@@ -12532,7 +13017,6 @@ static int test_exists_1 (void)
   /* InitBasicFS for test_exists_1: create ext2 on /dev/sda1 */
   {
     char device[] = "/dev/sda";
   /* 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);
     int r;
     suppress_error = 0;
     r = guestfs_blockdev_setrw (g, device);
@@ -12555,7 +13039,6 @@ static int test_exists_1 (void)
   }
   {
     char device[] = "/dev/sda";
   }
   {
     char device[] = "/dev/sda";
-    device[5] = devchar;
     char lines_0[] = ",";
     char *lines[] = {
       lines_0,
     char lines_0[] = ",";
     char *lines[] = {
       lines_0,
@@ -12570,7 +13053,6 @@ static int test_exists_1 (void)
   {
     char fstype[] = "ext2";
     char device[] = "/dev/sda1";
   {
     char fstype[] = "ext2";
     char device[] = "/dev/sda1";
-    device[5] = devchar;
     int r;
     suppress_error = 0;
     r = guestfs_mkfs (g, fstype, device);
     int r;
     suppress_error = 0;
     r = guestfs_mkfs (g, fstype, device);
@@ -12579,7 +13061,6 @@ static int test_exists_1 (void)
   }
   {
     char device[] = "/dev/sda1";
   }
   {
     char device[] = "/dev/sda1";
-    device[5] = devchar;
     char mountpoint[] = "/";
     int r;
     suppress_error = 0;
     char mountpoint[] = "/";
     int r;
     suppress_error = 0;
@@ -12632,7 +13113,6 @@ static int test_mkdir_p_0 (void)
   /* InitBasicFS for test_mkdir_p_0: create ext2 on /dev/sda1 */
   {
     char device[] = "/dev/sda";
   /* 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);
     int r;
     suppress_error = 0;
     r = guestfs_blockdev_setrw (g, device);
@@ -12655,7 +13135,6 @@ static int test_mkdir_p_0 (void)
   }
   {
     char device[] = "/dev/sda";
   }
   {
     char device[] = "/dev/sda";
-    device[5] = devchar;
     char lines_0[] = ",";
     char *lines[] = {
       lines_0,
     char lines_0[] = ",";
     char *lines[] = {
       lines_0,
@@ -12670,7 +13149,6 @@ static int test_mkdir_p_0 (void)
   {
     char fstype[] = "ext2";
     char device[] = "/dev/sda1";
   {
     char fstype[] = "ext2";
     char device[] = "/dev/sda1";
-    device[5] = devchar;
     int r;
     suppress_error = 0;
     r = guestfs_mkfs (g, fstype, device);
     int r;
     suppress_error = 0;
     r = guestfs_mkfs (g, fstype, device);
@@ -12679,7 +13157,6 @@ static int test_mkdir_p_0 (void)
   }
   {
     char device[] = "/dev/sda1";
   }
   {
     char device[] = "/dev/sda1";
-    device[5] = devchar;
     char mountpoint[] = "/";
     int r;
     suppress_error = 0;
     char mountpoint[] = "/";
     int r;
     suppress_error = 0;
@@ -12732,7 +13209,6 @@ static int test_mkdir_p_1 (void)
   /* InitBasicFS for test_mkdir_p_1: create ext2 on /dev/sda1 */
   {
     char device[] = "/dev/sda";
   /* 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);
     int r;
     suppress_error = 0;
     r = guestfs_blockdev_setrw (g, device);
@@ -12755,7 +13231,6 @@ static int test_mkdir_p_1 (void)
   }
   {
     char device[] = "/dev/sda";
   }
   {
     char device[] = "/dev/sda";
-    device[5] = devchar;
     char lines_0[] = ",";
     char *lines[] = {
       lines_0,
     char lines_0[] = ",";
     char *lines[] = {
       lines_0,
@@ -12770,7 +13245,6 @@ static int test_mkdir_p_1 (void)
   {
     char fstype[] = "ext2";
     char device[] = "/dev/sda1";
   {
     char fstype[] = "ext2";
     char device[] = "/dev/sda1";
-    device[5] = devchar;
     int r;
     suppress_error = 0;
     r = guestfs_mkfs (g, fstype, device);
     int r;
     suppress_error = 0;
     r = guestfs_mkfs (g, fstype, device);
@@ -12779,7 +13253,6 @@ static int test_mkdir_p_1 (void)
   }
   {
     char device[] = "/dev/sda1";
   }
   {
     char device[] = "/dev/sda1";
-    device[5] = devchar;
     char mountpoint[] = "/";
     int r;
     suppress_error = 0;
     char mountpoint[] = "/";
     int r;
     suppress_error = 0;
@@ -12832,7 +13305,6 @@ static int test_mkdir_p_2 (void)
   /* InitBasicFS for test_mkdir_p_2: create ext2 on /dev/sda1 */
   {
     char device[] = "/dev/sda";
   /* 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);
     int r;
     suppress_error = 0;
     r = guestfs_blockdev_setrw (g, device);
@@ -12855,7 +13327,6 @@ static int test_mkdir_p_2 (void)
   }
   {
     char device[] = "/dev/sda";
   }
   {
     char device[] = "/dev/sda";
-    device[5] = devchar;
     char lines_0[] = ",";
     char *lines[] = {
       lines_0,
     char lines_0[] = ",";
     char *lines[] = {
       lines_0,
@@ -12870,7 +13341,6 @@ static int test_mkdir_p_2 (void)
   {
     char fstype[] = "ext2";
     char device[] = "/dev/sda1";
   {
     char fstype[] = "ext2";
     char device[] = "/dev/sda1";
-    device[5] = devchar;
     int r;
     suppress_error = 0;
     r = guestfs_mkfs (g, fstype, device);
     int r;
     suppress_error = 0;
     r = guestfs_mkfs (g, fstype, device);
@@ -12879,7 +13349,6 @@ static int test_mkdir_p_2 (void)
   }
   {
     char device[] = "/dev/sda1";
   }
   {
     char device[] = "/dev/sda1";
-    device[5] = devchar;
     char mountpoint[] = "/";
     int r;
     suppress_error = 0;
     char mountpoint[] = "/";
     int r;
     suppress_error = 0;
@@ -12932,7 +13401,6 @@ static int test_mkdir_p_3 (void)
   /* InitBasicFS for test_mkdir_p_3: create ext2 on /dev/sda1 */
   {
     char device[] = "/dev/sda";
   /* 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);
     int r;
     suppress_error = 0;
     r = guestfs_blockdev_setrw (g, device);
@@ -12955,7 +13423,6 @@ static int test_mkdir_p_3 (void)
   }
   {
     char device[] = "/dev/sda";
   }
   {
     char device[] = "/dev/sda";
-    device[5] = devchar;
     char lines_0[] = ",";
     char *lines[] = {
       lines_0,
     char lines_0[] = ",";
     char *lines[] = {
       lines_0,
@@ -12970,7 +13437,6 @@ static int test_mkdir_p_3 (void)
   {
     char fstype[] = "ext2";
     char device[] = "/dev/sda1";
   {
     char fstype[] = "ext2";
     char device[] = "/dev/sda1";
-    device[5] = devchar;
     int r;
     suppress_error = 0;
     r = guestfs_mkfs (g, fstype, device);
     int r;
     suppress_error = 0;
     r = guestfs_mkfs (g, fstype, device);
@@ -12979,7 +13445,6 @@ static int test_mkdir_p_3 (void)
   }
   {
     char device[] = "/dev/sda1";
   }
   {
     char device[] = "/dev/sda1";
-    device[5] = devchar;
     char mountpoint[] = "/";
     int r;
     suppress_error = 0;
     char mountpoint[] = "/";
     int r;
     suppress_error = 0;
@@ -13028,7 +13493,6 @@ static int test_mkdir_p_4 (void)
   /* InitBasicFS for test_mkdir_p_4: create ext2 on /dev/sda1 */
   {
     char device[] = "/dev/sda";
   /* 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);
     int r;
     suppress_error = 0;
     r = guestfs_blockdev_setrw (g, device);
@@ -13051,7 +13515,6 @@ static int test_mkdir_p_4 (void)
   }
   {
     char device[] = "/dev/sda";
   }
   {
     char device[] = "/dev/sda";
-    device[5] = devchar;
     char lines_0[] = ",";
     char *lines[] = {
       lines_0,
     char lines_0[] = ",";
     char *lines[] = {
       lines_0,
@@ -13066,7 +13529,6 @@ static int test_mkdir_p_4 (void)
   {
     char fstype[] = "ext2";
     char device[] = "/dev/sda1";
   {
     char fstype[] = "ext2";
     char device[] = "/dev/sda1";
-    device[5] = devchar;
     int r;
     suppress_error = 0;
     r = guestfs_mkfs (g, fstype, device);
     int r;
     suppress_error = 0;
     r = guestfs_mkfs (g, fstype, device);
@@ -13075,7 +13537,6 @@ static int test_mkdir_p_4 (void)
   }
   {
     char device[] = "/dev/sda1";
   }
   {
     char device[] = "/dev/sda1";
-    device[5] = devchar;
     char mountpoint[] = "/";
     int r;
     suppress_error = 0;
     char mountpoint[] = "/";
     int r;
     suppress_error = 0;
@@ -13124,7 +13585,6 @@ static int test_mkdir_0 (void)
   /* InitBasicFS for test_mkdir_0: create ext2 on /dev/sda1 */
   {
     char device[] = "/dev/sda";
   /* 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);
     int r;
     suppress_error = 0;
     r = guestfs_blockdev_setrw (g, device);
@@ -13147,7 +13607,6 @@ static int test_mkdir_0 (void)
   }
   {
     char device[] = "/dev/sda";
   }
   {
     char device[] = "/dev/sda";
-    device[5] = devchar;
     char lines_0[] = ",";
     char *lines[] = {
       lines_0,
     char lines_0[] = ",";
     char *lines[] = {
       lines_0,
@@ -13162,7 +13621,6 @@ static int test_mkdir_0 (void)
   {
     char fstype[] = "ext2";
     char device[] = "/dev/sda1";
   {
     char fstype[] = "ext2";
     char device[] = "/dev/sda1";
-    device[5] = devchar;
     int r;
     suppress_error = 0;
     r = guestfs_mkfs (g, fstype, device);
     int r;
     suppress_error = 0;
     r = guestfs_mkfs (g, fstype, device);
@@ -13171,7 +13629,6 @@ static int test_mkdir_0 (void)
   }
   {
     char device[] = "/dev/sda1";
   }
   {
     char device[] = "/dev/sda1";
-    device[5] = devchar;
     char mountpoint[] = "/";
     int r;
     suppress_error = 0;
     char mountpoint[] = "/";
     int r;
     suppress_error = 0;
@@ -13224,7 +13681,6 @@ static int test_mkdir_1 (void)
   /* InitBasicFS for test_mkdir_1: create ext2 on /dev/sda1 */
   {
     char device[] = "/dev/sda";
   /* 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);
     int r;
     suppress_error = 0;
     r = guestfs_blockdev_setrw (g, device);
@@ -13247,7 +13703,6 @@ static int test_mkdir_1 (void)
   }
   {
     char device[] = "/dev/sda";
   }
   {
     char device[] = "/dev/sda";
-    device[5] = devchar;
     char lines_0[] = ",";
     char *lines[] = {
       lines_0,
     char lines_0[] = ",";
     char *lines[] = {
       lines_0,
@@ -13262,7 +13717,6 @@ static int test_mkdir_1 (void)
   {
     char fstype[] = "ext2";
     char device[] = "/dev/sda1";
   {
     char fstype[] = "ext2";
     char device[] = "/dev/sda1";
-    device[5] = devchar;
     int r;
     suppress_error = 0;
     r = guestfs_mkfs (g, fstype, device);
     int r;
     suppress_error = 0;
     r = guestfs_mkfs (g, fstype, device);
@@ -13271,7 +13725,6 @@ static int test_mkdir_1 (void)
   }
   {
     char device[] = "/dev/sda1";
   }
   {
     char device[] = "/dev/sda1";
-    device[5] = devchar;
     char mountpoint[] = "/";
     int r;
     suppress_error = 0;
     char mountpoint[] = "/";
     int r;
     suppress_error = 0;
@@ -13312,7 +13765,6 @@ static int test_rm_rf_0 (void)
   /* InitBasicFS for test_rm_rf_0: create ext2 on /dev/sda1 */
   {
     char device[] = "/dev/sda";
   /* 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);
     int r;
     suppress_error = 0;
     r = guestfs_blockdev_setrw (g, device);
@@ -13335,7 +13787,6 @@ static int test_rm_rf_0 (void)
   }
   {
     char device[] = "/dev/sda";
   }
   {
     char device[] = "/dev/sda";
-    device[5] = devchar;
     char lines_0[] = ",";
     char *lines[] = {
       lines_0,
     char lines_0[] = ",";
     char *lines[] = {
       lines_0,
@@ -13350,7 +13801,6 @@ static int test_rm_rf_0 (void)
   {
     char fstype[] = "ext2";
     char device[] = "/dev/sda1";
   {
     char fstype[] = "ext2";
     char device[] = "/dev/sda1";
-    device[5] = devchar;
     int r;
     suppress_error = 0;
     r = guestfs_mkfs (g, fstype, device);
     int r;
     suppress_error = 0;
     r = guestfs_mkfs (g, fstype, device);
@@ -13359,7 +13809,6 @@ static int test_rm_rf_0 (void)
   }
   {
     char device[] = "/dev/sda1";
   }
   {
     char device[] = "/dev/sda1";
-    device[5] = devchar;
     char mountpoint[] = "/";
     int r;
     suppress_error = 0;
     char mountpoint[] = "/";
     int r;
     suppress_error = 0;
@@ -13436,7 +13885,6 @@ static int test_rmdir_0 (void)
   /* InitBasicFS for test_rmdir_0: create ext2 on /dev/sda1 */
   {
     char device[] = "/dev/sda";
   /* 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);
     int r;
     suppress_error = 0;
     r = guestfs_blockdev_setrw (g, device);
@@ -13459,7 +13907,6 @@ static int test_rmdir_0 (void)
   }
   {
     char device[] = "/dev/sda";
   }
   {
     char device[] = "/dev/sda";
-    device[5] = devchar;
     char lines_0[] = ",";
     char *lines[] = {
       lines_0,
     char lines_0[] = ",";
     char *lines[] = {
       lines_0,
@@ -13474,7 +13921,6 @@ static int test_rmdir_0 (void)
   {
     char fstype[] = "ext2";
     char device[] = "/dev/sda1";
   {
     char fstype[] = "ext2";
     char device[] = "/dev/sda1";
-    device[5] = devchar;
     int r;
     suppress_error = 0;
     r = guestfs_mkfs (g, fstype, device);
     int r;
     suppress_error = 0;
     r = guestfs_mkfs (g, fstype, device);
@@ -13483,7 +13929,6 @@ static int test_rmdir_0 (void)
   }
   {
     char device[] = "/dev/sda1";
   }
   {
     char device[] = "/dev/sda1";
-    device[5] = devchar;
     char mountpoint[] = "/";
     int r;
     suppress_error = 0;
     char mountpoint[] = "/";
     int r;
     suppress_error = 0;
@@ -13532,7 +13977,6 @@ static int test_rmdir_1 (void)
   /* InitBasicFS for test_rmdir_1: create ext2 on /dev/sda1 */
   {
     char device[] = "/dev/sda";
   /* 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);
     int r;
     suppress_error = 0;
     r = guestfs_blockdev_setrw (g, device);
@@ -13555,7 +13999,6 @@ static int test_rmdir_1 (void)
   }
   {
     char device[] = "/dev/sda";
   }
   {
     char device[] = "/dev/sda";
-    device[5] = devchar;
     char lines_0[] = ",";
     char *lines[] = {
       lines_0,
     char lines_0[] = ",";
     char *lines[] = {
       lines_0,
@@ -13570,7 +14013,6 @@ static int test_rmdir_1 (void)
   {
     char fstype[] = "ext2";
     char device[] = "/dev/sda1";
   {
     char fstype[] = "ext2";
     char device[] = "/dev/sda1";
-    device[5] = devchar;
     int r;
     suppress_error = 0;
     r = guestfs_mkfs (g, fstype, device);
     int r;
     suppress_error = 0;
     r = guestfs_mkfs (g, fstype, device);
@@ -13579,7 +14021,6 @@ static int test_rmdir_1 (void)
   }
   {
     char device[] = "/dev/sda1";
   }
   {
     char device[] = "/dev/sda1";
-    device[5] = devchar;
     char mountpoint[] = "/";
     int r;
     suppress_error = 0;
     char mountpoint[] = "/";
     int r;
     suppress_error = 0;
@@ -13620,7 +14061,6 @@ static int test_rmdir_2 (void)
   /* InitBasicFS for test_rmdir_2: create ext2 on /dev/sda1 */
   {
     char device[] = "/dev/sda";
   /* 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);
     int r;
     suppress_error = 0;
     r = guestfs_blockdev_setrw (g, device);
@@ -13643,7 +14083,6 @@ static int test_rmdir_2 (void)
   }
   {
     char device[] = "/dev/sda";
   }
   {
     char device[] = "/dev/sda";
-    device[5] = devchar;
     char lines_0[] = ",";
     char *lines[] = {
       lines_0,
     char lines_0[] = ",";
     char *lines[] = {
       lines_0,
@@ -13658,7 +14097,6 @@ static int test_rmdir_2 (void)
   {
     char fstype[] = "ext2";
     char device[] = "/dev/sda1";
   {
     char fstype[] = "ext2";
     char device[] = "/dev/sda1";
-    device[5] = devchar;
     int r;
     suppress_error = 0;
     r = guestfs_mkfs (g, fstype, device);
     int r;
     suppress_error = 0;
     r = guestfs_mkfs (g, fstype, device);
@@ -13667,7 +14105,6 @@ static int test_rmdir_2 (void)
   }
   {
     char device[] = "/dev/sda1";
   }
   {
     char device[] = "/dev/sda1";
-    device[5] = devchar;
     char mountpoint[] = "/";
     int r;
     suppress_error = 0;
     char mountpoint[] = "/";
     int r;
     suppress_error = 0;
@@ -13716,7 +14153,6 @@ static int test_rm_0 (void)
   /* InitBasicFS for test_rm_0: create ext2 on /dev/sda1 */
   {
     char device[] = "/dev/sda";
   /* 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);
     int r;
     suppress_error = 0;
     r = guestfs_blockdev_setrw (g, device);
@@ -13739,7 +14175,6 @@ static int test_rm_0 (void)
   }
   {
     char device[] = "/dev/sda";
   }
   {
     char device[] = "/dev/sda";
-    device[5] = devchar;
     char lines_0[] = ",";
     char *lines[] = {
       lines_0,
     char lines_0[] = ",";
     char *lines[] = {
       lines_0,
@@ -13754,7 +14189,6 @@ static int test_rm_0 (void)
   {
     char fstype[] = "ext2";
     char device[] = "/dev/sda1";
   {
     char fstype[] = "ext2";
     char device[] = "/dev/sda1";
-    device[5] = devchar;
     int r;
     suppress_error = 0;
     r = guestfs_mkfs (g, fstype, device);
     int r;
     suppress_error = 0;
     r = guestfs_mkfs (g, fstype, device);
@@ -13763,7 +14197,6 @@ static int test_rm_0 (void)
   }
   {
     char device[] = "/dev/sda1";
   }
   {
     char device[] = "/dev/sda1";
-    device[5] = devchar;
     char mountpoint[] = "/";
     int r;
     suppress_error = 0;
     char mountpoint[] = "/";
     int r;
     suppress_error = 0;
@@ -13812,7 +14245,6 @@ static int test_rm_1 (void)
   /* InitBasicFS for test_rm_1: create ext2 on /dev/sda1 */
   {
     char device[] = "/dev/sda";
   /* 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);
     int r;
     suppress_error = 0;
     r = guestfs_blockdev_setrw (g, device);
@@ -13835,7 +14267,6 @@ static int test_rm_1 (void)
   }
   {
     char device[] = "/dev/sda";
   }
   {
     char device[] = "/dev/sda";
-    device[5] = devchar;
     char lines_0[] = ",";
     char *lines[] = {
       lines_0,
     char lines_0[] = ",";
     char *lines[] = {
       lines_0,
@@ -13850,7 +14281,6 @@ static int test_rm_1 (void)
   {
     char fstype[] = "ext2";
     char device[] = "/dev/sda1";
   {
     char fstype[] = "ext2";
     char device[] = "/dev/sda1";
-    device[5] = devchar;
     int r;
     suppress_error = 0;
     r = guestfs_mkfs (g, fstype, device);
     int r;
     suppress_error = 0;
     r = guestfs_mkfs (g, fstype, device);
@@ -13859,7 +14289,6 @@ static int test_rm_1 (void)
   }
   {
     char device[] = "/dev/sda1";
   }
   {
     char device[] = "/dev/sda1";
-    device[5] = devchar;
     char mountpoint[] = "/";
     int r;
     suppress_error = 0;
     char mountpoint[] = "/";
     int r;
     suppress_error = 0;
@@ -13900,7 +14329,6 @@ static int test_rm_2 (void)
   /* InitBasicFS for test_rm_2: create ext2 on /dev/sda1 */
   {
     char device[] = "/dev/sda";
   /* 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);
     int r;
     suppress_error = 0;
     r = guestfs_blockdev_setrw (g, device);
@@ -13923,7 +14351,6 @@ static int test_rm_2 (void)
   }
   {
     char device[] = "/dev/sda";
   }
   {
     char device[] = "/dev/sda";
-    device[5] = devchar;
     char lines_0[] = ",";
     char *lines[] = {
       lines_0,
     char lines_0[] = ",";
     char *lines[] = {
       lines_0,
@@ -13938,7 +14365,6 @@ static int test_rm_2 (void)
   {
     char fstype[] = "ext2";
     char device[] = "/dev/sda1";
   {
     char fstype[] = "ext2";
     char device[] = "/dev/sda1";
-    device[5] = devchar;
     int r;
     suppress_error = 0;
     r = guestfs_mkfs (g, fstype, device);
     int r;
     suppress_error = 0;
     r = guestfs_mkfs (g, fstype, device);
@@ -13947,7 +14373,6 @@ static int test_rm_2 (void)
   }
   {
     char device[] = "/dev/sda1";
   }
   {
     char device[] = "/dev/sda1";
-    device[5] = devchar;
     char mountpoint[] = "/";
     int r;
     suppress_error = 0;
     char mountpoint[] = "/";
     int r;
     suppress_error = 0;
@@ -13996,7 +14421,6 @@ static int test_read_lines_0 (void)
   /* InitBasicFS for test_read_lines_0: create ext2 on /dev/sda1 */
   {
     char device[] = "/dev/sda";
   /* 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);
     int r;
     suppress_error = 0;
     r = guestfs_blockdev_setrw (g, device);
@@ -14019,7 +14443,6 @@ static int test_read_lines_0 (void)
   }
   {
     char device[] = "/dev/sda";
   }
   {
     char device[] = "/dev/sda";
-    device[5] = devchar;
     char lines_0[] = ",";
     char *lines[] = {
       lines_0,
     char lines_0[] = ",";
     char *lines[] = {
       lines_0,
@@ -14034,7 +14457,6 @@ static int test_read_lines_0 (void)
   {
     char fstype[] = "ext2";
     char device[] = "/dev/sda1";
   {
     char fstype[] = "ext2";
     char device[] = "/dev/sda1";
-    device[5] = devchar;
     int r;
     suppress_error = 0;
     r = guestfs_mkfs (g, fstype, device);
     int r;
     suppress_error = 0;
     r = guestfs_mkfs (g, fstype, device);
@@ -14043,7 +14465,6 @@ static int test_read_lines_0 (void)
   }
   {
     char device[] = "/dev/sda1";
   }
   {
     char device[] = "/dev/sda1";
-    device[5] = devchar;
     char mountpoint[] = "/";
     int r;
     suppress_error = 0;
     char mountpoint[] = "/";
     int r;
     suppress_error = 0;
@@ -14138,7 +14559,6 @@ static int test_read_lines_1 (void)
   /* InitBasicFS for test_read_lines_1: create ext2 on /dev/sda1 */
   {
     char device[] = "/dev/sda";
   /* 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);
     int r;
     suppress_error = 0;
     r = guestfs_blockdev_setrw (g, device);
@@ -14161,7 +14581,6 @@ static int test_read_lines_1 (void)
   }
   {
     char device[] = "/dev/sda";
   }
   {
     char device[] = "/dev/sda";
-    device[5] = devchar;
     char lines_0[] = ",";
     char *lines[] = {
       lines_0,
     char lines_0[] = ",";
     char *lines[] = {
       lines_0,
@@ -14176,7 +14595,6 @@ static int test_read_lines_1 (void)
   {
     char fstype[] = "ext2";
     char device[] = "/dev/sda1";
   {
     char fstype[] = "ext2";
     char device[] = "/dev/sda1";
-    device[5] = devchar;
     int r;
     suppress_error = 0;
     r = guestfs_mkfs (g, fstype, device);
     int r;
     suppress_error = 0;
     r = guestfs_mkfs (g, fstype, device);
@@ -14185,7 +14603,6 @@ static int test_read_lines_1 (void)
   }
   {
     char device[] = "/dev/sda1";
   }
   {
     char device[] = "/dev/sda1";
-    device[5] = devchar;
     char mountpoint[] = "/";
     int r;
     suppress_error = 0;
     char mountpoint[] = "/";
     int r;
     suppress_error = 0;
@@ -14244,7 +14661,6 @@ static int test_lvs_0 (void)
   /* InitBasicFSonLVM for test_lvs_0: create ext2 on /dev/VG/LV */
   {
     char device[] = "/dev/sda";
   /* 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);
     int r;
     suppress_error = 0;
     r = guestfs_blockdev_setrw (g, device);
@@ -14267,7 +14683,6 @@ static int test_lvs_0 (void)
   }
   {
     char device[] = "/dev/sda";
   }
   {
     char device[] = "/dev/sda";
-    device[5] = devchar;
     char lines_0[] = ",";
     char *lines[] = {
       lines_0,
     char lines_0[] = ",";
     char *lines[] = {
       lines_0,
@@ -14281,7 +14696,6 @@ static int test_lvs_0 (void)
   }
   {
     char device[] = "/dev/sda1";
   }
   {
     char device[] = "/dev/sda1";
-    device[5] = devchar;
     int r;
     suppress_error = 0;
     r = guestfs_pvcreate (g, device);
     int r;
     suppress_error = 0;
     r = guestfs_pvcreate (g, device);
@@ -14291,7 +14705,6 @@ static int test_lvs_0 (void)
   {
     char volgroup[] = "VG";
     char physvols_0[] = "/dev/sda1";
   {
     char volgroup[] = "VG";
     char physvols_0[] = "/dev/sda1";
-    physvols_0[5] = devchar;
     char *physvols[] = {
       physvols_0,
       NULL
     char *physvols[] = {
       physvols_0,
       NULL
@@ -14382,7 +14795,6 @@ static int test_lvs_1 (void)
   /* InitNone|InitEmpty for test_lvs_1 */
   {
     char device[] = "/dev/sda";
   /* InitNone|InitEmpty for test_lvs_1 */
   {
     char device[] = "/dev/sda";
-    device[5] = devchar;
     int r;
     suppress_error = 0;
     r = guestfs_blockdev_setrw (g, device);
     int r;
     suppress_error = 0;
     r = guestfs_blockdev_setrw (g, device);
@@ -14406,7 +14818,6 @@ static int test_lvs_1 (void)
   /* TestOutputList for lvs (1) */
   {
     char device[] = "/dev/sda";
   /* TestOutputList for lvs (1) */
   {
     char device[] = "/dev/sda";
-    device[5] = devchar;
     char lines_0[] = ",10";
     char lines_1[] = ",20";
     char lines_2[] = ",";
     char lines_0[] = ",10";
     char lines_1[] = ",20";
     char lines_2[] = ",";
@@ -14424,7 +14835,6 @@ static int test_lvs_1 (void)
   }
   {
     char device[] = "/dev/sda1";
   }
   {
     char device[] = "/dev/sda1";
-    device[5] = devchar;
     int r;
     suppress_error = 0;
     r = guestfs_pvcreate (g, device);
     int r;
     suppress_error = 0;
     r = guestfs_pvcreate (g, device);
@@ -14433,7 +14843,6 @@ static int test_lvs_1 (void)
   }
   {
     char device[] = "/dev/sda2";
   }
   {
     char device[] = "/dev/sda2";
-    device[5] = devchar;
     int r;
     suppress_error = 0;
     r = guestfs_pvcreate (g, device);
     int r;
     suppress_error = 0;
     r = guestfs_pvcreate (g, device);
@@ -14442,7 +14851,6 @@ static int test_lvs_1 (void)
   }
   {
     char device[] = "/dev/sda3";
   }
   {
     char device[] = "/dev/sda3";
-    device[5] = devchar;
     int r;
     suppress_error = 0;
     r = guestfs_pvcreate (g, device);
     int r;
     suppress_error = 0;
     r = guestfs_pvcreate (g, device);
@@ -14452,9 +14860,7 @@ static int test_lvs_1 (void)
   {
     char volgroup[] = "VG1";
     char physvols_0[] = "/dev/sda1";
   {
     char volgroup[] = "VG1";
     char physvols_0[] = "/dev/sda1";
-    physvols_0[5] = devchar;
     char physvols_1[] = "/dev/sda2";
     char physvols_1[] = "/dev/sda2";
-    physvols_1[5] = devchar;
     char *physvols[] = {
       physvols_0,
       physvols_1,
     char *physvols[] = {
       physvols_0,
       physvols_1,
@@ -14469,7 +14875,6 @@ static int test_lvs_1 (void)
   {
     char volgroup[] = "VG2";
     char physvols_0[] = "/dev/sda3";
   {
     char volgroup[] = "VG2";
     char physvols_0[] = "/dev/sda3";
-    physvols_0[5] = devchar;
     char *physvols[] = {
       physvols_0,
       NULL
     char *physvols[] = {
       physvols_0,
       NULL
@@ -14583,7 +14988,6 @@ static int test_vgs_0 (void)
   /* InitBasicFSonLVM for test_vgs_0: create ext2 on /dev/VG/LV */
   {
     char device[] = "/dev/sda";
   /* 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);
     int r;
     suppress_error = 0;
     r = guestfs_blockdev_setrw (g, device);
@@ -14606,7 +15010,6 @@ static int test_vgs_0 (void)
   }
   {
     char device[] = "/dev/sda";
   }
   {
     char device[] = "/dev/sda";
-    device[5] = devchar;
     char lines_0[] = ",";
     char *lines[] = {
       lines_0,
     char lines_0[] = ",";
     char *lines[] = {
       lines_0,
@@ -14620,7 +15023,6 @@ static int test_vgs_0 (void)
   }
   {
     char device[] = "/dev/sda1";
   }
   {
     char device[] = "/dev/sda1";
-    device[5] = devchar;
     int r;
     suppress_error = 0;
     r = guestfs_pvcreate (g, device);
     int r;
     suppress_error = 0;
     r = guestfs_pvcreate (g, device);
@@ -14630,7 +15032,6 @@ static int test_vgs_0 (void)
   {
     char volgroup[] = "VG";
     char physvols_0[] = "/dev/sda1";
   {
     char volgroup[] = "VG";
     char physvols_0[] = "/dev/sda1";
-    physvols_0[5] = devchar;
     char *physvols[] = {
       physvols_0,
       NULL
     char *physvols[] = {
       physvols_0,
       NULL
@@ -14721,7 +15122,6 @@ static int test_vgs_1 (void)
   /* InitNone|InitEmpty for test_vgs_1 */
   {
     char device[] = "/dev/sda";
   /* InitNone|InitEmpty for test_vgs_1 */
   {
     char device[] = "/dev/sda";
-    device[5] = devchar;
     int r;
     suppress_error = 0;
     r = guestfs_blockdev_setrw (g, device);
     int r;
     suppress_error = 0;
     r = guestfs_blockdev_setrw (g, device);
@@ -14745,7 +15145,6 @@ static int test_vgs_1 (void)
   /* TestOutputList for vgs (1) */
   {
     char device[] = "/dev/sda";
   /* TestOutputList for vgs (1) */
   {
     char device[] = "/dev/sda";
-    device[5] = devchar;
     char lines_0[] = ",10";
     char lines_1[] = ",20";
     char lines_2[] = ",";
     char lines_0[] = ",10";
     char lines_1[] = ",20";
     char lines_2[] = ",";
@@ -14763,7 +15162,6 @@ static int test_vgs_1 (void)
   }
   {
     char device[] = "/dev/sda1";
   }
   {
     char device[] = "/dev/sda1";
-    device[5] = devchar;
     int r;
     suppress_error = 0;
     r = guestfs_pvcreate (g, device);
     int r;
     suppress_error = 0;
     r = guestfs_pvcreate (g, device);
@@ -14772,7 +15170,6 @@ static int test_vgs_1 (void)
   }
   {
     char device[] = "/dev/sda2";
   }
   {
     char device[] = "/dev/sda2";
-    device[5] = devchar;
     int r;
     suppress_error = 0;
     r = guestfs_pvcreate (g, device);
     int r;
     suppress_error = 0;
     r = guestfs_pvcreate (g, device);
@@ -14781,7 +15178,6 @@ static int test_vgs_1 (void)
   }
   {
     char device[] = "/dev/sda3";
   }
   {
     char device[] = "/dev/sda3";
-    device[5] = devchar;
     int r;
     suppress_error = 0;
     r = guestfs_pvcreate (g, device);
     int r;
     suppress_error = 0;
     r = guestfs_pvcreate (g, device);
@@ -14791,9 +15187,7 @@ static int test_vgs_1 (void)
   {
     char volgroup[] = "VG1";
     char physvols_0[] = "/dev/sda1";
   {
     char volgroup[] = "VG1";
     char physvols_0[] = "/dev/sda1";
-    physvols_0[5] = devchar;
     char physvols_1[] = "/dev/sda2";
     char physvols_1[] = "/dev/sda2";
-    physvols_1[5] = devchar;
     char *physvols[] = {
       physvols_0,
       physvols_1,
     char *physvols[] = {
       physvols_0,
       physvols_1,
@@ -14808,7 +15202,6 @@ static int test_vgs_1 (void)
   {
     char volgroup[] = "VG2";
     char physvols_0[] = "/dev/sda3";
   {
     char volgroup[] = "VG2";
     char physvols_0[] = "/dev/sda3";
-    physvols_0[5] = devchar;
     char *physvols[] = {
       physvols_0,
       NULL
     char *physvols[] = {
       physvols_0,
       NULL
@@ -14883,7 +15276,6 @@ static int test_pvs_0 (void)
   /* InitBasicFSonLVM for test_pvs_0: create ext2 on /dev/VG/LV */
   {
     char device[] = "/dev/sda";
   /* 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);
     int r;
     suppress_error = 0;
     r = guestfs_blockdev_setrw (g, device);
@@ -14906,7 +15298,6 @@ static int test_pvs_0 (void)
   }
   {
     char device[] = "/dev/sda";
   }
   {
     char device[] = "/dev/sda";
-    device[5] = devchar;
     char lines_0[] = ",";
     char *lines[] = {
       lines_0,
     char lines_0[] = ",";
     char *lines[] = {
       lines_0,
@@ -14920,7 +15311,6 @@ static int test_pvs_0 (void)
   }
   {
     char device[] = "/dev/sda1";
   }
   {
     char device[] = "/dev/sda1";
-    device[5] = devchar;
     int r;
     suppress_error = 0;
     r = guestfs_pvcreate (g, device);
     int r;
     suppress_error = 0;
     r = guestfs_pvcreate (g, device);
@@ -14930,7 +15320,6 @@ static int test_pvs_0 (void)
   {
     char volgroup[] = "VG";
     char physvols_0[] = "/dev/sda1";
   {
     char volgroup[] = "VG";
     char physvols_0[] = "/dev/sda1";
-    physvols_0[5] = devchar;
     char *physvols[] = {
       physvols_0,
       NULL
     char *physvols[] = {
       physvols_0,
       NULL
@@ -14968,7 +15357,7 @@ static int test_pvs_0 (void)
     if (r == -1)
       return -1;
   }
     if (r == -1)
       return -1;
   }
-  /* TestOutputList for pvs (0) */
+  /* TestOutputListOfDevices for pvs (0) */
   {
     char **r;
     int i;
   {
     char **r;
     int i;
@@ -14983,7 +15372,7 @@ static int test_pvs_0 (void)
     }
     {
       char expected[] = "/dev/sda1";
     }
     {
       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;
       if (strcmp (r[0], expected) != 0) {
         fprintf (stderr, "test_pvs_0: expected \"%s\" but got \"%s\"\n", expected, r[0]);
         return -1;
@@ -15022,7 +15411,6 @@ static int test_pvs_1 (void)
   /* InitNone|InitEmpty for test_pvs_1 */
   {
     char device[] = "/dev/sda";
   /* InitNone|InitEmpty for test_pvs_1 */
   {
     char device[] = "/dev/sda";
-    device[5] = devchar;
     int r;
     suppress_error = 0;
     r = guestfs_blockdev_setrw (g, device);
     int r;
     suppress_error = 0;
     r = guestfs_blockdev_setrw (g, device);
@@ -15043,10 +15431,9 @@ static int test_pvs_1 (void)
     if (r == -1)
       return -1;
   }
     if (r == -1)
       return -1;
   }
-  /* TestOutputList for pvs (1) */
+  /* TestOutputListOfDevices for pvs (1) */
   {
     char device[] = "/dev/sda";
   {
     char device[] = "/dev/sda";
-    device[5] = devchar;
     char lines_0[] = ",10";
     char lines_1[] = ",20";
     char lines_2[] = ",";
     char lines_0[] = ",10";
     char lines_1[] = ",20";
     char lines_2[] = ",";
@@ -15064,7 +15451,6 @@ static int test_pvs_1 (void)
   }
   {
     char device[] = "/dev/sda1";
   }
   {
     char device[] = "/dev/sda1";
-    device[5] = devchar;
     int r;
     suppress_error = 0;
     r = guestfs_pvcreate (g, device);
     int r;
     suppress_error = 0;
     r = guestfs_pvcreate (g, device);
@@ -15073,7 +15459,6 @@ static int test_pvs_1 (void)
   }
   {
     char device[] = "/dev/sda2";
   }
   {
     char device[] = "/dev/sda2";
-    device[5] = devchar;
     int r;
     suppress_error = 0;
     r = guestfs_pvcreate (g, device);
     int r;
     suppress_error = 0;
     r = guestfs_pvcreate (g, device);
@@ -15082,7 +15467,6 @@ static int test_pvs_1 (void)
   }
   {
     char device[] = "/dev/sda3";
   }
   {
     char device[] = "/dev/sda3";
-    device[5] = devchar;
     int r;
     suppress_error = 0;
     r = guestfs_pvcreate (g, device);
     int r;
     suppress_error = 0;
     r = guestfs_pvcreate (g, device);
@@ -15103,7 +15487,7 @@ static int test_pvs_1 (void)
     }
     {
       char expected[] = "/dev/sda1";
     }
     {
       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;
       if (strcmp (r[0], expected) != 0) {
         fprintf (stderr, "test_pvs_1: expected \"%s\" but got \"%s\"\n", expected, r[0]);
         return -1;
@@ -15116,7 +15500,7 @@ static int test_pvs_1 (void)
     }
     {
       char expected[] = "/dev/sda2";
     }
     {
       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;
       if (strcmp (r[1], expected) != 0) {
         fprintf (stderr, "test_pvs_1: expected \"%s\" but got \"%s\"\n", expected, r[1]);
         return -1;
@@ -15129,7 +15513,7 @@ static int test_pvs_1 (void)
     }
     {
       char expected[] = "/dev/sda3";
     }
     {
       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;
       if (strcmp (r[2], expected) != 0) {
         fprintf (stderr, "test_pvs_1: expected \"%s\" but got \"%s\"\n", expected, r[2]);
         return -1;
@@ -15168,7 +15552,6 @@ static int test_list_partitions_0 (void)
   /* InitBasicFS for test_list_partitions_0: create ext2 on /dev/sda1 */
   {
     char device[] = "/dev/sda";
   /* 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);
     int r;
     suppress_error = 0;
     r = guestfs_blockdev_setrw (g, device);
@@ -15191,7 +15574,6 @@ static int test_list_partitions_0 (void)
   }
   {
     char device[] = "/dev/sda";
   }
   {
     char device[] = "/dev/sda";
-    device[5] = devchar;
     char lines_0[] = ",";
     char *lines[] = {
       lines_0,
     char lines_0[] = ",";
     char *lines[] = {
       lines_0,
@@ -15206,7 +15588,6 @@ static int test_list_partitions_0 (void)
   {
     char fstype[] = "ext2";
     char device[] = "/dev/sda1";
   {
     char fstype[] = "ext2";
     char device[] = "/dev/sda1";
-    device[5] = devchar;
     int r;
     suppress_error = 0;
     r = guestfs_mkfs (g, fstype, device);
     int r;
     suppress_error = 0;
     r = guestfs_mkfs (g, fstype, device);
@@ -15215,7 +15596,6 @@ static int test_list_partitions_0 (void)
   }
   {
     char device[] = "/dev/sda1";
   }
   {
     char device[] = "/dev/sda1";
-    device[5] = devchar;
     char mountpoint[] = "/";
     int r;
     suppress_error = 0;
     char mountpoint[] = "/";
     int r;
     suppress_error = 0;
@@ -15223,7 +15603,7 @@ static int test_list_partitions_0 (void)
     if (r == -1)
       return -1;
   }
     if (r == -1)
       return -1;
   }
-  /* TestOutputList for list_partitions (0) */
+  /* TestOutputListOfDevices for list_partitions (0) */
   {
     char **r;
     int i;
   {
     char **r;
     int i;
@@ -15238,7 +15618,7 @@ static int test_list_partitions_0 (void)
     }
     {
       char expected[] = "/dev/sda1";
     }
     {
       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;
       if (strcmp (r[0], expected) != 0) {
         fprintf (stderr, "test_list_partitions_0: expected \"%s\" but got \"%s\"\n", expected, r[0]);
         return -1;
@@ -15277,7 +15657,6 @@ static int test_list_partitions_1 (void)
   /* InitNone|InitEmpty for test_list_partitions_1 */
   {
     char device[] = "/dev/sda";
   /* 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);
     int r;
     suppress_error = 0;
     r = guestfs_blockdev_setrw (g, device);
@@ -15298,10 +15677,9 @@ static int test_list_partitions_1 (void)
     if (r == -1)
       return -1;
   }
     if (r == -1)
       return -1;
   }
-  /* TestOutputList for list_partitions (1) */
+  /* TestOutputListOfDevices for list_partitions (1) */
   {
     char device[] = "/dev/sda";
   {
     char device[] = "/dev/sda";
-    device[5] = devchar;
     char lines_0[] = ",10";
     char lines_1[] = ",20";
     char lines_2[] = ",";
     char lines_0[] = ",10";
     char lines_1[] = ",20";
     char lines_2[] = ",";
@@ -15331,7 +15709,7 @@ static int test_list_partitions_1 (void)
     }
     {
       char expected[] = "/dev/sda1";
     }
     {
       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;
       if (strcmp (r[0], expected) != 0) {
         fprintf (stderr, "test_list_partitions_1: expected \"%s\" but got \"%s\"\n", expected, r[0]);
         return -1;
@@ -15344,7 +15722,7 @@ static int test_list_partitions_1 (void)
     }
     {
       char expected[] = "/dev/sda2";
     }
     {
       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;
       if (strcmp (r[1], expected) != 0) {
         fprintf (stderr, "test_list_partitions_1: expected \"%s\" but got \"%s\"\n", expected, r[1]);
         return -1;
@@ -15357,7 +15735,7 @@ static int test_list_partitions_1 (void)
     }
     {
       char expected[] = "/dev/sda3";
     }
     {
       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;
       if (strcmp (r[2], expected) != 0) {
         fprintf (stderr, "test_list_partitions_1: expected \"%s\" but got \"%s\"\n", expected, r[2]);
         return -1;
@@ -15396,7 +15774,6 @@ static int test_list_devices_0 (void)
   /* InitNone|InitEmpty for test_list_devices_0 */
   {
     char device[] = "/dev/sda";
   /* 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);
     int r;
     suppress_error = 0;
     r = guestfs_blockdev_setrw (g, device);
@@ -15417,7 +15794,7 @@ static int test_list_devices_0 (void)
     if (r == -1)
       return -1;
   }
     if (r == -1)
       return -1;
   }
-  /* TestOutputList for list_devices (0) */
+  /* TestOutputListOfDevices for list_devices (0) */
   {
     char **r;
     int i;
   {
     char **r;
     int i;
@@ -15432,7 +15809,7 @@ static int test_list_devices_0 (void)
     }
     {
       char expected[] = "/dev/sda";
     }
     {
       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;
       if (strcmp (r[0], expected) != 0) {
         fprintf (stderr, "test_list_devices_0: expected \"%s\" but got \"%s\"\n", expected, r[0]);
         return -1;
@@ -15445,7 +15822,7 @@ static int test_list_devices_0 (void)
     }
     {
       char expected[] = "/dev/sdb";
     }
     {
       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;
       if (strcmp (r[1], expected) != 0) {
         fprintf (stderr, "test_list_devices_0: expected \"%s\" but got \"%s\"\n", expected, r[1]);
         return -1;
@@ -15458,7 +15835,7 @@ static int test_list_devices_0 (void)
     }
     {
       char expected[] = "/dev/sdc";
     }
     {
       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;
       if (strcmp (r[2], expected) != 0) {
         fprintf (stderr, "test_list_devices_0: expected \"%s\" but got \"%s\"\n", expected, r[2]);
         return -1;
@@ -15471,7 +15848,7 @@ static int test_list_devices_0 (void)
     }
     {
       char expected[] = "/dev/sdd";
     }
     {
       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;
       if (strcmp (r[3], expected) != 0) {
         fprintf (stderr, "test_list_devices_0: expected \"%s\" but got \"%s\"\n", expected, r[3]);
         return -1;
@@ -15510,7 +15887,6 @@ static int test_ls_0 (void)
   /* InitBasicFS for test_ls_0: create ext2 on /dev/sda1 */
   {
     char device[] = "/dev/sda";
   /* 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);
     int r;
     suppress_error = 0;
     r = guestfs_blockdev_setrw (g, device);
@@ -15533,7 +15909,6 @@ static int test_ls_0 (void)
   }
   {
     char device[] = "/dev/sda";
   }
   {
     char device[] = "/dev/sda";
-    device[5] = devchar;
     char lines_0[] = ",";
     char *lines[] = {
       lines_0,
     char lines_0[] = ",";
     char *lines[] = {
       lines_0,
@@ -15548,7 +15923,6 @@ static int test_ls_0 (void)
   {
     char fstype[] = "ext2";
     char device[] = "/dev/sda1";
   {
     char fstype[] = "ext2";
     char device[] = "/dev/sda1";
-    device[5] = devchar;
     int r;
     suppress_error = 0;
     r = guestfs_mkfs (g, fstype, device);
     int r;
     suppress_error = 0;
     r = guestfs_mkfs (g, fstype, device);
@@ -15557,7 +15931,6 @@ static int test_ls_0 (void)
   }
   {
     char device[] = "/dev/sda1";
   }
   {
     char device[] = "/dev/sda1";
-    device[5] = devchar;
     char mountpoint[] = "/";
     int r;
     suppress_error = 0;
     char mountpoint[] = "/";
     int r;
     suppress_error = 0;
@@ -15679,7 +16052,6 @@ static int test_cat_0 (void)
   /* InitBasicFS for test_cat_0: create ext2 on /dev/sda1 */
   {
     char device[] = "/dev/sda";
   /* 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);
     int r;
     suppress_error = 0;
     r = guestfs_blockdev_setrw (g, device);
@@ -15702,7 +16074,6 @@ static int test_cat_0 (void)
   }
   {
     char device[] = "/dev/sda";
   }
   {
     char device[] = "/dev/sda";
-    device[5] = devchar;
     char lines_0[] = ",";
     char *lines[] = {
       lines_0,
     char lines_0[] = ",";
     char *lines[] = {
       lines_0,
@@ -15717,7 +16088,6 @@ static int test_cat_0 (void)
   {
     char fstype[] = "ext2";
     char device[] = "/dev/sda1";
   {
     char fstype[] = "ext2";
     char device[] = "/dev/sda1";
-    device[5] = devchar;
     int r;
     suppress_error = 0;
     r = guestfs_mkfs (g, fstype, device);
     int r;
     suppress_error = 0;
     r = guestfs_mkfs (g, fstype, device);
@@ -15726,7 +16096,6 @@ static int test_cat_0 (void)
   }
   {
     char device[] = "/dev/sda1";
   }
   {
     char device[] = "/dev/sda1";
-    device[5] = devchar;
     char mountpoint[] = "/";
     int r;
     suppress_error = 0;
     char mountpoint[] = "/";
     int r;
     suppress_error = 0;
@@ -15782,7 +16151,6 @@ static int test_touch_0 (void)
   /* InitBasicFS for test_touch_0: create ext2 on /dev/sda1 */
   {
     char device[] = "/dev/sda";
   /* 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);
     int r;
     suppress_error = 0;
     r = guestfs_blockdev_setrw (g, device);
@@ -15805,7 +16173,6 @@ static int test_touch_0 (void)
   }
   {
     char device[] = "/dev/sda";
   }
   {
     char device[] = "/dev/sda";
-    device[5] = devchar;
     char lines_0[] = ",";
     char *lines[] = {
       lines_0,
     char lines_0[] = ",";
     char *lines[] = {
       lines_0,
@@ -15820,7 +16187,6 @@ static int test_touch_0 (void)
   {
     char fstype[] = "ext2";
     char device[] = "/dev/sda1";
   {
     char fstype[] = "ext2";
     char device[] = "/dev/sda1";
-    device[5] = devchar;
     int r;
     suppress_error = 0;
     r = guestfs_mkfs (g, fstype, device);
     int r;
     suppress_error = 0;
     r = guestfs_mkfs (g, fstype, device);
@@ -15829,7 +16195,6 @@ static int test_touch_0 (void)
   }
   {
     char device[] = "/dev/sda1";
   }
   {
     char device[] = "/dev/sda1";
-    device[5] = devchar;
     char mountpoint[] = "/";
     int r;
     suppress_error = 0;
     char mountpoint[] = "/";
     int r;
     suppress_error = 0;
@@ -15882,7 +16247,6 @@ static int test_sync_0 (void)
   /* InitNone|InitEmpty for test_sync_0 */
   {
     char device[] = "/dev/sda";
   /* InitNone|InitEmpty for test_sync_0 */
   {
     char device[] = "/dev/sda";
-    device[5] = devchar;
     int r;
     suppress_error = 0;
     r = guestfs_blockdev_setrw (g, device);
     int r;
     suppress_error = 0;
     r = guestfs_blockdev_setrw (g, device);
@@ -15935,7 +16299,6 @@ static int test_mount_0 (void)
   /* InitNone|InitEmpty for test_mount_0 */
   {
     char device[] = "/dev/sda";
   /* InitNone|InitEmpty for test_mount_0 */
   {
     char device[] = "/dev/sda";
-    device[5] = devchar;
     int r;
     suppress_error = 0;
     r = guestfs_blockdev_setrw (g, device);
     int r;
     suppress_error = 0;
     r = guestfs_blockdev_setrw (g, device);
@@ -15960,7 +16323,6 @@ static int test_mount_0 (void)
   char expected[] = "new file contents";
   {
     char device[] = "/dev/sda";
   char expected[] = "new file contents";
   {
     char device[] = "/dev/sda";
-    device[5] = devchar;
     char lines_0[] = ",";
     char *lines[] = {
       lines_0,
     char lines_0[] = ",";
     char *lines[] = {
       lines_0,
@@ -15975,7 +16337,6 @@ static int test_mount_0 (void)
   {
     char fstype[] = "ext2";
     char device[] = "/dev/sda1";
   {
     char fstype[] = "ext2";
     char device[] = "/dev/sda1";
-    device[5] = devchar;
     int r;
     suppress_error = 0;
     r = guestfs_mkfs (g, fstype, device);
     int r;
     suppress_error = 0;
     r = guestfs_mkfs (g, fstype, device);
@@ -15984,7 +16345,6 @@ static int test_mount_0 (void)
   }
   {
     char device[] = "/dev/sda1";
   }
   {
     char device[] = "/dev/sda1";
-    device[5] = devchar;
     char mountpoint[] = "/";
     int r;
     suppress_error = 0;
     char mountpoint[] = "/";
     int r;
     suppress_error = 0;
@@ -16022,9 +16382,8 @@ int main (int argc, char *argv[])
   char c = 0;
   int failed = 0;
   const char *filename;
   char c = 0;
   int failed = 0;
   const char *filename;
-  int fd, i;
+  int fd;
   int nr_tests, test_num = 0;
   int nr_tests, test_num = 0;
-  char **devs;
 
   no_test_warnings ();
 
 
   no_test_warnings ();
 
@@ -16131,36 +16490,75 @@ int main (int argc, char *argv[])
     printf ("guestfs_launch FAILED\n");
     exit (1);
   }
     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);
   }
 
   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 = 143;
+  nr_tests = 153;
 
   test_num++;
 
   test_num++;
+  printf ("%3d/%3d test_mkdtemp_0\n", test_num, nr_tests);
+  if (test_mkdtemp_0 () == -1) {
+    printf ("test_mkdtemp_0 FAILED\n");
+    failed++;
+  }
+  test_num++;
+  printf ("%3d/%3d test_scrub_file_0\n", test_num, nr_tests);
+  if (test_scrub_file_0 () == -1) {
+    printf ("test_scrub_file_0 FAILED\n");
+    failed++;
+  }
+  test_num++;
+  printf ("%3d/%3d test_scrub_device_0\n", test_num, nr_tests);
+  if (test_scrub_device_0 () == -1) {
+    printf ("test_scrub_device_0 FAILED\n");
+    failed++;
+  }
+  test_num++;
+  printf ("%3d/%3d test_glob_expand_0\n", test_num, nr_tests);
+  if (test_glob_expand_0 () == -1) {
+    printf ("test_glob_expand_0 FAILED\n");
+    failed++;
+  }
+  test_num++;
+  printf ("%3d/%3d test_glob_expand_1\n", test_num, nr_tests);
+  if (test_glob_expand_1 () == -1) {
+    printf ("test_glob_expand_1 FAILED\n");
+    failed++;
+  }
+  test_num++;
+  printf ("%3d/%3d test_glob_expand_2\n", test_num, nr_tests);
+  if (test_glob_expand_2 () == -1) {
+    printf ("test_glob_expand_2 FAILED\n");
+    failed++;
+  }
+  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");
+    failed++;
+  }
+  test_num++;
   printf ("%3d/%3d test_find_0\n", test_num, nr_tests);
   if (test_find_0 () == -1) {
     printf ("test_find_0 FAILED\n");
   printf ("%3d/%3d test_find_0\n", test_num, nr_tests);
   if (test_find_0 () == -1) {
     printf ("test_find_0 FAILED\n");
@@ -16197,6 +16595,12 @@ int main (int argc, char *argv[])
     failed++;
   }
   test_num++;
     failed++;
   }
   test_num++;
+  printf ("%3d/%3d test_hexdump_1\n", test_num, nr_tests);
+  if (test_hexdump_1 () == -1) {
+    printf ("test_hexdump_1 FAILED\n");
+    failed++;
+  }
+  test_num++;
   printf ("%3d/%3d test_strings_e_0\n", test_num, nr_tests);
   if (test_strings_e_0 () == -1) {
     printf ("test_strings_e_0 FAILED\n");
   printf ("%3d/%3d test_strings_e_0\n", test_num, nr_tests);
   if (test_strings_e_0 () == -1) {
     printf ("test_strings_e_0 FAILED\n");