Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
L
linux
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
linux
Commits
f77bdc6f
Commit
f77bdc6f
authored
Sep 06, 2004
by
Andi Kleen
Committed by
Patrick McHardy
Sep 06, 2004
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[NET]: Fix CONFIG_COMPAT build with networking disabled.
Signed-off-by:
David S. Miller
<
davem@davemloft.net
>
parent
5a6bdc92
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
5 deletions
+8
-5
fs/compat_ioctl.c
fs/compat_ioctl.c
+6
-4
net/Makefile
net/Makefile
+2
-1
No files found.
fs/compat_ioctl.c
View file @
f77bdc6f
...
@@ -15,6 +15,7 @@
...
@@ -15,6 +15,7 @@
#include <linux/types.h>
#include <linux/types.h>
#include <linux/compat.h>
#include <linux/compat.h>
#include <linux/kernel.h>
#include <linux/kernel.h>
#include <linux/compiler.h>
#include <linux/sched.h>
#include <linux/sched.h>
#include <linux/smp.h>
#include <linux/smp.h>
#include <linux/smp_lock.h>
#include <linux/smp_lock.h>
...
@@ -407,6 +408,7 @@ static int do_video_ioctl(unsigned int fd, unsigned int cmd, unsigned long arg)
...
@@ -407,6 +408,7 @@ static int do_video_ioctl(unsigned int fd, unsigned int cmd, unsigned long arg)
return
err
;
return
err
;
}
}
#ifdef CONFIG_NET
static
int
do_siocgstamp
(
unsigned
int
fd
,
unsigned
int
cmd
,
unsigned
long
arg
)
static
int
do_siocgstamp
(
unsigned
int
fd
,
unsigned
int
cmd
,
unsigned
long
arg
)
{
{
struct
compat_timeval
__user
*
up
=
compat_ptr
(
arg
);
struct
compat_timeval
__user
*
up
=
compat_ptr
(
arg
);
...
@@ -461,7 +463,6 @@ struct ifconf32 {
...
@@ -461,7 +463,6 @@ struct ifconf32 {
compat_caddr_t
ifcbuf
;
compat_caddr_t
ifcbuf
;
};
};
#ifdef CONFIG_NET
static
int
dev_ifname32
(
unsigned
int
fd
,
unsigned
int
cmd
,
unsigned
long
arg
)
static
int
dev_ifname32
(
unsigned
int
fd
,
unsigned
int
cmd
,
unsigned
long
arg
)
{
{
struct
net_device
*
dev
;
struct
net_device
*
dev
;
...
@@ -481,7 +482,6 @@ static int dev_ifname32(unsigned int fd, unsigned int cmd, unsigned long arg)
...
@@ -481,7 +482,6 @@ static int dev_ifname32(unsigned int fd, unsigned int cmd, unsigned long arg)
err
=
copy_to_user
(
compat_ptr
(
arg
),
&
ifr32
,
sizeof
(
ifr32
));
err
=
copy_to_user
(
compat_ptr
(
arg
),
&
ifr32
,
sizeof
(
ifr32
));
return
(
err
?
-
EFAULT
:
0
);
return
(
err
?
-
EFAULT
:
0
);
}
}
#endif
static
int
dev_ifconf
(
unsigned
int
fd
,
unsigned
int
cmd
,
unsigned
long
arg
)
static
int
dev_ifconf
(
unsigned
int
fd
,
unsigned
int
cmd
,
unsigned
long
arg
)
{
{
...
@@ -797,6 +797,7 @@ static int routing_ioctl(unsigned int fd, unsigned int cmd, unsigned long arg)
...
@@ -797,6 +797,7 @@ static int routing_ioctl(unsigned int fd, unsigned int cmd, unsigned long arg)
return
ret
;
return
ret
;
}
}
#endif
struct
hd_geometry32
{
struct
hd_geometry32
{
unsigned
char
heads
;
unsigned
char
heads
;
...
@@ -1872,7 +1873,8 @@ static int do_atm_ioctl(unsigned int fd, unsigned int cmd32, unsigned long arg)
...
@@ -1872,7 +1873,8 @@ static int do_atm_ioctl(unsigned int fd, unsigned int cmd32, unsigned long arg)
return
-
EINVAL
;
return
-
EINVAL
;
}
}
static
int
ret_einval
(
unsigned
int
fd
,
unsigned
int
cmd
,
unsigned
long
arg
)
static
__attribute_used__
int
ret_einval
(
unsigned
int
fd
,
unsigned
int
cmd
,
unsigned
long
arg
)
{
{
return
-
EINVAL
;
return
-
EINVAL
;
}
}
...
@@ -3162,7 +3164,6 @@ HANDLE_IOCTL(MEMREADOOB32, mtd_rw_oob)
...
@@ -3162,7 +3164,6 @@ HANDLE_IOCTL(MEMREADOOB32, mtd_rw_oob)
HANDLE_IOCTL
(
MEMWRITEOOB32
,
mtd_rw_oob
)
HANDLE_IOCTL
(
MEMWRITEOOB32
,
mtd_rw_oob
)
#ifdef CONFIG_NET
#ifdef CONFIG_NET
HANDLE_IOCTL
(
SIOCGIFNAME
,
dev_ifname32
)
HANDLE_IOCTL
(
SIOCGIFNAME
,
dev_ifname32
)
#endif
HANDLE_IOCTL
(
SIOCGIFCONF
,
dev_ifconf
)
HANDLE_IOCTL
(
SIOCGIFCONF
,
dev_ifconf
)
HANDLE_IOCTL
(
SIOCGIFFLAGS
,
dev_ifsioc
)
HANDLE_IOCTL
(
SIOCGIFFLAGS
,
dev_ifsioc
)
HANDLE_IOCTL
(
SIOCSIFFLAGS
,
dev_ifsioc
)
HANDLE_IOCTL
(
SIOCSIFFLAGS
,
dev_ifsioc
)
...
@@ -3206,6 +3207,7 @@ HANDLE_IOCTL(SIOCBRDELIF, dev_ifsioc)
...
@@ -3206,6 +3207,7 @@ HANDLE_IOCTL(SIOCBRDELIF, dev_ifsioc)
/* Note SIOCRTMSG is no longer, so this is safe and * the user would have seen just an -EINVAL anyways. */
/* Note SIOCRTMSG is no longer, so this is safe and * the user would have seen just an -EINVAL anyways. */
HANDLE_IOCTL
(
SIOCRTMSG
,
ret_einval
)
HANDLE_IOCTL
(
SIOCRTMSG
,
ret_einval
)
HANDLE_IOCTL
(
SIOCGSTAMP
,
do_siocgstamp
)
HANDLE_IOCTL
(
SIOCGSTAMP
,
do_siocgstamp
)
#endif
HANDLE_IOCTL
(
HDIO_GETGEO
,
hdio_getgeo
)
HANDLE_IOCTL
(
HDIO_GETGEO
,
hdio_getgeo
)
HANDLE_IOCTL
(
BLKRAGET
,
w_long
)
HANDLE_IOCTL
(
BLKRAGET
,
w_long
)
HANDLE_IOCTL
(
BLKGETSIZE
,
w_long
)
HANDLE_IOCTL
(
BLKGETSIZE
,
w_long
)
...
...
net/Makefile
View file @
f77bdc6f
...
@@ -9,7 +9,8 @@ obj-y := nonet.o
...
@@ -9,7 +9,8 @@ obj-y := nonet.o
obj-$(CONFIG_NET)
:=
socket.o core/
obj-$(CONFIG_NET)
:=
socket.o core/
obj-$(CONFIG_COMPAT)
+=
compat.o
tmp-$(CONFIG_COMPAT)
:=
compat.o
obj-$(CONFIG_NET)
+=
$
(
tmp-y
)
# LLC has to be linked before the files in net/802/
# LLC has to be linked before the files in net/802/
obj-$(CONFIG_LLC)
+=
llc/
obj-$(CONFIG_LLC)
+=
llc/
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment