patch-2.3.99-pre9 linux/drivers/net/ppp_synctty.c

Next file: linux/drivers/net/pppoe.c
Previous file: linux/drivers/net/pcnet32.c
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v2.3.99-pre8/linux/drivers/net/ppp_synctty.c linux/drivers/net/ppp_synctty.c
@@ -269,12 +269,22 @@
 
 	err = -EFAULT;
 	switch (cmd) {
-	case PPPIOCGUNIT:
+	case PPPIOCGCHAN:
 		err = -ENXIO;
 		if (ap == 0)
 			break;
 		err = -EFAULT;
 		if (put_user(ppp_channel_index(&ap->chan), (int *) arg))
+			break;
+		err = 0;
+		break;
+
+	case PPPIOCGUNIT:
+		err = -ENXIO;
+		if (ap == 0)
+			break;
+		err = -EFAULT;
+		if (put_user(ppp_unit_number(&ap->chan), (int *) arg))
 			break;
 		err = 0;
 		break;

FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)