From: Krzysztof Halasa <khc@pm.waw.pl>
To: <linux-kernel@vger.kernel.org>
Cc: Alan Cox <alan@redhat.com>, Adrian Bunk <bunk@fs.tum.de>,
Jeff Garzik <jgarzik@mandrakesoft.com>,
Linus Torvalds <torvalds@transmeta.com>
Subject: Re: Linux 2.5.44-ac1
Date: 23 Oct 2002 14:53:41 +0200 [thread overview]
Message-ID: <m3bs5lb9ka.fsf@defiant.pm.waw.pl> (raw)
In-Reply-To: <Pine.NEB.4.44.0210222147230.1359-100000@mimas.fachschaften.tu-muenchen.de>
[-- Attachment #1: Type: text/plain, Size: 973 bytes --]
Adrian Bunk <bunk@fs.tum.de> writes:
> > o Clean up wan ioctl structures (Krzysztof Halasa)
> This caused the following compile error:
Ooops... Looks like my make-patch script needs an upgrade.
> --- linux-2.5.44-full-ac/drivers/net/wan/hdlc_x25.c.old 2002-10-22 21:38:32.000000000 +0200
> +++ linux-2.5.44-full-ac/drivers/net/wan/hdlc_x25.c 2002-10-22 21:38:51.000000000 +0200
> @@ -184,9 +184,9 @@
> struct net_device *dev = hdlc_to_dev(hdlc);
> int result;
>
> - switch (ifr->ifr_settings->type) {
> + switch (ifr->ifr_settings.type) {
> case IF_GET_PROTO:
> - ifr->ifr_settings->type = IF_PROTO_X25;
> + ifr->ifr_settings.type = IF_PROTO_X25;
> return 0; /* return protocol only, no settable parameters */
>
> case IF_PROTO_X25:
Exactly.
The missing part of the patch is attached below.
--
Krzysztof Halasa
Network Administrator
If you've sent me email recently and it remains unanswered, please try once
again. HDD crash might have eaten it :-(
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: hdlc-2.5.43-part2.patch --]
[-- Type: text/x-patch, Size: 2533 bytes --]
--- linux-2.5.orig/drivers/net/wan/hdlc_x25.c 2002-10-01 09:07:50.000000000 +0200
+++ linux-2.5/drivers/net/wan/hdlc_x25.c 2002-10-19 01:07:57.000000000 +0200
@@ -184,9 +184,9 @@
struct net_device *dev = hdlc_to_dev(hdlc);
int result;
- switch (ifr->ifr_settings->type) {
+ switch (ifr->ifr_settings.type) {
case IF_GET_PROTO:
- ifr->ifr_settings->type = IF_PROTO_X25;
+ ifr->ifr_settings.type = IF_PROTO_X25;
return 0; /* return protocol only, no settable parameters */
case IF_PROTO_X25:
--- linux-2.5.orig/drivers/net/wan/pc300_drv.c 2002-10-01 09:07:40.000000000 +0200
+++ linux-2.5/drivers/net/wan/pc300_drv.c 2002-10-19 01:10:16.000000000 +0200
@@ -2542,7 +2542,7 @@
pc300chconf_t *conf = (pc300chconf_t *) & chan->conf;
int ch = chan->channel;
void *arg = (void *) ifr->ifr_data;
- union line_settings * line = &ifr->ifr_settings->ifs_line;
+ struct if_settings *settings = &ifr->ifr_settings;
uclong scabase = card->hw.scabase;
if (!capable(CAP_NET_ADMIN))
@@ -2741,13 +2741,19 @@
}
case SIOCWANDEV:
- switch (ifr->ifr_settings->type) {
+ switch (ifr->ifr_settings.type) {
case IF_GET_IFACE:
{
const size_t size = sizeof(sync_serial_settings);
- ifr->ifr_settings->type = conf->media;
+ ifr->ifr_settings.type = conf->media;
+ if (ifr->ifr_settings.size < size) {
+ /* data size wanted */
+ ifr->ifr_settings.size = size;
+ return -ENOBUFS;
+ }
- if (copy_to_user(&line->sync, &conf->phys_settings, size)) {
+ if (copy_to_user(settings->ifs_ifsu.sync,
+ &conf->phys_settings, size)) {
return -EFAULT;
}
return 0;
@@ -2764,7 +2770,7 @@
}
if (copy_from_user(&conf->phys_settings,
- &line->sync, size)) {
+ settings->ifs_ifsu.sync, size)) {
return -EFAULT;
}
@@ -2773,7 +2779,7 @@
cpc_readb(card->hw.scabase + M_REG(MD2, ch)) |
MD2_LOOP_MIR);
}
- conf->media = ifr->ifr_settings->type;
+ conf->media = ifr->ifr_settings.type;
return 0;
}
@@ -2787,7 +2793,7 @@
}
if (copy_from_user(&conf->phys_settings,
- &line->te1, size)) {
+ settings->ifs_ifsu.te1, size)) {
return -EFAULT;
}/* Ignoring HDLC slot_map for a while */
@@ -2796,7 +2802,7 @@
cpc_readb(card->hw.scabase + M_REG(MD2, ch)) |
MD2_LOOP_MIR);
}
- conf->media = ifr->ifr_settings->type;
+ conf->media = ifr->ifr_settings.type;
return 0;
}
default:
next prev parent reply other threads:[~2002-10-23 12:49 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2002-10-22 17:27 Alan Cox
2002-10-22 17:56 ` Nicholas Wourms
2002-10-22 18:20 ` Alan Cox
2002-10-22 18:29 ` Steven Cole
2002-10-22 19:45 ` Andres Salomon
2002-10-22 22:53 ` Nicholas Wourms
2002-10-23 1:11 ` Andres Salomon
2002-10-22 19:58 ` Adrian Bunk
2002-10-23 12:53 ` Krzysztof Halasa [this message]
2002-10-22 22:12 ` Mark Haverkamp
2002-10-23 11:39 ` Jason Williams
2002-10-23 11:49 ` Alan Cox
2002-10-23 12:09 ` Jason Williams
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=m3bs5lb9ka.fsf@defiant.pm.waw.pl \
--to=khc@pm.waw.pl \
--cc=alan@redhat.com \
--cc=bunk@fs.tum.de \
--cc=jgarzik@mandrakesoft.com \
--cc=linux-kernel@vger.kernel.org \
--cc=torvalds@transmeta.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
Powered by JetHome