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
68274007
Commit
68274007
authored
Oct 04, 2008
by
Alexey Dobriyan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
proc: move /proc/filesystems to fs/filesystems.c
Signed-off-by:
Alexey Dobriyan
<
adobriyan@gmail.com
>
parent
4c150f6c
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
39 additions
and
8 deletions
+39
-8
fs/filesystems.c
fs/filesystems.c
+39
-0
fs/proc/proc_misc.c
fs/proc/proc_misc.c
+0
-8
No files found.
fs/filesystems.c
View file @
68274007
...
...
@@ -8,6 +8,8 @@
#include <linux/syscalls.h>
#include <linux/fs.h>
#include <linux/proc_fs.h>
#include <linux/seq_file.h>
#include <linux/slab.h>
#include <linux/kmod.h>
#include <linux/init.h>
...
...
@@ -214,6 +216,43 @@ int get_filesystem_list(char * buf)
return
len
;
}
#ifdef CONFIG_PROC_FS
static
int
filesystems_proc_show
(
struct
seq_file
*
m
,
void
*
v
)
{
struct
file_system_type
*
tmp
;
read_lock
(
&
file_systems_lock
);
tmp
=
file_systems
;
while
(
tmp
)
{
seq_printf
(
m
,
"%s
\t
%s
\n
"
,
(
tmp
->
fs_flags
&
FS_REQUIRES_DEV
)
?
""
:
"nodev"
,
tmp
->
name
);
tmp
=
tmp
->
next
;
}
read_unlock
(
&
file_systems_lock
);
return
0
;
}
static
int
filesystems_proc_open
(
struct
inode
*
inode
,
struct
file
*
file
)
{
return
single_open
(
file
,
filesystems_proc_show
,
NULL
);
}
static
const
struct
file_operations
filesystems_proc_fops
=
{
.
open
=
filesystems_proc_open
,
.
read
=
seq_read
,
.
llseek
=
seq_lseek
,
.
release
=
single_release
,
};
static
int
__init
proc_filesystems_init
(
void
)
{
proc_create
(
"filesystems"
,
0
,
NULL
,
&
filesystems_proc_fops
);
return
0
;
}
module_init
(
proc_filesystems_init
);
#endif
struct
file_system_type
*
get_fs_type
(
const
char
*
name
)
{
struct
file_system_type
*
fs
;
...
...
fs/proc/proc_misc.c
View file @
68274007
...
...
@@ -472,13 +472,6 @@ static const struct file_operations proc_interrupts_operations = {
.
release
=
seq_release
,
};
static
int
filesystems_read_proc
(
char
*
page
,
char
**
start
,
off_t
off
,
int
count
,
int
*
eof
,
void
*
data
)
{
int
len
=
get_filesystem_list
(
page
);
return
proc_calc_metrics
(
page
,
start
,
off
,
count
,
eof
,
len
);
}
static
int
cmdline_read_proc
(
char
*
page
,
char
**
start
,
off_t
off
,
int
count
,
int
*
eof
,
void
*
data
)
{
...
...
@@ -648,7 +641,6 @@ void __init proc_misc_init(void)
char
*
name
;
int
(
*
read_proc
)(
char
*
,
char
**
,
off_t
,
int
,
int
*
,
void
*
);
}
*
p
,
simple_ones
[]
=
{
{
"filesystems"
,
filesystems_read_proc
},
{
"cmdline"
,
cmdline_read_proc
},
{
"execdomains"
,
execdomains_read_proc
},
{
NULL
,}
...
...
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