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
6dfb870f
Commit
6dfb870f
authored
Apr 20, 2003
by
Christoph Hellwig
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[PATCH] devfs: rd
parent
024548b8
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
13 deletions
+5
-13
drivers/block/rd.c
drivers/block/rd.c
+5
-13
No files found.
drivers/block/rd.c
View file @
6dfb870f
...
...
@@ -370,11 +370,9 @@ static void __exit rd_cleanup (void)
}
del_gendisk
(
rd_disks
[
i
]);
put_disk
(
rd_disks
[
i
]);
devfs_remove
(
"rd/%d"
,
i
);
}
#ifdef CONFIG_BLK_DEV_INITRD
put_disk
(
initrd_disk
);
devfs_remove
(
"rd/initrd"
);
#endif
devfs_remove
(
"rd"
);
unregister_blkdev
(
RAMDISK_MAJOR
,
"ramdisk"
);
...
...
@@ -402,7 +400,9 @@ static int __init rd_init (void)
initrd_disk
->
first_minor
=
INITRD_MINOR
;
initrd_disk
->
fops
=
&
rd_bd_op
;
sprintf
(
initrd_disk
->
disk_name
,
"initrd"
);
sprintf
(
initrd_disk
->
devfs_name
,
"rd/initrd"
);
#endif
for
(
i
=
0
;
i
<
NUM_RAMDISKS
;
i
++
)
{
rd_disks
[
i
]
=
alloc_disk
(
1
);
if
(
!
rd_disks
[
i
])
...
...
@@ -420,30 +420,22 @@ static int __init rd_init (void)
for
(
i
=
0
;
i
<
NUM_RAMDISKS
;
i
++
)
{
struct
gendisk
*
disk
=
rd_disks
[
i
];
char
name
[
16
];
/* rd_size is given in kB */
disk
->
major
=
RAMDISK_MAJOR
;
disk
->
first_minor
=
i
;
disk
->
fops
=
&
rd_bd_op
;
disk
->
queue
=
&
rd_queue
;
sprintf
(
disk
->
disk_name
,
"ram%d"
,
i
);
sprintf
(
disk
->
devfs_name
,
"rd/%d"
,
i
);
set_capacity
(
disk
,
rd_size
*
2
);
sprintf
(
name
,
"rd/%d"
,
i
);
devfs_register
(
NULL
,
name
,
DEVFS_FL_DEFAULT
,
disk
->
major
,
disk
->
first_minor
,
S_IFBLK
|
S_IRUSR
|
S_IWUSR
,
disk
->
fops
,
NULL
);
}
for
(
i
=
0
;
i
<
NUM_RAMDISKS
;
i
++
)
add_disk
(
rd_disks
[
i
]);
}
#ifdef CONFIG_BLK_DEV_INITRD
/* We ought to separate initrd operations here */
set_capacity
(
initrd_disk
,
(
initrd_end
-
initrd_start
+
511
)
>>
9
);
add_disk
(
initrd_disk
);
devfs_register
(
NULL
,
"rd/initrd"
,
DEVFS_FL_DEFAULT
,
RAMDISK_MAJOR
,
INITRD_MINOR
,
S_IFBLK
|
S_IRUSR
,
&
rd_bd_op
,
NULL
);
#endif
/* rd_size is given in kB */
...
...
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