Handle partition-less ARC paths
Modified: branches/xen/reactos/boot/freeldr/freeldr/reactos/arcname.c
_____
Modified: branches/xen/reactos/boot/freeldr/freeldr/reactos/arcname.c
--- branches/xen/reactos/boot/freeldr/freeldr/reactos/arcname.c
2005-05-17 06:17:35 UTC (rev 15371)
+++ branches/xen/reactos/boot/freeldr/freeldr/reactos/arcname.c
2005-05-17 07:34:17 UTC (rev 15372)
@@ -64,17 +64,27 @@
/*
* hard disk path:
* multi(0)disk(0)rdisk(x)partition(y)\path
+ * or
+ * multi(0)disk(0)rdisk(x)\path
+ * (for partition-less disks)
*/
p = p + 6;
*BootDrive = atoi(p) + 0x80;
p = strchr(p, ')');
- if ((p == NULL) || (strnicmp(p, ")partition(", 11) !=
0))
+ if (p == NULL)
return FALSE;
- p = p + 11;
- *BootPartition = atoi(p);
- p = strchr(p, ')');
- if ((p == NULL) || (*BootPartition == 0))
- return FALSE;
+ if (strnicmp(p, ")partition(", 11) == 0)
+ {
+ p = p + 11;
+ *BootPartition = atoi(p);
+ p = strchr(p, ')');
+ if ((p == NULL) || (*BootPartition == 0))
+ return FALSE;
+ }
+ else
+ {
+ *BootPartition = 0xff;
+ }
p++;
}
else
@@ -82,6 +92,11 @@
return FALSE;
}
+ if ('\\' != *p)
+ {
+ return FALSE;
+ }
+
strcpy(BootPath, p);
return TRUE;
Show replies by date