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
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] = {
};
struct
exec_domain
default_exec_domain
=
{
"Linux"
,
/* name */
default_handler
,
/* lcall7 causes a seg fault. */
0
,
0
,
/* PER_LINUX personality. */
ident_map
,
/* Identity map signals. */
ident_map
,
/* - both ways. */
.
name
=
"Linux"
,
/* name */
.
handler
=
default_handler
,
/* lcall7 causes a seg fault. */
.
pers_low
=
0
,
/* PER_LINUX personality. */
.
pers_high
=
0
,
/* PER_LINUX personality. */
.
signal_map
=
ident_map
,
/* Identity map signals. */
.
signal_invmap
=
ident_map
,
/* - both ways. */
};
...
...
@@ -247,24 +248,65 @@ u_int abi_traceflg;
int
abi_fake_utsname
;
static
struct
ctl_table
abi_table
[]
=
{
{
ABI_DEFHANDLER_COFF
,
"defhandler_coff"
,
&
abi_defhandler_coff
,
sizeof
(
int
),
0644
,
NULL
,
&
proc_doulongvec_minmax
},
{
ABI_DEFHANDLER_ELF
,
"defhandler_elf"
,
&
abi_defhandler_elf
,
sizeof
(
int
),
0644
,
NULL
,
&
proc_doulongvec_minmax
},
{
ABI_DEFHANDLER_LCALL7
,
"defhandler_lcall7"
,
&
abi_defhandler_lcall7
,
sizeof
(
int
),
0644
,
NULL
,
&
proc_doulongvec_minmax
},
{
ABI_DEFHANDLER_LIBCSO
,
"defhandler_libcso"
,
&
abi_defhandler_libcso
,
sizeof
(
int
),
0644
,
NULL
,
&
proc_doulongvec_minmax
},
{
ABI_TRACE
,
"trace"
,
&
abi_traceflg
,
sizeof
(
u_int
),
0644
,
NULL
,
&
proc_dointvec
},
{
ABI_FAKE_UTSNAME
,
"fake_utsname"
,
&
abi_fake_utsname
,
sizeof
(
int
),
0644
,
NULL
,
&
proc_dointvec
},
{
0
}
{
.
ctl_name
=
ABI_DEFHANDLER_COFF
,
.
procname
=
"defhandler_coff"
,
.
data
=
&
abi_defhandler_coff
,
.
maxlen
=
sizeof
(
int
),
.
mode
=
0644
,
.
proc_handler
=
&
proc_doulongvec_minmax
,
},
{
.
ctl_name
=
ABI_DEFHANDLER_ELF
,
.
procname
=
"defhandler_elf"
,
.
data
=
&
abi_defhandler_elf
,
.
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
[]
=
{
{
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
...
...
kernel/resource.c
View file @
6f79387d
...
...
@@ -20,8 +20,19 @@
#include <asm/io.h>
struct
resource
ioport_resource
=
{
"PCI IO"
,
0x0000
,
IO_SPACE_LIMIT
,
IORESOURCE_IO
};
struct
resource
iomem_resource
=
{
"PCI mem"
,
0UL
,
~
0UL
,
IORESOURCE_MEM
};
struct
resource
ioport_resource
=
{
.
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
;
...
...
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