boot: Allow boot order=g-m option to choose boot SCSI ID

Add support to boot from a specific SCSI ID by mapping drives
g-m to SCSI IDs 0-7, e.g.
 -boot order=g  for SCSI ID 0, and
 -boot order=l  for SCSI ID 5

Signed-off-by: Helge Deller <deller@gmx.de>
diff --git a/src/boot.c b/src/boot.c
index be0d734..f2ded31 100644
--- a/src/boot.c
+++ b/src/boot.c
@@ -820,10 +820,19 @@
     /* try each boot device */
     hlist_for_each_entry(pos, &BootList, node) {
 	if (((bootdrive == 'd') && (pos->type == IPL_TYPE_CDROM)) ||
-	    ((bootdrive != 'd') && (pos->type == IPL_TYPE_HARDDISK))) {
+	    ((bootdrive == 'c') && (pos->type == IPL_TYPE_HARDDISK))) {
                 printf("\nBooting from %s\n",pos->description);
 		return pos->drive;
 	}
+        /* -boot order=g-m: machine implementation dependent drives */
+        if ((bootdrive >= 'g') && (bootdrive <= 'm')) {
+            int scsi_index = (int)bootdrive - 'g';
+            if (pos->drive->target == scsi_index) {
+                printf("\nBooting from SCSI target %d: %s\n",
+                        scsi_index, pos->description);
+		return pos->drive;
+            }
+        }
     }
     /* if none found, choose first bootable device */
     hlist_for_each_entry(pos, &BootList, node) {