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
f8659451
Commit
f8659451
authored
Aug 25, 2002
by
Richard Gooch
Browse files
Options
Browse Files
Download
Plain Diff
Merge atnf.csiro.au:/workaholix1/kernel/v2.5/linus
into atnf.csiro.au:/workaholix1/kernel/v2.5/rgooch-2.5
parents
44a706d5
ec47835c
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
38 additions
and
16 deletions
+38
-16
Documentation/filesystems/devfs/ChangeLog
Documentation/filesystems/devfs/ChangeLog
+8
-0
Documentation/filesystems/devfs/README
Documentation/filesystems/devfs/README
+12
-2
fs/devfs/base.c
fs/devfs/base.c
+18
-12
include/linux/devfs_fs_kernel.h
include/linux/devfs_fs_kernel.h
+0
-2
No files found.
Documentation/filesystems/devfs/ChangeLog
View file @
f8659451
...
...
@@ -1957,3 +1957,11 @@ Changes for patch v216
<devfs_get_handle>
- Removed deprecated <devfs_find_handle>
===============================================================================
Changes for patch v217
- Exported <devfs_find_and_unregister> and <devfs_only> to modules
- Updated README from master HTML file
- Fixed module unload race in <devfs_open>
Documentation/filesystems/devfs/README
View file @
f8659451
...
...
@@ -3,7 +3,7 @@ Devfs (Device File System) FAQ
Linux Devfs (Device File System) FAQ
Richard Gooch
2
1-JUL
-2002
2
0-AUG
-2002
Document languages:
...
...
@@ -1509,6 +1509,16 @@ Here are some common questions and answers.
Devfsd doesn't start
Make sure you have compiled and installed devfsd
Make sure devfsd is being started from your boot
scripts
Make sure you have configured your kernel to enable devfs (see
below)
Make sure devfs is mounted (see below)
Devfsd is not managing all my permissions
Make sure you are capturing the appropriate events. For example,
...
...
@@ -1777,7 +1787,7 @@ I hate the naming scheme
First, remember that no naming scheme will please everybody. You hate
the scheme, others love it. Who's to say who's right and who's wrong?
Ultimately, the person who writes the code gets to choose, and what
exists now is a combination of the
the
choices made by the
exists now is a combination of the choices made by the
devfs author and the
kernel maintainer (Linus).
...
...
fs/devfs/base.c
View file @
f8659451
...
...
@@ -645,6 +645,9 @@
20020728 Richard Gooch <rgooch@atnf.csiro.au>
Removed deprecated <devfs_find_handle>.
v1.20
20020820 Richard Gooch <rgooch@atnf.csiro.au>
Fixed module unload race in <devfs_open>.
v1.21
*/
#include <linux/types.h>
#include <linux/errno.h>
...
...
@@ -677,7 +680,7 @@
#include <asm/bitops.h>
#include <asm/atomic.h>
#define DEVFS_VERSION "1.2
0 (20020728
)"
#define DEVFS_VERSION "1.2
1 (20020820
)"
#define DEVFS_NAME "devfs"
...
...
@@ -2228,16 +2231,15 @@ const char *devfs_get_name (devfs_handle_t de, unsigned int *namelen)
/**
* devfs_only - returns if "devfs=only" is a boot option
* devfs_only - returns
true
if "devfs=only" is a boot option
*
* If "devfs=only" this function will return 1, otherwise 0 is returned.
*/
int
devfs_only
(
void
)
{
if
(
boot_options
&
OPTION_ONLY
)
return
1
;
return
0
;
}
return
(
boot_options
&
OPTION_ONLY
)
?
1
:
0
;
}
/* End Function devfs_only */
/**
...
...
@@ -2312,6 +2314,7 @@ EXPORT_SYMBOL(devfs_unregister);
EXPORT_SYMBOL
(
devfs_mk_symlink
);
EXPORT_SYMBOL
(
devfs_mk_dir
);
EXPORT_SYMBOL
(
devfs_get_handle
);
EXPORT_SYMBOL
(
devfs_find_and_unregister
);
EXPORT_SYMBOL
(
devfs_get_flags
);
EXPORT_SYMBOL
(
devfs_set_flags
);
EXPORT_SYMBOL
(
devfs_get_maj_min
);
...
...
@@ -2327,6 +2330,7 @@ EXPORT_SYMBOL(devfs_get_next_sibling);
EXPORT_SYMBOL
(
devfs_auto_unregister
);
EXPORT_SYMBOL
(
devfs_get_unregister_slave
);
EXPORT_SYMBOL
(
devfs_get_name
);
EXPORT_SYMBOL
(
devfs_only
);
/**
...
...
@@ -2382,7 +2386,7 @@ static int check_disc_changed (struct devfs_entry *de)
extern
int
warn_no_part
;
if
(
!
S_ISBLK
(
de
->
mode
)
)
return
0
;
bdev
=
bdget
(
kdev_t_to_nr
(
dev
)
);
bdev
=
bdget
(
kdev_t_to_nr
(
dev
)
);
if
(
!
bdev
)
return
0
;
bdops
=
devfs_get_ops
(
de
);
if
(
!
bdops
)
return
0
;
...
...
@@ -2390,7 +2394,7 @@ static int check_disc_changed (struct devfs_entry *de)
/* Ugly hack to disable messages about unable to read partition table */
tmp
=
warn_no_part
;
warn_no_part
=
0
;
retval
=
full_check_disk_change
(
bdev
);
retval
=
full_check_disk_change
(
bdev
);
warn_no_part
=
tmp
;
out:
devfs_put_ops
(
de
);
...
...
@@ -2692,21 +2696,23 @@ static int devfs_open (struct inode *inode, struct file *file)
struct
fcb_type
*
df
;
struct
devfs_entry
*
de
;
struct
fs_info
*
fs_info
=
inode
->
i_sb
->
u
.
generic_sbp
;
void
*
ops
;
de
=
get_devfs_entry_from_vfs_inode
(
inode
);
if
(
de
==
NULL
)
return
-
ENODEV
;
if
(
S_ISDIR
(
de
->
mode
)
)
return
0
;
df
=
&
de
->
u
.
fcb
;
file
->
private_data
=
de
->
info
;
ops
=
devfs_get_ops
(
de
);
/* Now have module refcount */
if
(
S_ISBLK
(
inode
->
i_mode
)
)
{
file
->
f_op
=
&
def_blk_fops
;
if
(
df
->
ops
)
inode
->
i_bdev
->
bd_op
=
df
->
ops
;
err
=
def_blk_fops
.
open
(
inode
,
file
);
if
(
ops
)
inode
->
i_bdev
->
bd_op
=
ops
;
err
=
def_blk_fops
.
open
(
inode
,
file
);
/* Module refcount unchanged */
}
else
{
file
->
f_op
=
fops_get
(
(
struct
file_operations
*
)
df
->
ops
)
;
file
->
f_op
=
ops
;
if
(
file
->
f_op
)
{
lock_kernel
();
...
...
@@ -2714,7 +2720,7 @@ static int devfs_open (struct inode *inode, struct file *file)
unlock_kernel
();
}
else
{
/* Fallback to legacy scheme */
{
/* Fallback to legacy scheme
(I don't have a module refcount)
*/
if
(
S_ISCHR
(
inode
->
i_mode
)
)
err
=
chrdev_open
(
inode
,
file
);
else
err
=
-
ENODEV
;
}
...
...
include/linux/devfs_fs_kernel.h
View file @
f8659451
...
...
@@ -95,7 +95,6 @@ extern void devfs_auto_unregister (devfs_handle_t master,devfs_handle_t slave);
extern
devfs_handle_t
devfs_get_unregister_slave
(
devfs_handle_t
master
);
extern
const
char
*
devfs_get_name
(
devfs_handle_t
de
,
unsigned
int
*
namelen
);
extern
int
devfs_only
(
void
);
extern
void
devfs_register_tape
(
devfs_handle_t
de
);
extern
void
devfs_register_series
(
devfs_handle_t
dir
,
const
char
*
format
,
unsigned
int
num_entries
,
...
...
@@ -238,7 +237,6 @@ static inline int devfs_only (void)
{
return
0
;
}
static
inline
void
devfs_register_tape
(
devfs_handle_t
de
)
{
return
;
...
...
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