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
6f79387d
Commit
6f79387d
authored
Jun 03, 2003
by
Art Haas
Committed by
James Bottomley
Jun 03, 2003
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[PATCH] C99 struct initializers for kernel files
parent
6be13f9a
Changes
3
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
641 additions
and
172 deletions
+641
-172
kernel/exec_domain.c
kernel/exec_domain.c
+62
-20
kernel/resource.c
kernel/resource.c
+13
-2
kernel/sysctl.c
kernel/sysctl.c
+566
-150
No files found.
kernel/exec_domain.c
View file @
6f79387d
...
@@ -32,11 +32,12 @@ static u_long ident_map[32] = {
...
@@ -32,11 +32,12 @@ static u_long ident_map[32] = {
};
};
struct
exec_domain
default_exec_domain
=
{
struct
exec_domain
default_exec_domain
=
{
"Linux"
,
/* name */
.
name
=
"Linux"
,
/* name */
default_handler
,
/* lcall7 causes a seg fault. */
.
handler
=
default_handler
,
/* lcall7 causes a seg fault. */
0
,
0
,
/* PER_LINUX personality. */
.
pers_low
=
0
,
/* PER_LINUX personality. */
ident_map
,
/* Identity map signals. */
.
pers_high
=
0
,
/* PER_LINUX personality. */
ident_map
,
/* - both ways. */
.
signal_map
=
ident_map
,
/* Identity map signals. */
.
signal_invmap
=
ident_map
,
/* - both ways. */
};
};
...
@@ -247,24 +248,65 @@ u_int abi_traceflg;
...
@@ -247,24 +248,65 @@ u_int abi_traceflg;
int
abi_fake_utsname
;
int
abi_fake_utsname
;
static
struct
ctl_table
abi_table
[]
=
{
static
struct
ctl_table
abi_table
[]
=
{
{
ABI_DEFHANDLER_COFF
,
"defhandler_coff"
,
&
abi_defhandler_coff
,
{
sizeof
(
int
),
0644
,
NULL
,
&
proc_doulongvec_minmax
},
.
ctl_name
=
ABI_DEFHANDLER_COFF
,
{
ABI_DEFHANDLER_ELF
,
"defhandler_elf"
,
&
abi_defhandler_elf
,
.
procname
=
"defhandler_coff"
,
sizeof
(
int
),
0644
,
NULL
,
&
proc_doulongvec_minmax
},
.
data
=
&
abi_defhandler_coff
,
{
ABI_DEFHANDLER_LCALL7
,
"defhandler_lcall7"
,
&
abi_defhandler_lcall7
,
.
maxlen
=
sizeof
(
int
),
sizeof
(
int
),
0644
,
NULL
,
&
proc_doulongvec_minmax
},
.
mode
=
0644
,
{
ABI_DEFHANDLER_LIBCSO
,
"defhandler_libcso"
,
&
abi_defhandler_libcso
,
.
proc_handler
=
&
proc_doulongvec_minmax
,
sizeof
(
int
),
0644
,
NULL
,
&
proc_doulongvec_minmax
},
},
{
ABI_TRACE
,
"trace"
,
&
abi_traceflg
,
{
sizeof
(
u_int
),
0644
,
NULL
,
&
proc_dointvec
},
.
ctl_name
=
ABI_DEFHANDLER_ELF
,
{
ABI_FAKE_UTSNAME
,
"fake_utsname"
,
&
abi_fake_utsname
,
.
procname
=
"defhandler_elf"
,
sizeof
(
int
),
0644
,
NULL
,
&
proc_dointvec
},
.
data
=
&
abi_defhandler_elf
,
{
0
}
.
maxlen
=
sizeof
(
int
),
.
mode
=
0644
,
.
proc_handler
=
&
proc_doulongvec_minmax
,
},
{
.
ctl_name
=
ABI_DEFHANDLER_LCALL7
,
.
procname
=
"defhandler_lcall7"
,
.
data
=
&
abi_defhandler_lcall7
,
.
maxlen
=
sizeof
(
int
),
.
mode
=
0644
,
.
proc_handler
=
&
proc_doulongvec_minmax
,
},
{
.
ctl_name
=
ABI_DEFHANDLER_LIBCSO
,
.
procname
=
"defhandler_libcso"
,
.
data
=
&
abi_defhandler_libcso
,
.
maxlen
=
sizeof
(
int
),
.
mode
=
0644
,
.
proc_handler
=
&
proc_doulongvec_minmax
,
},
{
.
ctl_name
=
ABI_TRACE
,
.
procname
=
"trace"
,
.
data
=
&
abi_traceflg
,
.
maxlen
=
sizeof
(
u_int
),
.
mode
=
0644
,
.
proc_handler
=
&
proc_dointvec
,
},
{
.
ctl_name
=
ABI_FAKE_UTSNAME
,
.
procname
=
"fake_utsname"
,
.
data
=
&
abi_fake_utsname
,
.
maxlen
=
sizeof
(
int
),
.
mode
=
0644
,
.
proc_handler
=
&
proc_dointvec
,
},
{
.
ctl_name
=
0
}
};
};
static
struct
ctl_table
abi_root_table
[]
=
{
static
struct
ctl_table
abi_root_table
[]
=
{
{
CTL_ABI
,
"abi"
,
NULL
,
0
,
0555
,
abi_table
},
{
{
0
}
.
ctl_name
=
CTL_ABI
,
.
procname
=
"abi"
,
.
mode
=
0555
,
.
child
=
abi_table
,
},
{
.
ctl_name
=
0
}
};
};
static
int
__init
static
int
__init
...
...
kernel/resource.c
View file @
6f79387d
...
@@ -20,8 +20,19 @@
...
@@ -20,8 +20,19 @@
#include <asm/io.h>
#include <asm/io.h>
struct
resource
ioport_resource
=
{
"PCI IO"
,
0x0000
,
IO_SPACE_LIMIT
,
IORESOURCE_IO
};
struct
resource
ioport_resource
=
{
struct
resource
iomem_resource
=
{
"PCI mem"
,
0UL
,
~
0UL
,
IORESOURCE_MEM
};
.
name
=
"PCI IO"
,
.
start
=
0x0000
,
.
end
=
IO_SPACE_LIMIT
,
.
flags
=
IORESOURCE_IO
,
};
struct
resource
iomem_resource
=
{
.
name
=
"PCI mem"
,
.
start
=
0UL
,
.
end
=
~
0UL
,
.
flags
=
IORESOURCE_MEM
,
};
static
rwlock_t
resource_lock
=
RW_LOCK_UNLOCKED
;
static
rwlock_t
resource_lock
=
RW_LOCK_UNLOCKED
;
...
...
kernel/sysctl.c
View file @
6f79387d
This diff is collapsed.
Click to expand it.
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