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
1ec13f9f
Commit
1ec13f9f
authored
Jul 30, 2002
by
Patrick Mochel
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
driverfs: add device_remove_symlink wrapper for removing symlinks (since driverfs
API is just about to change...)
parent
5ff7eed2
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
7 additions
and
1 deletion
+7
-1
drivers/base/base.h
drivers/base/base.h
+1
-0
drivers/base/bus.c
drivers/base/bus.c
+1
-1
drivers/base/fs.c
drivers/base/fs.c
+5
-0
No files found.
drivers/base/base.h
View file @
1ec13f9f
...
@@ -17,6 +17,7 @@ extern int device_make_dir(struct device * dev);
...
@@ -17,6 +17,7 @@ extern int device_make_dir(struct device * dev);
extern
void
device_remove_dir
(
struct
device
*
dev
);
extern
void
device_remove_dir
(
struct
device
*
dev
);
extern
int
device_bus_link
(
struct
device
*
dev
);
extern
int
device_bus_link
(
struct
device
*
dev
);
extern
void
device_remove_symlink
(
struct
driver_dir_entry
*
dir
,
const
char
*
name
);
extern
int
driver_attach
(
struct
device_driver
*
drv
);
extern
int
driver_attach
(
struct
device_driver
*
drv
);
extern
void
driver_detach
(
struct
device_driver
*
drv
);
extern
void
driver_detach
(
struct
device_driver
*
drv
);
drivers/base/bus.c
View file @
1ec13f9f
...
@@ -140,7 +140,7 @@ int bus_add_device(struct device * dev)
...
@@ -140,7 +140,7 @@ int bus_add_device(struct device * dev)
void
bus_remove_device
(
struct
device
*
dev
)
void
bus_remove_device
(
struct
device
*
dev
)
{
{
if
(
dev
->
bus
)
{
if
(
dev
->
bus
)
{
d
riverfs_remove_file
(
&
dev
->
bus
->
device_dir
,
dev
->
bus_id
);
d
evice_remove_symlink
(
&
dev
->
bus
->
device_dir
,
dev
->
bus_id
);
write_lock
(
&
dev
->
bus
->
lock
);
write_lock
(
&
dev
->
bus
->
lock
);
list_del_init
(
&
dev
->
bus_list
);
list_del_init
(
&
dev
->
bus_list
);
write_unlock
(
&
dev
->
bus
->
lock
);
write_unlock
(
&
dev
->
bus
->
lock
);
...
...
drivers/base/fs.c
View file @
1ec13f9f
...
@@ -127,6 +127,11 @@ int device_bus_link(struct device * dev)
...
@@ -127,6 +127,11 @@ int device_bus_link(struct device * dev)
return
error
;
return
error
;
}
}
void
device_remove_symlink
(
struct
driver_dir_entry
*
dir
,
const
char
*
name
)
{
driverfs_remove_file
(
dir
,
name
);
}
int
device_create_dir
(
struct
driver_dir_entry
*
dir
,
struct
driver_dir_entry
*
parent
)
int
device_create_dir
(
struct
driver_dir_entry
*
dir
,
struct
driver_dir_entry
*
parent
)
{
{
dir
->
mode
=
(
S_IFDIR
|
S_IRWXU
|
S_IRUGO
|
S_IXUGO
);
dir
->
mode
=
(
S_IFDIR
|
S_IRWXU
|
S_IRUGO
|
S_IXUGO
);
...
...
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