PATCH 2.4: edd.c display %u, remove REPORT_URL

From: Matt Domsch
Date: Tue Jun 22 2004 - 12:13:18 EST


Marcelo,

Patch against 2.4.27-rc1. This removes the REPORT_URL string and
message telling people to send me their BIOS info. I've got a huge
number of reports, and virtually all show that EDD 3.0 is not
supported, or if supported, is likely implemented in ways contrary to
the spec. In 2.7.x I may bring the REPORT_URL back once I've got a
better way to track the data being sent to me.

Also, this now reports the EDD geometry (if known) and number of
sectors using %u instead of %x, to be consistent with what is in 2.6.7
now.

Thanks,
Matt

--
Matt Domsch
Sr. Software Engineer, Lead Engineer
Dell Linux Solutions linux.dell.com & www.dell.com/linux
Linux on Dell mailing lists @ http://lists.us.dell.com


===== arch/i386/kernel/edd.c 1.3 vs edited =====
--- 1.3/arch/i386/kernel/edd.c 2003-12-05 12:46:25 -06:00
+++ edited/arch/i386/kernel/edd.c 2004-06-21 15:41:01 -05:00
@@ -46,9 +46,8 @@
MODULE_DESCRIPTION("proc interface to BIOS EDD information");
MODULE_LICENSE("GPL");

-#define EDD_VERSION "0.10 2003-Dec-05"
+#define EDD_VERSION "0.11 2004-Jun-21"
#define EDD_DEVICE_NAME_SIZE 16
-#define REPORT_URL "http://domsch.com/linux/edd30/results.html";

#define left (count - (p - page) - 1)

@@ -312,10 +311,6 @@
}

out:
- p += snprintf(p, left, "\nPlease check %s\n", REPORT_URL);
- p += snprintf(p, left, "to see if this device has been reported. If not,\n");
- p += snprintf(p, left, "please send the information requested there.\n");
-
return proc_calc_metrics(page, start, off, count, eof, (p - page));
}

@@ -405,7 +400,7 @@
return proc_calc_metrics(page, start, off, count, eof, 0);
}

- p += snprintf(p, left, "0x%x\n", info->params.num_default_cylinders);
+ p += snprintf(p, left, "%u\n", info->params.num_default_cylinders);
return proc_calc_metrics(page, start, off, count, eof, (p - page));
}

@@ -418,7 +413,7 @@
return proc_calc_metrics(page, start, off, count, eof, 0);
}

- p += snprintf(p, left, "0x%x\n", info->params.num_default_heads);
+ p += snprintf(p, left, "%u\n", info->params.num_default_heads);
return proc_calc_metrics(page, start, off, count, eof, (p - page));
}

@@ -431,7 +426,7 @@
return proc_calc_metrics(page, start, off, count, eof, 0);
}

- p += snprintf(p, left, "0x%x\n", info->params.sectors_per_track);
+ p += snprintf(p, left, "%u\n", info->params.sectors_per_track);
return proc_calc_metrics(page, start, off, count, eof, (p - page));
}

@@ -444,7 +439,7 @@
return proc_calc_metrics(page, start, off, count, eof, 0);
}

- p += snprintf(p, left, "0x%llx\n", info->params.number_of_sectors);
+ p += snprintf(p, left, "%llu\n", info->params.number_of_sectors);
return proc_calc_metrics(page, start, off, count, eof, (p - page));
}

Attachment: pgp00000.pgp
Description: PGP signature