Renamed static function find_prtn_by_name() to non-static 
osm_prtn_find_by_name()

This function will be used later by the PathRecord logic.

Signed-off-by: Yevgeny Kliteynik <[EMAIL PROTECTED]>
---
 osm/include/opensm/osm_partition.h |   29 +++++++++++++++++++++++++++++
 osm/opensm/osm_prtn.c              |    4 ++--
 2 files changed, 31 insertions(+), 2 deletions(-)

diff --git a/osm/include/opensm/osm_partition.h 
b/osm/include/opensm/osm_partition.h
index 41f18fa..6e123e6 100644
--- a/osm/include/opensm/osm_partition.h
+++ b/osm/include/opensm/osm_partition.h
@@ -251,6 +251,35 @@ ib_api_status_t osm_prtn_make_partitions
 * SEE ALSO
 *********/
 
+/****f* OpenSM: Partition/osm_prtn_find_by_name
+* NAME
+*      osm_prtn_find_by_name
+*
+* DESCRIPTION
+*      Fides partition by name.
+*
+* SYNOPSIS
+*/
+osm_prtn_t *
+osm_prtn_find_by_name(
+       IN osm_subn_t *p_subn,
+       IN const char *name);
+/*
+* PARAMETERS
+*      p_subn
+*              [in] Pointer to a subnet object.
+*
+*      name
+*              [in] Required partition name.
+*
+* RETURN VALUES
+*      Pointer to the partition object on success.
+*
+* NOTES
+*
+* SEE ALSO
+*********/
+
 END_C_DECLS
 
 #endif /* _OSM_PARTITION_H_ */
diff --git a/osm/opensm/osm_prtn.c b/osm/opensm/osm_prtn.c
index 4099cee..4b2cf23 100644
--- a/osm/opensm/osm_prtn.c
+++ b/osm/opensm/osm_prtn.c
@@ -264,7 +264,7 @@ static uint16_t __generate_pkey(osm_subn
        return 0;
 }
 
-static osm_prtn_t *find_prtn_by_name(osm_subn_t *p_subn, const char *name)
+osm_prtn_t *osm_prtn_find_by_name(osm_subn_t *p_subn, const char *name)
 {
        cl_map_item_t *p_next;
        osm_prtn_t *p;
@@ -288,7 +288,7 @@ osm_prtn_t *osm_prtn_make_new(osm_log_t
        pkey &= cl_hton16((uint16_t)~0x8000);
 
        if (!pkey) {
-               if (name && (p = find_prtn_by_name(p_subn, name)))
+               if (name && (p = osm_prtn_find_by_name(p_subn, name)))
                        return p;
                if(!(pkey = __generate_pkey(p_subn)))
                        return NULL;
-- 
1.4.4.1.GIT



_______________________________________________
openib-general mailing list
[email protected]
http://openib.org/mailman/listinfo/openib-general

To unsubscribe, please visit http://openib.org/mailman/listinfo/openib-general

Reply via email to