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
a25b982e
Commit
a25b982e
authored
May 25, 2003
by
Ben Collins
Committed by
Linus Torvalds
May 25, 2003
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[PATCH] A few more strlcpy's for drivers/base/
parent
faad0c27
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
4 deletions
+4
-4
drivers/base/bus.c
drivers/base/bus.c
+2
-2
drivers/base/sys.c
drivers/base/sys.c
+2
-2
No files found.
drivers/base/bus.c
View file @
a25b982e
...
@@ -544,11 +544,11 @@ int bus_register(struct bus_type * bus)
...
@@ -544,11 +544,11 @@ int bus_register(struct bus_type * bus)
subsys_set_kset
(
bus
,
bus_subsys
);
subsys_set_kset
(
bus
,
bus_subsys
);
subsystem_register
(
&
bus
->
subsys
);
subsystem_register
(
&
bus
->
subsys
);
s
nprintf
(
bus
->
devices
.
kobj
.
name
,
KOBJ_NAME_LEN
,
"devices"
);
s
trlcpy
(
bus
->
devices
.
kobj
.
name
,
"devices"
,
KOBJ_NAME_LEN
);
bus
->
devices
.
subsys
=
&
bus
->
subsys
;
bus
->
devices
.
subsys
=
&
bus
->
subsys
;
kset_register
(
&
bus
->
devices
);
kset_register
(
&
bus
->
devices
);
s
nprintf
(
bus
->
drivers
.
kobj
.
name
,
KOBJ_NAME_LEN
,
"drivers"
);
s
trlcpy
(
bus
->
drivers
.
kobj
.
name
,
"drivers"
,
KOBJ_NAME_LEN
);
bus
->
drivers
.
subsys
=
&
bus
->
subsys
;
bus
->
drivers
.
subsys
=
&
bus
->
subsys
;
bus
->
drivers
.
ktype
=
&
ktype_driver
;
bus
->
drivers
.
ktype
=
&
ktype_driver
;
kset_register
(
&
bus
->
drivers
);
kset_register
(
&
bus
->
drivers
);
...
...
drivers/base/sys.c
View file @
a25b982e
...
@@ -63,8 +63,8 @@ int sys_register_root(struct sys_root * root)
...
@@ -63,8 +63,8 @@ int sys_register_root(struct sys_root * root)
error
=
device_register
(
&
root
->
dev
);
error
=
device_register
(
&
root
->
dev
);
if
(
!
error
)
{
if
(
!
error
)
{
str
n
cpy
(
root
->
sysdev
.
bus_id
,
"sys"
,
BUS_ID_SIZE
);
str
l
cpy
(
root
->
sysdev
.
bus_id
,
"sys"
,
BUS_ID_SIZE
);
str
n
cpy
(
root
->
sysdev
.
name
,
"System Bus"
,
DEVICE_NAME_SIZE
);
str
l
cpy
(
root
->
sysdev
.
name
,
"System Bus"
,
DEVICE_NAME_SIZE
);
root
->
sysdev
.
parent
=
&
root
->
dev
;
root
->
sysdev
.
parent
=
&
root
->
dev
;
error
=
device_register
(
&
root
->
sysdev
);
error
=
device_register
(
&
root
->
sysdev
);
};
};
...
...
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