rem: command = g_strdup_printf ("umount %s", cache->mountpoint); g_spawn_command_line_sync (command, NULL, NULL, NULL, NULL); g_free (command);
add: gnome_vfs_drive_unmount (cache->drive, (GnomeVFSVolumeOpCallback) cb_umount_done, &called); while (!called) g_main_iteration (TRUE);
context: cd_cache_free (CdCache *cache){  /* umount if we mounted */  if (cache->self_mounted && cache->mounted) {    char *command;    command = g_strdup_printf ("umount %s", cache->mountpoint);    g_spawn_command_line_sync (command, NULL, NULL, NULL, NULL);    g_free (command);  }  /* close file descriptor to device */  if (cache->fd > 0) {    close (cache->fd);  }  /* free mem */  if (cache->drive)    gnome_vfs_drive_unref (cache->drive);  g_free (cache->mountpoint);  g_free (cache->device);  g_free (cache);}