patch-2.1.44 linux/drivers/sbus/char/openprom.c

Next file: linux/drivers/sbus/char/suncons.c
Previous file: linux/drivers/sbus/char/leo.c
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v2.1.43/linux/drivers/sbus/char/openprom.c linux/drivers/sbus/char/openprom.c
@@ -137,6 +137,7 @@
 	struct openpromio *opp;
 	unsigned long flags;
 	int bufsize, len, error = 0;
+	extern char saved_command_line[];
 
 	if (cmd == OPROMSETOPT)
 		bufsize = getstrings((void *)arg, &opp);
@@ -172,7 +173,7 @@
 	case OPROMNXTOPT:
 	case OPROMNXTPROP:
 		save_and_cli(flags);
-		buf = prom_nextprop(node, opp->oprom_array);
+		buf = prom_nextprop(node, opp->oprom_array, buffer);
 		restore_flags(flags);
 
 		len = strlen(buf);
@@ -229,9 +230,7 @@
 		break;
 
 	case OPROMGETBOOTARGS:
-		save_and_cli(flags);
-		buf = prom_getbootargs();
-		restore_flags(flags);
+		buf = saved_command_line;
 
 		len = strlen(buf);
 
@@ -315,6 +314,7 @@
 	unsigned long flags;
 	int error, node, len;
 	char *str, *tmp;
+	char buffer[64];
 
 	switch (cmd) {
 	case OPIOCGET:
@@ -378,7 +378,7 @@
 			return error;
 
 		save_and_cli(flags);
-		tmp = prom_nextprop(op.op_nodeid,str);
+		tmp = prom_nextprop(op.op_nodeid,str,buffer);
 		restore_flags(flags);
 
 		if (tmp) {

FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen, slshen@lbl.gov