patch-2.3.99-pre4 linux/drivers/block/xd.c
Next file: linux/drivers/char/Config.in
Previous file: linux/drivers/block/rd.c
Back to the patch index
Back to the overall index
- Lines: 71
- Date:
Sun Apr 2 15:38:53 2000
- Orig file:
v2.3.99-pre3/linux/drivers/block/xd.c
- Orig date:
Wed Feb 16 17:03:51 2000
diff -u --recursive --new-file v2.3.99-pre3/linux/drivers/block/xd.c linux/drivers/block/xd.c
@@ -1059,7 +1059,7 @@
}
/* xd_setup: initialise controler from command line parameters */
-void __init xd_setup (char *command,int *integers)
+void __init do_xd_setup (int *integers)
{
switch (integers[0]) {
case 4: if (integers[4] < 0)
@@ -1079,21 +1079,6 @@
xd_maxsectors = 0x01;
}
-#ifndef MODULE
-/* xd_manual_geo_init: initialise drive geometry from command line parameters
- (used only for WD drives) */
-void __init xd_manual_geo_init (char *command,int *integers)
-{
- int i;
- if (integers[0]%3 != 0) {
- printk("xd: incorrect number of parameters for xd_geo\n");
- return;
- }
- for (i = 0; (i < integers[0]) && (i < 3*XD_MAXDRIVES); i++)
- xd_geo[i] = integers[i+1];
-}
-#endif /* MODULE */
-
/* xd_setparam: set the drive characteristics */
static void __init xd_setparam (u_char command,u_char drive,u_char heads,u_short cylinders,u_short rwrite,u_short wprecomp,u_char ecc)
{
@@ -1149,7 +1134,7 @@
if(((xd[i] = xd[i-1]) >= 0) && !count)
count = i;
if((xd[0] = count))
- xd_setup(NULL, xd);
+ do_xd_setup(xd);
if (error = xd_init())
return error;
@@ -1190,6 +1175,30 @@
}
}
#else
+
+static int __init xd_setup (char *str)
+{
+ int ints[5];
+ get_options (str, ARRAY_SIZE (ints), ints);
+ do_xd_setup (ints);
+ return 1;
+}
+
+/* xd_manual_geo_init: initialise drive geometry from command line parameters
+ (used only for WD drives) */
+static int __init xd_manual_geo_init (char *str)
+{
+ int i, integers[1 + 3*XD_MAXDRIVES];
+
+ get_options (str, ARRAY_SIZE (ints), ints);
+ if (integers[0]%3 != 0) {
+ printk("xd: incorrect number of parameters for xd_geo\n");
+ return 1;
+ }
+ for (i = 0; (i < integers[0]) && (i < 3*XD_MAXDRIVES); i++)
+ xd_geo[i] = integers[i+1];
+ return 1;
+}
__setup ("xd=", xd_setup);
__setup ("xd_geo=", xd_manual_geo_init);
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)