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
47fff65a
Commit
47fff65a
authored
Jul 28, 2002
by
Richard Gooch
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Removed deprecated devfs_find_handle()
parent
d45db7c2
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
42 additions
and
44 deletions
+42
-44
Documentation/filesystems/devfs/ChangeLog
Documentation/filesystems/devfs/ChangeLog
+7
-0
arch/ia64/sn/io/hcl.c
arch/ia64/sn/io/hcl.c
+30
-15
fs/devfs/base.c
fs/devfs/base.c
+5
-17
include/linux/devfs_fs_kernel.h
include/linux/devfs_fs_kernel.h
+0
-12
No files found.
Documentation/filesystems/devfs/ChangeLog
View file @
47fff65a
...
...
@@ -1950,3 +1950,10 @@ Changes for patch v215
<devfs_find_and_unregister>
- Switched many functions from <devfs_find_handle> to <devfs_get_handle>
===============================================================================
Changes for patch v216
- Switched arch/ia64/sn/io/hcl.c from <devfs_find_handle> to
<devfs_get_handle>
- Removed deprecated <devfs_find_handle>
arch/ia64/sn/io/hcl.c
View file @
47fff65a
...
...
@@ -673,8 +673,9 @@ hwgraph_edge_get(devfs_handle_t from, char *name, devfs_handle_t *toptr)
* Call devfs to get the devfs entry.
*/
namelen
=
(
int
)
strlen
(
name
);
target_handle
=
devfs_
find_handle
(
from
,
name
,
0
,
0
,
target_handle
=
devfs_
get_handle
(
from
,
name
,
0
,
0
,
0
,
1
);
/* Yes traverse symbolic links */
devfs_put
(
target_handle
);
/* Assume we're the owner */
if
(
target_handle
==
NULL
)
return
(
-
1
);
else
...
...
@@ -952,12 +953,13 @@ hwgraph_path_lookup( devfs_handle_t start_vertex_handle,
devfs_handle_t
*
vertex_handle_ptr
,
char
**
remainder
)
{
*
vertex_handle_ptr
=
devfs_
find
_handle
(
start_vertex_handle
,
/* start dir */
*
vertex_handle_ptr
=
devfs_
get
_handle
(
start_vertex_handle
,
/* start dir */
lookup_path
,
/* path */
0
,
/* major */
0
,
/* minor */
0
,
/* char | block */
1
);
/* traverse symlinks */
devfs_put
(
*
vertex_handle_ptr
);
/* Assume we're the owner */
if
(
*
vertex_handle_ptr
==
NULL
)
return
(
-
1
);
else
...
...
@@ -965,22 +967,23 @@ hwgraph_path_lookup( devfs_handle_t start_vertex_handle,
}
/*
* hwgraph_traverse - Find and return the devfs handle starting from d
e
.
* hwgraph_traverse - Find and return the devfs handle starting from d
ir
.
*
*/
graph_error_t
hwgraph_traverse
(
devfs_handle_t
d
e
,
char
*
path
,
devfs_handle_t
*
found
)
hwgraph_traverse
(
devfs_handle_t
d
ir
,
char
*
path
,
devfs_handle_t
*
found
)
{
/*
* get the directory entry (path should end in a directory)
*/
*
found
=
devfs_
find_handle
(
de
,
/* start dir */
*
found
=
devfs_
get_handle
(
dir
,
/* start dir */
path
,
/* path */
0
,
/* major */
0
,
/* minor */
0
,
/* char | block */
1
);
/* traverse symlinks */
devfs_put
(
*
found
);
/* Assume we're the owner */
if
(
*
found
==
NULL
)
return
(
GRAPH_NOT_FOUND
);
else
...
...
@@ -994,12 +997,16 @@ hwgraph_traverse(devfs_handle_t de, char *path, devfs_handle_t *found)
devfs_handle_t
hwgraph_path_to_vertex
(
char
*
path
)
{
return
(
devfs_find_handle
(
NULL
,
/* start dir */
devfs_handle_t
de
;
de
=
devfs_get_handle
(
NULL
,
/* start dir */
path
,
/* path */
0
,
/* major */
0
,
/* minor */
0
,
/* char | block */
1
));
/* traverse symlinks */
1
);
devfs_put
(
de
);
/* Assume we're the owner */
return
(
de
);
}
/*
...
...
@@ -1017,32 +1024,40 @@ hwgraph_path_to_dev(char *path)
/*
* hwgraph_block_device_get - return the handle of the block device file.
* The assumption here is that d
e
is a directory.
* The assumption here is that d
ir
is a directory.
*/
devfs_handle_t
hwgraph_block_device_get
(
devfs_handle_t
d
e
)
hwgraph_block_device_get
(
devfs_handle_t
d
ir
)
{
return
(
devfs_find_handle
(
de
,
/* start dir */
devfs_handle_t
de
;
de
=
devfs_get_handle
(
dir
,
/* start dir */
"block"
,
/* path */
0
,
/* major */
0
,
/* minor */
DEVFS_SPECIAL_BLK
,
/* char | block */
1
));
/* traverse symlinks */
1
);
/* traverse symlinks */
devfs_put
(
de
);
/* Assume we're the owner */
return
(
de
);
}
/*
* hwgraph_char_device_get - return the handle of the char device file.
* The assumption here is that d
e
is a directory.
* The assumption here is that d
ir
is a directory.
*/
devfs_handle_t
hwgraph_char_device_get
(
devfs_handle_t
d
e
)
hwgraph_char_device_get
(
devfs_handle_t
d
ir
)
{
return
(
devfs_find_handle
(
de
,
/* start dir */
devfs_handle_t
de
;
de
=
devfs_get_handle
(
dir
,
/* start dir */
"char"
,
/* path */
0
,
/* major */
0
,
/* minor */
DEVFS_SPECIAL_CHR
,
/* char | block */
1
));
/* traverse symlinks */
1
);
/* traverse symlinks */
devfs_put
(
de
);
/* Assume we're the owner */
return
(
de
);
}
/*
...
...
fs/devfs/base.c
View file @
47fff65a
...
...
@@ -642,6 +642,9 @@
20020725 Richard Gooch <rgooch@atnf.csiro.au>
Created <devfs_find_and_unregister>.
v1.19
20020728 Richard Gooch <rgooch@atnf.csiro.au>
Removed deprecated <devfs_find_handle>.
v1.20
*/
#include <linux/types.h>
#include <linux/errno.h>
...
...
@@ -674,7 +677,7 @@
#include <asm/bitops.h>
#include <asm/atomic.h>
#define DEVFS_VERSION "1.
19 (20020725
)"
#define DEVFS_VERSION "1.
20 (20020728
)"
#define DEVFS_NAME "devfs"
...
...
@@ -1889,26 +1892,12 @@ void devfs_find_and_unregister (devfs_handle_t dir, const char *name,
char
type
,
int
traverse_symlinks
)
{
devfs_handle_t
de
=
devfs_get_handle
(
dir
,
name
,
major
,
minor
,
type
,
traverse_symlinks
);
type
,
traverse_symlinks
);
devfs_unregister
(
de
);
devfs_put
(
de
);
}
/* Compatibility function. Will be removed in sometime in 2.5 */
devfs_handle_t
devfs_find_handle
(
devfs_handle_t
dir
,
const
char
*
name
,
unsigned
int
major
,
unsigned
int
minor
,
char
type
,
int
traverse_symlinks
)
{
devfs_handle_t
de
;
de
=
devfs_get_handle
(
dir
,
name
,
major
,
minor
,
type
,
traverse_symlinks
);
devfs_put
(
de
);
return
de
;
}
/* End Function devfs_find_handle */
/**
* devfs_get_flags - Get the flags for a devfs entry.
* @de: The handle to the device entry.
...
...
@@ -2381,7 +2370,6 @@ EXPORT_SYMBOL(devfs_unregister);
EXPORT_SYMBOL
(
devfs_mk_symlink
);
EXPORT_SYMBOL
(
devfs_mk_dir
);
EXPORT_SYMBOL
(
devfs_get_handle
);
EXPORT_SYMBOL
(
devfs_find_handle
);
EXPORT_SYMBOL
(
devfs_get_flags
);
EXPORT_SYMBOL
(
devfs_set_flags
);
EXPORT_SYMBOL
(
devfs_get_maj_min
);
...
...
include/linux/devfs_fs_kernel.h
View file @
47fff65a
...
...
@@ -77,9 +77,6 @@ extern devfs_handle_t devfs_get_handle (devfs_handle_t dir, const char *name,
extern
void
devfs_find_and_unregister
(
devfs_handle_t
dir
,
const
char
*
name
,
unsigned
int
major
,
unsigned
int
minor
,
char
type
,
int
traverse_symlinks
);
extern
devfs_handle_t
devfs_find_handle
(
devfs_handle_t
dir
,
const
char
*
name
,
unsigned
int
major
,
unsigned
int
minor
,
char
type
,
int
traverse_symlinks
);
extern
int
devfs_get_flags
(
devfs_handle_t
de
,
unsigned
int
*
flags
);
extern
int
devfs_set_flags
(
devfs_handle_t
de
,
unsigned
int
flags
);
extern
int
devfs_get_maj_min
(
devfs_handle_t
de
,
...
...
@@ -174,15 +171,6 @@ static inline void devfs_find_and_unregister (devfs_handle_t dir,
char
type
,
int
traverse_symlinks
)
{
}
static
inline
devfs_handle_t
devfs_find_handle
(
devfs_handle_t
dir
,
const
char
*
name
,
unsigned
int
major
,
unsigned
int
minor
,
char
type
,
int
traverse_symlinks
)
{
return
NULL
;
}
static
inline
int
devfs_get_flags
(
devfs_handle_t
de
,
unsigned
int
*
flags
)
{
return
0
;
...
...
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