diff options
author | midipix <writeonce@midipix.org> | 2016-01-10 16:24:48 -0500 |
---|---|---|
committer | midipix <writeonce@midipix.org> | 2016-11-11 00:22:34 -0500 |
commit | 13aa9b129841e87e1d552b4be13270b887f0ab0a (patch) | |
tree | 1b47f8e5e80174c52d2e04b094ba97c2f0f6b049 | |
parent | cef2fd3bc3ff924a907ba4ce68db01bf220e22e7 (diff) | |
download | mdso-13aa9b129841e87e1d552b4be13270b887f0ab0a.tar.bz2 mdso-13aa9b129841e87e1d552b4be13270b887f0ab0a.tar.xz |
argv.h: main(): fix signatures.
-rw-r--r-- | include/mdso/mdso.h | 2 | ||||
-rw-r--r-- | src/driver/mdso_driver_ctx.c | 6 | ||||
-rw-r--r-- | src/internal/argv/argv.h | 18 | ||||
-rw-r--r-- | src/mdso.c | 4 |
4 files changed, 15 insertions, 15 deletions
diff --git a/include/mdso/mdso.h b/include/mdso/mdso.h index dc599b2..6dea3dc 100644 --- a/include/mdso/mdso.h +++ b/include/mdso/mdso.h @@ -75,7 +75,7 @@ struct mdso_unit_ctx { }; /* driver api */ -mdso_api int mdso_get_driver_ctx (const char ** argv, const char ** envp, uint32_t flags, struct mdso_driver_ctx **); +mdso_api int mdso_get_driver_ctx (char ** argv, char ** envp, uint32_t flags, struct mdso_driver_ctx **); mdso_api int mdso_create_driver_ctx (const struct mdso_common_ctx *, struct mdso_driver_ctx **); mdso_api void mdso_free_driver_ctx (struct mdso_driver_ctx *); diff --git a/src/driver/mdso_driver_ctx.c b/src/driver/mdso_driver_ctx.c index ae1cad9..c1aa036 100644 --- a/src/driver/mdso_driver_ctx.c +++ b/src/driver/mdso_driver_ctx.c @@ -131,8 +131,8 @@ static int mdso_get_driver_ctx_fail( } int mdso_get_driver_ctx( - const char ** argv, - const char ** envp, + char ** argv, + char ** envp, uint32_t flags, struct mdso_driver_ctx ** pctx) { @@ -247,7 +247,7 @@ int mdso_create_driver_ctx( struct argv_meta * meta; struct mdso_driver_ctx_impl * ctx; int fddst = -1; - const char * argv[] = {"mdso_driver",0}; + char * argv[] = {"mdso_driver",0}; if (!(meta = argv_get(argv,mdso_default_options,0))) return -1; diff --git a/src/internal/argv/argv.h b/src/internal/argv/argv.h index 2ae2b07..0433597 100644 --- a/src/internal/argv/argv.h +++ b/src/internal/argv/argv.h @@ -109,12 +109,12 @@ struct argv_entry { }; struct argv_meta { - const char ** argv; + char ** argv; struct argv_entry * entries; }; struct argv_meta_impl { - const char ** argv; + char ** argv; char * strbuf; struct argv_meta meta; }; @@ -140,7 +140,7 @@ static void argv_usage( const char * mode); static struct argv_meta * argv_get( - const char **, + char **, const struct argv_option[], int flags); @@ -270,12 +270,12 @@ static inline const struct argv_option * option_from_tag( } static void argv_scan( - const char ** argv, + char ** argv, const struct argv_option options[], struct argv_ctx * ctx, struct argv_meta * meta) { - const char ** parg; + char ** parg; const char * ch; const char * val; const struct argv_option * option; @@ -566,7 +566,7 @@ static void argv_show_status( struct argv_meta * meta) { int argc; - const char ** argv; + char ** argv; struct argv_entry * entry; const struct argv_option * option; char short_name[2] = {0}; @@ -615,10 +615,10 @@ static struct argv_meta * argv_free_impl(struct argv_meta_impl * imeta) return 0; } -static struct argv_meta * argv_alloc(const char ** argv, struct argv_ctx * ctx) +static struct argv_meta * argv_alloc(char ** argv, struct argv_ctx * ctx) { struct argv_meta_impl * imeta; - const char ** vector; + char ** vector; char * dst; size_t size; int argc; @@ -657,7 +657,7 @@ static struct argv_meta * argv_alloc(const char ** argv, struct argv_ctx * ctx) } static struct argv_meta * argv_get( - const char * argv[], + char * argv[], const struct argv_option options[], int flags) { @@ -38,7 +38,7 @@ static int mdso_exit(struct mdso_driver_ctx * dctx, int nerrors) return nerrors ? 2 : 0; } -int mdso_main(int argc, const char ** argv, const char ** envp) +int mdso_main(int argc, char ** argv, char ** envp) { int ret; struct mdso_driver_ctx * dctx; @@ -71,7 +71,7 @@ int mdso_main(int argc, const char ** argv, const char ** envp) #ifndef MDSO_IN_A_BOX -int main(int argc, const char ** argv, const char ** envp) +int main(int argc, char ** argv, char ** envp) { return mdso_main(argc,argv,envp); } |