[hipl-dev] Re: [Branch ~toxedvirus/hipl/hipfw-modules] Rev 5008: Forward command line initialization to modules in order to allow registering command line options...

  • From: Diego Biurrun <diego@xxxxxxxxxx>
  • To: hipl-dev@xxxxxxxxxxxxx
  • Date: Wed, 03 Nov 2010 19:24:29 +0100

On Wed, Nov 03, 2010 at 04:50:46PM +0000, noreply@xxxxxxxxxxxxx wrote:
> ------------------------------------------------------------
> revno: 5008
> committer: Andrius Bentkus <andrius.bentkus@xxxxxxxxxxxxxx>
> branch nick: hipfw-modules
> timestamp: Wed 2010-11-03 17:46:44 +0100
> message:
>   Forward command line initialization to modules in order to allow 
> registering command line options themselfs. 
> 
> --- hipd/hipd.c       2010-10-20 16:11:23 +0000
> +++ hipd/hipd.c       2010-11-03 16:46:44 +0000
> @@ -221,7 +222,7 @@
>          sflags &= ~HIPD_START_LOWCAP;
>          break;
>      case 'm':
> -        // do _not_ load/unload kernel modules/drivers 
> +        // do _not_ load/unload kernel modules/drivers
>          sflags &= ~HIPD_START_LOAD_KMOD;
>          break;
> --- hipd/init.c       2010-10-20 16:11:23 +0000
> +++ hipd/init.c       2010-11-03 16:46:44 +0000
> @@ -1196,7 +1196,7 @@
>  
> -    HIP_IFEL(hip_lmod_load_modules(hipd_modules, hipd_num_modules), 
> +    HIP_IFEL(hip_lmod_load_modules(hipd_modules, hipd_num_modules),
>               -1,
>               "Module initialization failed.\n");

Please commit unrelated cosmetics separately.

> --- lib/core/options.h        2010-10-20 14:42:29 +0000
> +++ lib/core/options.h        2010-11-03 16:46:44 +0000
> @@ -88,5 +89,7 @@
>  int hip_cmd_options_parse(const int argc,
>                            char **argv,
>                            const struct hip_cmd_option_list *list);
> -
> +void hip_cmd_init(struct hip_cmd_option_list *option_list,
> +                  const struct module_info *const modules,
> +                  const unsigned int size);
>  #endif /* HIP_LIB_CORE_OPTIONS_H */

That empty line was there on purpose.

> --- process_modules.py        2010-10-20 15:04:46 +0000
> +++ process_modules.py        2010-11-03 16:46:44 +0000
> @@ -161,7 +161,7 @@
>  
> -                info_string  = 'struct module_info ' + current_app
> +                info_string  = 'static struct module_info ' + current_app
>                  info_string += '_modules[] = {'
>                  first_loop           = True
> @@ -192,12 +192,18 @@
>  
> -                hdr_file.write('\nconst unsigned int ' + current_app + 
> '_num_modules')
> +                hdr_file.write('\nstatic const unsigned int ' + current_app 
> + '_num_modules')
>                  hdr_file.write(' = ' + str(num_modules) + ';\n\n')

Is this related?

Diego

Other related posts: