[ofa-general] Re: [PATCH] opensm: console split console into two modules

Sasha Khapyorsky sashak at voltaire.com
Sat Mar 1 22:25:29 PST 2008


Hi Tim,

On 14:27 Wed 20 Feb     , Timothy A. Meier wrote:
>
> This is the first of two patches, which depend on each other.
>
> I split the osm_console.c code into two modules, one containing the console
> commands, and the other (new osm_console_io.c) containing the console 
> setup,
> tear down and connection specific code.
>
> The primary purpose of the separation is to provide an isolated and 
> decoupled
> place to add the implementation of the new SSL connection.
>
> -- 
> Timothy A. Meier
> Computer Scientist
> ICCD/High Performance Computing
> 925.422.3341
> meier3 at llnl.gov

> From 453991ff76f01464cf90d9d1a1b6b38bbb96ef7e Mon Sep 17 00:00:00 2001
> From: Tim Meier <meier3 at llnl.gov>
> Date: Wed, 20 Feb 2008 13:56:04 -0800
> Subject: [PATCH] opensm: console  split console into two modules
> 
> Added osm_console_io.c module, to decouple connection and IO
> code from the console functionality.  Provides the ability
> to extend (add) an implementation for an SSL connection.
> 
> Signed-off-by: Tim Meier <meier3 at llnl.gov>

Both patches are applied.

The patches were split so that it was not compilable. I merged this
together. Please be sure that each patch is valid.

Also small tip is below.

[snip...]

> diff --git a/opensm/opensm/main.c b/opensm/opensm/main.c
> index fcc7a44..f8c091e 100644
> --- a/opensm/opensm/main.c
> +++ b/opensm/opensm/main.c
> @@ -60,6 +60,7 @@
>  #include <opensm/osm_version.h>
>  #include <opensm/osm_opensm.h>
>  #include <opensm/osm_console.h>
> +#include <opensm/osm_console_io.h>
>  #include <opensm/osm_perfmgr.h>
>  
>  volatile unsigned int osm_exit_flag = 0;
> @@ -550,7 +551,8 @@ static int daemonize(osm_opensm_t * osm)
>  int osm_manager_loop(osm_subn_opt_t * p_opt, osm_opensm_t * p_osm)
>  {
>  	if (is_console_enabled(p_opt))
> -		osm_console_init(p_opt, p_osm);
> +		osm_console_init(p_opt, &p_osm->console, &p_osm->log);
> +//	osm_console_init(p_opt, p_osm);

Please don't leave such commented code which is not needed anymore.

Sasha



More information about the general mailing list