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
7af15440
Commit
7af15440
authored
Apr 20, 2003
by
Christoph Hellwig
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[PATCH] devfs: loop
This and the next patches switches over drivers to gendisk.devfs_name.
parent
995058f2
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 addition
and
7 deletions
+1
-7
drivers/block/loop.c
drivers/block/loop.c
+1
-7
No files found.
drivers/block/loop.c
View file @
7af15440
...
...
@@ -1143,7 +1143,6 @@ int __init loop_init(void)
}
for
(
i
=
0
;
i
<
max_loop
;
i
++
)
{
char
name
[
16
];
struct
loop_device
*
lo
=
&
loop_dev
[
i
];
struct
gendisk
*
disk
=
disks
[
i
];
memset
(
lo
,
0
,
sizeof
(
*
lo
));
...
...
@@ -1156,14 +1155,10 @@ int __init loop_init(void)
disk
->
first_minor
=
i
;
disk
->
fops
=
&
lo_fops
;
sprintf
(
disk
->
disk_name
,
"loop%d"
,
i
);
sprintf
(
disk
->
devfs_name
,
"loop/%d"
,
i
);
disk
->
private_data
=
lo
;
disk
->
queue
=
&
lo
->
lo_queue
;
add_disk
(
disk
);
sprintf
(
name
,
"loop/%d"
,
i
);
devfs_register
(
NULL
,
name
,
DEVFS_FL_DEFAULT
,
disk
->
major
,
disk
->
first_minor
,
S_IFBLK
|
S_IRUSR
|
S_IWUSR
|
S_IRGRP
,
disk
->
fops
,
NULL
);
}
printk
(
KERN_INFO
"loop: loaded (max %d devices)
\n
"
,
max_loop
);
return
0
;
...
...
@@ -1184,7 +1179,6 @@ void loop_exit(void)
for
(
i
=
0
;
i
<
max_loop
;
i
++
)
{
del_gendisk
(
disks
[
i
]);
put_disk
(
disks
[
i
]);
devfs_remove
(
"loop/%d"
,
i
);
}
devfs_remove
(
"loop"
);
if
(
unregister_blkdev
(
LOOP_MAJOR
,
"loop"
))
...
...
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