--- eltorito.c.orig	2008-06-01 14:23:40.000000000 +0200
+++ eltorito.c	2008-08-28 15:49:09.000000000 +0200
@@ -60,7 +60,7 @@
  */
 void el_torito_set_load_seg(ElToritoBootImage *bootimg, short segment)
 {
-    if (bootimg->type != ELTORITO_NO_EMUL)
+    if (iso_bootimage_get_enum_boot_media_type(bootimg) != ELTORITO_NO_EMUL)
         return;
     bootimg->load_seg = segment;
 }
@@ -72,7 +72,7 @@
  */
 void el_torito_set_load_size(ElToritoBootImage *bootimg, short sectors)
 {
-    if (bootimg->type != ELTORITO_NO_EMUL)
+    if (iso_bootimage_get_enum_boot_media_type(bootimg) != ELTORITO_NO_EMUL)
         return;
     bootimg->load_size = sectors;
 }
@@ -161,6 +161,31 @@
     return ++parent->nchildren;
 }
 
+int iso_bootimage_get_enum_boot_media_type(const ElToritoBootImage *bootimg)
+{
+    if (bootimg) {
+	switch (bootimg->type) {
+	case 1:
+	case 2:
+	case 3:
+	    return ELTORITO_FLOPPY_EMUL;
+	    break;
+	case 4:
+	    return ELTORITO_HARD_DISC_EMUL;
+	    break;
+	case 0:
+	    return ELTORITO_NO_EMUL;
+	    break;
+	default:
+	    return ELTORITO_FLOPPY_EMUL;
+	    break;
+	}
+    } else {
+	return -1;
+    }
+}
+
+
 
 static 
 int create_image(IsoImage *image, const char *image_path,
@@ -540,7 +565,6 @@
     if (data->offset != -1) {
         return ISO_FILE_ALREADY_OPENED;
     }
-    
     memset(data->buffer, 0, BLOCK_SIZE);
     
     /* fill the buffer with the catalog contents */
--- libisofs.h.orig	2008-06-01 14:23:40.000000000 +0200
+++ libisofs.h	2008-08-27 08:29:32.000000000 +0200
@@ -1682,6 +1682,14 @@
  */
 const char *iso_image_get_biblio_file_id(const IsoImage *image);
 
+/** 
+ * Get the enum value, enum eltorito_boot_media_type (ELTORITO_FLOPPY_EMUL...),
+ * associated with image->boot_media_type
+ *
+ * @patch for 0.6.2
+ */
+int iso_bootimage_get_enum_boot_media_type(const ElToritoBootImage *bootimg);
+
 /**
  * Create a bootable image by adding a El-Torito boot image.
  * 
