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
nexedi
linux
Commits
d1b76f6c
Commit
d1b76f6c
authored
Dec 28, 2002
by
Jeff Dike
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Converted a bunch of inititializers in the drivers that I missed.
parent
e39f1f42
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
58 additions
and
57 deletions
+58
-57
arch/um/drivers/null.c
arch/um/drivers/null.c
+10
-10
arch/um/drivers/pcap_kern.c
arch/um/drivers/pcap_kern.c
+21
-21
arch/um/drivers/pcap_user.c
arch/um/drivers/pcap_user.c
+10
-10
arch/um/drivers/port_kern.c
arch/um/drivers/port_kern.c
+17
-16
No files found.
arch/um/drivers/null.c
View file @
d1b76f6c
...
...
@@ -32,16 +32,16 @@ void null_free(void *data)
}
struct
chan_ops
null_ops
=
{
type:
"null"
,
init:
null_init
,
open:
null_open
,
close:
generic_close
,
read:
null_read
,
write:
generic_write
,
console_write:
generic_console_write
,
window_size:
generic_window_size
,
free:
null_free
,
winch:
0
,
.
type
=
"null"
,
.
init
=
null_init
,
.
open
=
null_open
,
.
close
=
generic_close
,
.
read
=
null_read
,
.
write
=
generic_write
,
.
console_write
=
generic_console_write
,
.
window_size
=
generic_window_size
,
.
free
=
null_free
,
.
winch
=
0
,
};
/*
...
...
arch/um/drivers/pcap_kern.c
View file @
d1b76f6c
...
...
@@ -27,12 +27,12 @@ void pcap_init(struct net_device *dev, void *data)
pri
=
dev
->
priv
;
ppri
=
(
struct
pcap_data
*
)
pri
->
user
;
*
ppri
=
((
struct
pcap_data
)
{
host_if
:
init
->
host_if
,
promisc
:
init
->
promisc
,
optimize
:
init
->
optimize
,
filter
:
init
->
filter
,
compiled
:
NULL
,
pcap
:
NULL
});
{
.
host_if
=
init
->
host_if
,
.
promisc
=
init
->
promisc
,
.
optimize
=
init
->
optimize
,
.
filter
=
init
->
filter
,
.
compiled
=
NULL
,
.
pcap
=
NULL
});
}
static
int
pcap_read
(
int
fd
,
struct
sk_buff
**
skb
,
...
...
@@ -51,10 +51,10 @@ static int pcap_write(int fd, struct sk_buff **skb, struct uml_net_private *lp)
}
static
struct
net_kern_info
pcap_kern_info
=
{
init:
pcap_init
,
protocol:
eth_protocol
,
read:
pcap_read
,
write:
pcap_write
,
.
init
=
pcap_init
,
.
protocol
=
eth_protocol
,
.
read
=
pcap_read
,
.
write
=
pcap_write
,
};
int
pcap_setup
(
char
*
str
,
char
**
mac_out
,
void
*
data
)
...
...
@@ -64,10 +64,10 @@ int pcap_setup(char *str, char **mac_out, void *data)
int
i
;
*
init
=
((
struct
pcap_init
)
{
host_if
:
"eth0"
,
promisc
:
1
,
optimize
:
0
,
filter
:
NULL
});
{
.
host_if
=
"eth0"
,
.
promisc
=
1
,
.
optimize
=
0
,
.
filter
=
NULL
});
remain
=
split_if_spec
(
str
,
&
host_if
,
&
init
->
filter
,
&
options
[
0
],
&
options
[
1
],
NULL
);
...
...
@@ -98,13 +98,13 @@ int pcap_setup(char *str, char **mac_out, void *data)
}
static
struct
transport
pcap_transport
=
{
list
:
LIST_HEAD_INIT
(
pcap_transport
.
list
),
name
:
"pcap"
,
setup
:
pcap_setup
,
user
:
&
pcap_user_info
,
kern
:
&
pcap_kern_info
,
private_size
:
sizeof
(
struct
pcap_data
),
setup_size
:
sizeof
(
struct
pcap_init
),
.
list
=
LIST_HEAD_INIT
(
pcap_transport
.
list
),
.
name
=
"pcap"
,
.
setup
=
pcap_setup
,
.
user
=
&
pcap_user_info
,
.
kern
=
&
pcap_kern_info
,
.
private_size
=
sizeof
(
struct
pcap_data
),
.
setup_size
=
sizeof
(
struct
pcap_init
),
};
static
int
register_pcap
(
void
)
...
...
arch/um/drivers/pcap_user.c
View file @
d1b76f6c
...
...
@@ -106,8 +106,8 @@ static void handler(u_char *data, const struct pcap_pkthdr *header,
int
pcap_user_read
(
int
fd
,
void
*
buffer
,
int
len
,
struct
pcap_data
*
pri
)
{
struct
pcap_handler_data
hdata
=
((
struct
pcap_handler_data
)
{
buffer
:
buffer
,
len
:
len
});
{
.
buffer
=
buffer
,
.
len
=
len
});
int
n
;
n
=
pcap_dispatch
(
pri
->
pcap
,
1
,
handler
,
(
u_char
*
)
&
hdata
);
...
...
@@ -121,14 +121,14 @@ int pcap_user_read(int fd, void *buffer, int len, struct pcap_data *pri)
}
struct
net_user_info
pcap_user_info
=
{
init:
pcap_user_init
,
open:
pcap_open
,
close:
NULL
,
remove:
pcap_remove
,
set_mtu:
NULL
,
add_address:
NULL
,
delete_address:
NULL
,
max_packet:
MAX_PACKET
-
ETH_HEADER_OTHER
.
init
=
pcap_user_init
,
.
open
=
pcap_open
,
.
close
=
NULL
,
.
remove
=
pcap_remove
,
.
set_mtu
=
NULL
,
.
add_address
=
NULL
,
.
delete_address
=
NULL
,
.
max_packet
=
MAX_PACKET
-
ETH_HEADER_OTHER
};
/*
...
...
arch/um/drivers/port_kern.c
View file @
d1b76f6c
...
...
@@ -85,11 +85,11 @@ static int port_accept(struct port_list *port)
goto
out_close
;
}
*
conn
=
((
struct
connection
)
{
list
:
LIST_HEAD_INIT
(
conn
->
list
),
fd
:
fd
,
socket
:
{
socket
[
0
],
socket
[
1
]
},
telnetd_pid
:
pid
,
port
:
port
});
{
.
list
=
LIST_HEAD_INIT
(
conn
->
list
),
.
fd
=
fd
,
.
socket
=
{
socket
[
0
],
socket
[
1
]
},
.
telnetd_pid
=
pid
,
.
port
=
port
});
if
(
um_request_irq
(
TELNETD_IRQ
,
socket
[
0
],
IRQ_READ
,
pipe_interrupt
,
SA_INTERRUPT
|
SA_SHIRQ
|
SA_SAMPLE_RANDOM
,
...
...
@@ -174,14 +174,15 @@ void *port_data(int port_num)
}
*
port
=
((
struct
port_list
)
{
list
:
LIST_HEAD_INIT
(
port
->
list
),
has_connection
:
0
,
sem
:
__SEMAPHORE_INITIALIZER
(
port
->
sem
,
0
),
lock
:
SPIN_LOCK_UNLOCKED
,
port
:
port_num
,
fd
:
fd
,
pending
:
LIST_HEAD_INIT
(
port
->
pending
),
connections
:
LIST_HEAD_INIT
(
port
->
connections
)
});
{
.
list
=
LIST_HEAD_INIT
(
port
->
list
),
.
has_connection
=
0
,
.
sem
=
__SEMAPHORE_INITIALIZER
(
port
->
sem
,
0
),
.
lock
=
SPIN_LOCK_UNLOCKED
,
.
port
=
port_num
,
.
fd
=
fd
,
.
pending
=
LIST_HEAD_INIT
(
port
->
pending
),
.
connections
=
LIST_HEAD_INIT
(
port
->
connections
)
});
list_add
(
&
port
->
list
,
&
ports
);
found:
...
...
@@ -191,9 +192,9 @@ void *port_data(int port_num)
goto
out
;
}
*
dev
=
((
struct
port_dev
)
{
port
:
port
,
fd
:
-
1
,
helper_pid
:
-
1
});
*
dev
=
((
struct
port_dev
)
{
.
port
=
port
,
.
helper_pid
=
-
1
,
.
telnetd_pid
=
-
1
});
goto
out
;
out_free:
...
...
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