From patchwork Tue Jul 31 06:44:12 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hal Rosenstock X-Patchwork-Id: 1258251 X-Patchwork-Delegate: alexne@voltaire.com Return-Path: X-Original-To: patchwork-linux-rdma@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork2.kernel.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by patchwork2.kernel.org (Postfix) with ESMTP id F22CADF26F for ; Tue, 31 Jul 2012 06:44:18 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754177Ab2GaGoS (ORCPT ); Tue, 31 Jul 2012 02:44:18 -0400 Received: from mail-ey0-f174.google.com ([209.85.215.174]:63919 "EHLO mail-ey0-f174.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754026Ab2GaGoR (ORCPT ); Tue, 31 Jul 2012 02:44:17 -0400 Received: by eaac11 with SMTP id c11so6354eaa.19 for ; Mon, 30 Jul 2012 23:44:16 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=message-id:date:from:user-agent:mime-version:to:cc:subject :content-type:content-transfer-encoding:x-gm-message-state; bh=BX6estlmAWZ8cbLe8HLx9VUc0fKjOaGljJzbzps+HfY=; b=E7rGE+/93ayeKCNRJdKbx/leatQSlL0awN37jj+MM3ph9ifn8N9bUrtXrlo4RRTFP5 WVqgdGkGXvjsGT0TcqEKK8vLaEivWKMyXWvS2NplDw6380BcjbijvUITPnySjaCuLXH0 CvyFHm6/vo2ygJ8T2EyoT1KZWqB0nGfoU5avbgtHI21E1yZvBhyFMXIBIXb3sQIxu1PF hTnKJkNgWIQe3zBntXif69I82Eaf58NenUuNOk/GAmCRNv7kkVA/6hD7wmHLX8m5d9+e eSm67aKvZFHj4WpVNdmq5RppC5yH6Bwg5O3hxEoTFQI4uM+Vimybw+YqIfS6LL44AmNY dJfA== Received: by 10.14.179.71 with SMTP id g47mr15310768eem.21.1343717055925; Mon, 30 Jul 2012 23:44:15 -0700 (PDT) Received: from [172.25.5.27] ([193.47.165.251]) by mx.google.com with ESMTPS id u48sm34130722eep.7.2012.07.30.23.44.14 (version=SSLv3 cipher=OTHER); Mon, 30 Jul 2012 23:44:15 -0700 (PDT) Message-ID: <50177EBC.9050001@dev.mellanox.co.il> Date: Tue, 31 Jul 2012 02:44:12 -0400 From: Hal Rosenstock User-Agent: Mozilla/5.0 (Windows NT 6.1; rv:9.0) Gecko/20111222 Thunderbird/9.0.1 MIME-Version: 1.0 To: Alex Netes CC: "linux-rdma (linux-rdma@vger.kernel.org)" Subject: [PATCH][MINOR] opensm: Remove unused per_module_logging option X-Gm-Message-State: ALoCoQn0fwoT2JDWiOetErPm2VM+HXj5JifqKpZDxs5FppwUD8U9CC0E7Etuf/ANOya+gYbkw9lk Sender: linux-rdma-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-rdma@vger.kernel.org Signed-off-by: Hal Rosenstock --- -- To unsubscribe from this list: send the line "unsubscribe linux-rdma" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html diff --git a/include/opensm/osm_subnet.h b/include/opensm/osm_subnet.h index 683204b..2321ecb 100644 --- a/include/opensm/osm_subnet.h +++ b/include/opensm/osm_subnet.h @@ -265,7 +265,6 @@ typedef struct osm_subn_opt { struct osm_subn_opt *file_opts; /* used for update */ uint8_t lash_start_vl; /* starting vl to use in lash */ uint8_t sm_sl; /* which SL to use for SM/SA communication */ - boolean_t per_module_logging; char *per_module_logging_file; } osm_subn_opt_t; /* @@ -541,10 +540,6 @@ typedef struct osm_subn_opt { * When not zero, randomize best possible ports chosen * for a route. The value is used as a random key seed. * -* per_module_logging -* Enable/disable the per module logging feature. -* Default is disabled. -* * per_module_logging_file * File name of per module logging configuration. * diff --git a/opensm/osm_console.c b/opensm/osm_console.c index 789092f..0c58a25 100644 --- a/opensm/osm_console.c +++ b/opensm/osm_console.c @@ -338,29 +338,25 @@ static void loglevel_parse(char **p_last, osm_opensm_t * p_osm, FILE * out) static void permodlog_parse(char **p_last, osm_opensm_t * p_osm, FILE * out) { - fprintf(out, "Per module logging is %sabled\n", - p_osm->subn.opt.per_module_logging ? "en" : "dis"); - if (p_osm->subn.opt.per_module_logging) { - FILE *fp; - char buf[1024]; - - fp = fopen(p_osm->subn.opt.per_module_logging_file, "r"); - if (!fp) { - if (errno == ENOENT) - return; - fprintf(out, "fopen(%s) failed: %s\n", - p_osm->subn.opt.per_module_logging_file, - strerror(errno)); - return; - } + FILE *fp; + char buf[1024]; - fprintf(out, "Per module logging file: %s\n", - p_osm->subn.opt.per_module_logging_file); - while (fgets(buf, sizeof buf, fp) != NULL) - fprintf(out, "%s", buf); - fclose(fp); - fprintf(out, "\n"); + fp = fopen(p_osm->subn.opt.per_module_logging_file, "r"); + if (!fp) { + if (errno == ENOENT) + return; + fprintf(out, "fopen(%s) failed: %s\n", + p_osm->subn.opt.per_module_logging_file, + strerror(errno)); + return; } + + fprintf(out, "Per module logging file: %s\n", + p_osm->subn.opt.per_module_logging_file); + while (fgets(buf, sizeof buf, fp) != NULL) + fprintf(out, "%s", buf); + fclose(fp); + fprintf(out, "\n"); } static void priority_parse(char **p_last, osm_opensm_t * p_osm, FILE * out) diff --git a/opensm/osm_subnet.c b/opensm/osm_subnet.c index ccaa47c..363c68f 100644 --- a/opensm/osm_subnet.c +++ b/opensm/osm_subnet.c @@ -531,7 +531,6 @@ static const opt_rec_t opt_tbl[] = { { "lash_start_vl", OPT_OFFSET(lash_start_vl), opts_parse_uint8, NULL, 1 }, { "sm_sl", OPT_OFFSET(sm_sl), opts_parse_uint8, NULL, 1 }, { "log_prefix", OPT_OFFSET(log_prefix), opts_parse_charp, NULL, 1 }, - { "per_module_logging", OPT_OFFSET(per_module_logging), opts_parse_boolean, NULL, 1 }, { "per_module_logging_file", OPT_OFFSET(per_module_logging_file), opts_parse_charp, NULL, 0 }, {0} }; @@ -1040,7 +1039,6 @@ void osm_subn_set_default_opt(IN osm_subn_opt_t * p_opt) p_opt->lash_start_vl = 0; p_opt->sm_sl = OSM_DEFAULT_SL; p_opt->log_prefix = NULL; - p_opt->per_module_logging = FALSE; p_opt->per_module_logging_file = strdup(OSM_DEFAULT_PER_MOD_LOGGING_CONF_FILE); subn_init_qos_options(&p_opt->qos_options, NULL); subn_init_qos_options(&p_opt->qos_ca_options, NULL); @@ -2063,8 +2061,6 @@ int osm_subn_output_conf(FILE *out, IN osm_subn_opt_t * p_opts) "log_max_size %lu\n\n" "# If TRUE will accumulate the log over multiple OpenSM sessions\n" "accum_log_file %s\n\n" - "# Per module logging\n" - "per_module_logging %s\n\n" "# Per module logging configuration file\n" "# Each line in config file contains \n" "# where module_name is file name including .c\n" @@ -2098,7 +2094,6 @@ int osm_subn_output_conf(FILE *out, IN osm_subn_opt_t * p_opts) p_opts->log_file, p_opts->log_max_size, p_opts->accum_log_file ? "TRUE" : "FALSE", - p_opts->per_module_logging ? "TRUE" : "FALSE", p_opts->per_module_logging_file, p_opts->dump_files_dir, p_opts->enable_quirks ? "TRUE" : "FALSE",