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
95f050bf
Commit
95f050bf
authored
Mar 06, 2012
by
David S. Miller
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
net: Use bool for return value of dev_valid_name().
Signed-off-by:
David S. Miller
<
davem@davemloft.net
>
parent
66431a7d
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 additions
and
7 deletions
+7
-7
include/linux/netdevice.h
include/linux/netdevice.h
+1
-1
net/core/dev.c
net/core/dev.c
+6
-6
No files found.
include/linux/netdevice.h
View file @
95f050bf
...
...
@@ -2122,7 +2122,7 @@ extern int netdev_rx_handler_register(struct net_device *dev,
void
*
rx_handler_data
);
extern
void
netdev_rx_handler_unregister
(
struct
net_device
*
dev
);
extern
int
dev_valid_name
(
const
char
*
name
);
extern
bool
dev_valid_name
(
const
char
*
name
);
extern
int
dev_ioctl
(
struct
net
*
net
,
unsigned
int
cmd
,
void
__user
*
);
extern
int
dev_ethtool
(
struct
net
*
net
,
struct
ifreq
*
);
extern
unsigned
dev_get_flags
(
const
struct
net_device
*
);
...
...
net/core/dev.c
View file @
95f050bf
...
...
@@ -848,21 +848,21 @@ EXPORT_SYMBOL(dev_get_by_flags_rcu);
* to allow sysfs to work. We also disallow any kind of
* whitespace.
*/
int
dev_valid_name
(
const
char
*
name
)
bool
dev_valid_name
(
const
char
*
name
)
{
if
(
*
name
==
'\0'
)
return
0
;
return
false
;
if
(
strlen
(
name
)
>=
IFNAMSIZ
)
return
0
;
return
false
;
if
(
!
strcmp
(
name
,
"."
)
||
!
strcmp
(
name
,
".."
))
return
0
;
return
false
;
while
(
*
name
)
{
if
(
*
name
==
'/'
||
isspace
(
*
name
))
return
0
;
return
false
;
name
++
;
}
return
1
;
return
true
;
}
EXPORT_SYMBOL
(
dev_valid_name
);
...
...
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