Hi,
I have made the corrections as per the below comments, the patch shows no indentation in
linux.
Plz find the patch in the attachment.
Regards
Balaji Singh
----------------------------------------------------------------------------------------------------------------------------------
diff -rau anaconda-13.21.176_old/isys/eddsupport.c anaconda-13.21.176/isys/eddsupport.c
--- anaconda-13.21.176_old/isys/eddsupport.c 2012-06-12 15:40:09.000000000 -0400
+++ anaconda-13.21.176/isys/eddsupport.c 2012-10-01 09:46:40.399867053 -0400
@@ -47,6 +47,7 @@
#define HASH_TABLE_SIZE 17
+uint8_t bios_disk_err = 0;
struct diskMapEntry{
uint32_t key;
@@ -323,7 +324,7 @@
struct diskMapEntry * disk;
int ret;
- if (diskHashInit == 0) {
+ if (diskHashInit == 0 || bios_disk_err == 1) {
probeBiosDisks();
diskHashInit = 1;
}
@@ -333,7 +334,14 @@
ret = sscanf(biosStr,"%x",&biosNum);
disk = lookupHashItem(mbrSigToName, biosNum);
- if (disk) return disk->diskname;
+ if (disk) {
+ bios_disk_err = 0;
+ return disk->diskname;
+ }
+ else {
+ bios_disk_err = 1;
+ }
+
return NULL;
}
diff -rau anaconda-13.21.176_old/loader/hdinstall.c
anaconda-13.21.176/loader/hdinstall.c
--- anaconda-13.21.176_old/loader/hdinstall.c 2012-06-12 15:40:09.000000000 -0400
+++ anaconda-13.21.176/loader/hdinstall.c 2012-10-01 09:57:35.189892680 -0400
@@ -54,6 +54,7 @@
/* boot flags */
extern uint64_t flags;
+extern uint8_t bios_disk_err;
/* given a partition device and directory, tries to mount hd install image */
static char * setupIsoImages(char * device, char * dirName, char * location) {
int rc = 0;
@@ -448,7 +449,7 @@
int kickstartFromBD(char *kssrc) {
- int rc;
+ int rc, iter=0;
char *p, *np = NULL, *r = NULL, *tmpstr, *ksdev, *kspath, *biosksdev;
logMessage(INFO, "getting kickstart file from biosdrive");
@@ -478,6 +479,12 @@
*r = '\0';
biosksdev = getBiosDisk((p + 1));
+ /*Probing the bios disks for 5 times or waiting for 30 seconds */
+ for (iter = 0; bios_disk_err && iter< 5; ++iter){
+ logMessage(INFO, "Probing the bios storage devices, Retry count is %d out of
5, Sleeping for %d seconds", (iter+1),(1 << iter));
+ sleep(1 << iter);
+ biosksdev = getBiosDisk((p + 1));
+ }
if(!biosksdev){
startNewt();
newtWinMessage(_("Error"), _("OK"),
Only in anaconda-13.21.176: slow_bios_disk_err.patch
---------------------------------------------------------------------------------------------------------------
-----Original Message-----
From: anaconda-patches-bounces(a)lists.fedorahosted.org
[mailto:anaconda-patches-bounces@lists.fedorahosted.org] On Behalf Of Vratislav Podzimek
Sent: Monday, October 01, 2012 1:07 PM
To: anaconda patch review
Subject: Re: cannot find the hard drive for bios disk 80
+ if (disk) {
+ bios_disk_err = 0;
+ return disk->diskname;
+ }
+ else {
+ bios_disk_err = 1;
+ }
Please stick with the indentation style of the file (and also the rest of your
changes).
+ /*Probing the bios disks for 5 times or waiting for 30 seconds
*/
+ for(iter=0;bios_disk_err && iter< 5;++iter){
^^ whitespace
+ logMessage(INFO, "Probing the bios storage devices, Retry
count
is %d out of 5, Sleeping for %d seconds", (iter+1),(1 << iter));
+ sleep(1 << iter);
^^ whitespace
+ biosksdev = getBiosDisk((p + 1));
No need for the double parentheses.
Otherwise it looks good to me, just please note that using 'git send-email' [1]
makes it easier for us to review the patch(es).
[1]
http://www.kernel.org/pub/software/scm/git/docs/git-send-email.html
--
Vratislav Podzimek
Anaconda Rider | Red Hat, Inc. | Brno - Czech Republic
_______________________________________________
anaconda-patches mailing list
anaconda-patches(a)lists.fedorahosted.org
https://lists.fedorahosted.org/mailman/listinfo/anaconda-patches