Skip to content

Commit 0d2d55b

Browse files
committed
SQUASHME opal/if/linux_ipv6: use opal_show_help()
Convert an instance of opal_output() to opal_show_help(). Signed-off-by: Jeff Squyres <[email protected]>
1 parent 513b3f6 commit 0d2d55b

File tree

3 files changed

+27
-4
lines changed

3 files changed

+27
-4
lines changed

opal/mca/if/linux_ipv6/Makefile.am

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,14 @@
11
#
2-
# Copyright (c) 2010 Cisco Systems, Inc. All rights reserved.
2+
# Copyright (c) 2019 Cisco Systems, Inc. All rights reserved.
33
# $COPYRIGHT$
44
#
55
# Additional copyrights may follow
66
#
77
# $HEADER$
88
#
99

10+
dist_opaldata_DATA = help-opal-if-linux-ipv6.txt
11+
1012
noinst_LTLIBRARIES = libmca_if_linux_ipv6.la
1113

1214
libmca_if_linux_ipv6_la_SOURCES = if_linux_ipv6.c
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
# -*- text -*-
2+
#
3+
# Copyright (c) 2019 Cisco Systems, Inc. All rights reserved.
4+
# $COPYRIGHT$
5+
#
6+
# Additional copyrights may follow
7+
#
8+
# $HEADER$
9+
#
10+
[fail to parse if_inet6]
11+
Open MPI failed to parse at least one of the lines in
12+
/proc/net/if_inet6. This is extremely unusual and should never
13+
happen. Open MPI will skip this interface and attempt to continue.
14+
15+
Host: %s
16+
Interface: %s
17+
Hex: %s

opal/mca/if/linux_ipv6/if_linux_ipv6.c

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 2010 Cisco Systems, Inc. All rights reserved.
2+
* Copyright (c) 2010-2019 Cisco Systems, Inc. All rights reserved.
33
* Copyright (c) 2010 Oracle and/or its affiliates. All rights reserved.
44
* Copyright (c) 2018 Amazon.com, Inc. or its affiliates. All Rights
55
* reserved.
@@ -48,6 +48,7 @@
4848
#include "opal/constants.h"
4949
#include "opal/util/if.h"
5050
#include "opal/util/output.h"
51+
#include "opal/util/show_help.h"
5152
#include "opal/util/string_copy.h"
5253
#include "opal/mca/if/if.h"
5354
#include "opal/mca/if/base/base.h"
@@ -126,8 +127,11 @@ static int if_linux_ipv6_open(void)
126127
opal_if_t *intf;
127128

128129
if (!hexdecode(addrhex, a6.s6_addr, sizeof a6.s6_addr)) {
129-
opal_output(0, LOG_PREFIX "skipped interface %s: failed to hexdecode %s\n",
130-
ifname, addrhex);
130+
char hostname[OPAL_MAXHOSTNAMELEN + 1];
131+
gethostname(hostname, sizeof(hostname) - 1);
132+
opal_show_help("help-opal-if-linux-ipv6.txt",
133+
"fail to parse if_inet6", true,
134+
hostname, ifname, addrhex);
131135
continue;
132136
};
133137
inet_ntop(AF_INET6, a6.s6_addr, addrstr, sizeof addrstr);

0 commit comments

Comments
 (0)