Author: alexander
Date: 2006-09-07 23:48:17 -0600 (Thu, 07 Sep 2006)
New Revision: 1719
Modified:
branches/6.2/packages/initramfs/init.c
Log:
Previously, due to a programming error (reuse of the loop variable
for other purpose inside the loop) the CD wouldn't find itself when booting
from /dev/hdd if /dev/hdb contained a wrong CD. This bug is now fixed.
Modified: branches/6.2/packages/initramfs/init.c
===================================================================
--- branches/6.2/packages/initramfs/init.c 2006-09-06 03:41:57 UTC (rev
1718)
+++ branches/6.2/packages/initramfs/init.c 2006-09-08 05:48:17 UTC (rev
1719)
@@ -16,7 +16,7 @@
{
"/dev/hda", "/dev/hdb", "/dev/hdc", "/dev/hdd", "/dev/hde", "/dev/hdf",
"/dev/hdg", "/dev/hdh",
"/dev/sr0", "/dev/sr1", "/dev/sr2", "/dev/sr3", "/dev/sr4", "/dev/sr5",
"/dev/sr6", "/dev/sr7",
- NULL,
+ NULL
};
const char *lfscd;
@@ -181,6 +181,7 @@
{
struct iso_primary_descriptor pd;
int i;
+ int correct_cd;
for(i=0;devices[i]!=NULL;i++)
{
@@ -236,8 +237,8 @@
/* Compare the string in pd.volume_id with the VOLUME_ID
generated by the livecd Makefiles */
- i = strncmp(VOLUME_ID, pd.volume_id, strlen(VOLUME_ID));
- if (i!=0) {
+ correct_cd = strncmp(VOLUME_ID, pd.volume_id,
strlen(VOLUME_ID));
+ if (correct_cd!=0) {
printf("This is not the correct CD. Moving on...\n");
close(fd);
continue;
--
http://linuxfromscratch.org/mailman/listinfo/livecd
FAQ: http://www.linuxfromscratch.org/faq/
Unsubscribe: See the above information page