Skip to contentSkip to conversation

Per-device parameter support (8/16)

RFC/PATCH Tejun Heo 1 participant 1 message Oct 23, 2004 Module support

lore
Share & tools
lore

Tejun Heo

author
#0 lore raw

dp_08_export_param_next_arg.diff

This is the 8th patch of 16 patches for devparam.

Rename next_arg to param_next_arg and make it global function. This
function is used by devparam.

include/linux/moduleparam.h +3 -0
Index: linux-devparam-export/include/linux/moduleparam.h
===================================================================
@@ -100,6 +100,9 @@ struct kparam_flag
 #define module_param_invflag(name, flags, flag, perm)			\
 	__module_param_flag(name, flags, flag, 1, perm)
 
+/* Used by deviceparam */
+extern char *param_next_arg(char *args, char **param, char **val);
+
 /* Called on module insert or kernel boot */
 extern int parse_args(const char *name,
 		      char *args,
kernel/params.c +2 -2
Index: linux-devparam-export/kernel/params.c
===================================================================
@@ -71,7 +71,7 @@ static int parse_one(char *param,
 
 /* You can use " around spaces, but can't escape ". */
 /* Hyphens and underscores equivalent in parameter names. */
-static char *next_arg(char *args, char **param, char **val)
+char *param_next_arg(char *args, char **param, char **val)
 {
 	unsigned int i, equals = 0;
 	int in_quote = 0;
@@ -126,7 +126,7 @@ int parse_args(const char *name,
 	while (*args) {
 		int ret;
 
-		args = next_arg(args, &param, &val);
+		args = param_next_arg(args, &param, &val);
 		ret = parse_one(param, val, params, num, unknown);
 		switch (ret) {
 		case -ENOENT: