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
23024c83
Commit
23024c83
authored
Aug 04, 2004
by
Greg Kroah-Hartman
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
MODULE: add byte type of module paramater, like the comments say we support...
Signed-off-by:
Greg Kroah-Hartman
<
greg@kroah.com
>
parent
9c574c5a
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 additions
and
0 deletions
+7
-0
include/linux/moduleparam.h
include/linux/moduleparam.h
+4
-0
kernel/params.c
kernel/params.c
+3
-0
No files found.
include/linux/moduleparam.h
View file @
23024c83
...
...
@@ -89,6 +89,10 @@ extern int parse_args(const char *name,
#define __param_check(name, p, type) \
static inline type *__check_##name(void) { return(p); }
extern
int
param_set_byte
(
const
char
*
val
,
struct
kernel_param
*
kp
);
extern
int
param_get_byte
(
char
*
buffer
,
struct
kernel_param
*
kp
);
#define param_check_byte(name, p) __param_check(name, p, unsigned char)
extern
int
param_set_short
(
const
char
*
val
,
struct
kernel_param
*
kp
);
extern
int
param_get_short
(
char
*
buffer
,
struct
kernel_param
*
kp
);
#define param_check_short(name, p) __param_check(name, p, short)
...
...
kernel/params.c
View file @
23024c83
...
...
@@ -171,6 +171,7 @@ int parse_args(const char *name,
return sprintf(buffer, format, *((type *)kp->arg)); \
}
STANDARD_PARAM_DEF
(
byte
,
unsigned
char
,
"%c"
,
unsigned
long
,
simple_strtoul
);
STANDARD_PARAM_DEF
(
short
,
short
,
"%hi"
,
long
,
simple_strtol
);
STANDARD_PARAM_DEF
(
ushort
,
unsigned
short
,
"%hu"
,
unsigned
long
,
simple_strtoul
);
STANDARD_PARAM_DEF
(
int
,
int
,
"%i"
,
long
,
simple_strtol
);
...
...
@@ -339,6 +340,8 @@ int param_set_copystring(const char *val, struct kernel_param *kp)
return
0
;
}
EXPORT_SYMBOL
(
param_set_byte
);
EXPORT_SYMBOL
(
param_get_byte
);
EXPORT_SYMBOL
(
param_set_short
);
EXPORT_SYMBOL
(
param_get_short
);
EXPORT_SYMBOL
(
param_set_ushort
);
...
...
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