diff options
-rw-r--r-- | include/perk/perk.h | 2 | ||||
-rw-r--r-- | src/driver/pe_driver_ctx.c | 4 | ||||
-rw-r--r-- | src/internal/argv/argv.h | 18 | ||||
-rw-r--r-- | src/perk.c | 4 |
4 files changed, 14 insertions, 14 deletions
diff --git a/include/perk/perk.h b/include/perk/perk.h index 451b37e..3dcc86b 100644 --- a/include/perk/perk.h +++ b/include/perk/perk.h @@ -150,7 +150,7 @@ struct pe_unit_ctx { }; /* driver api */ -perk_api int pe_get_driver_ctx (const char ** argv, const char ** envp, uint32_t flags, struct pe_driver_ctx **); +perk_api int pe_get_driver_ctx (char ** argv, char ** envp, uint32_t flags, struct pe_driver_ctx **); perk_api void pe_free_driver_ctx (struct pe_driver_ctx *); perk_api int pe_get_unit_ctx (const struct pe_driver_ctx *, const char * path, struct pe_unit_ctx **); diff --git a/src/driver/pe_driver_ctx.c b/src/driver/pe_driver_ctx.c index ff92c1d..c3345de 100644 --- a/src/driver/pe_driver_ctx.c +++ b/src/driver/pe_driver_ctx.c @@ -99,8 +99,8 @@ static int pe_get_driver_ctx_fail(struct argv_meta * meta) } int pe_get_driver_ctx( - const char ** argv, - const char ** envp, + char ** argv, + char ** envp, uint32_t flags, struct pe_driver_ctx ** pctx) { diff --git a/src/internal/argv/argv.h b/src/internal/argv/argv.h index 507db54..6543439 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) { @@ -67,7 +67,7 @@ static int perk_exit(struct pe_driver_ctx * dctx, int nerrors) return nerrors ? 2 : 0; } -int perk_main(int argc, const char ** argv, const char ** envp) +int perk_main(int argc, char ** argv, char ** envp) { int ret; struct pe_driver_ctx * dctx; @@ -94,7 +94,7 @@ int perk_main(int argc, const char ** argv, const char ** envp) #ifndef PERK_IN_A_BOX -int main(int argc, const char ** argv, const char ** envp) +int main(int argc, char ** argv, char ** envp) { return perk_main(argc,argv,envp); } |