Version: 1
-Previous: d4f6abc1c719200b601e4315664370c854428019
-Head: b1e91c10b2510cf1f75087e5c943651fcba8096b
+Previous: 71952b230410f100d10d8a59fce46dff0d0e8ead
+Head: 47e56106d6eafcf5e9e73d01db58baebec2ee681
Applied:
autoaddr: b1e91c10b2510cf1f75087e5c943651fcba8096b
+ refresh-temp: 47e56106d6eafcf5e9e73d01db58baebec2ee681
Unapplied:
async_mc: c51c6e84981821b2541daba97cee9a29cd1d3709
addr_size: 8de02c47fbf595132105a7050ad6f755f49f9a7a
--- /dev/null
+Bottom: a8e8aa49b3591176bc809c876eb5943ae719ce0d
+Top: d65a2839777e9248477661e92509a1f24ef35537
+Author: Sean Hefty <sean.hefty@intel.com>
+Date: 2011-01-20 11:32:27 -0800
+
+Refresh of autoaddr
+
+---
+
+diff --git a/man/ib_acm.1 b/man/ib_acm.1
+index acf6a1d..16d899d 100644
+--- a/man/ib_acm.1
++++ b/man/ib_acm.1
+@@ -4,8 +4,25 @@ ib_acm \- address and route resolution services for InfiniBand.
+ .SH SYNOPSIS
+ .sp
+ .nf
+-\fIib_acm\fR
++\fIib_acm\fR [-D] [-A addr_file] [-a] [-O option_file]
+ .fi
++.SH "OPTIONS"
++.TP
++\-D
++Runs the ib_acm service as a daemon.
++.TP
++\-A addr_file
++Specifies the address configuration file. The ib_acm service uses the
++contents of this file to assign addresses to local devices and ports.
++.TP
++\-a
++If specified, indicates that the ib_acm service should automatically
++generate the address configuration file and update it based on certain
++network events.
++.TP
++\-O option_file
++Specifies the option configuration file. The ib_acm service uses the
++contents of this file to override any default configuration options.
+ .SH "DESCRIPTION"
+ The IB ACM implements and provides a framework for name,
+ address, and route (path) resolution services over InfiniBand.
+diff --git a/src/acm.c b/src/acm.c
+index 1f3c470..0338e80 100644
+--- a/src/acm.c
++++ b/src/acm.c
+@@ -209,6 +209,7 @@ PER_THREAD char log_data[ACM_MAX_ADDRESS];
+
+ static char *opts_file = "/etc/ibacm/acm_opts.cfg";
+ static char *addr_file = "/etc/ibacm/acm_addr.cfg";
++static int auto_addr = 0;
+ static char log_file[128] = "/var/log/ibacm.log";
+ static int log_level = 0;
+ static char lock_file[128] = "/var/lock/ibacm.pid";
+@@ -2861,7 +2862,7 @@ static FILE *acm_open_addr_file(void)
+ {
+ FILE *f;
+
+- if ((f = fopen(addr_file, "r")))
++ if (!auto_addr && (f = fopen(addr_file, "r")))
+ return f;
+
+ acm_log(0, "notice - generating acm_addr.cfg file\n");
+@@ -2920,6 +2921,7 @@ static void show_usage(char *program)
+ printf(" [-D] - run as a daemon\n");
+ printf(" [-A addr_file] - address configuration file\n");
+ printf(" (default %s/%s\n", ACM_DEST_DIR, ACM_ADDR_FILE);
++ printf(" [-a] - automatically generate and update addresses\n");
+ printf(" [-O option_file] - option configuration file\n");
+ printf(" (default %s/%s\n", ACM_DEST_DIR, ACM_OPTS_FILE);
+ }
+@@ -2938,6 +2940,9 @@ int CDECL_FUNC main(int argc, char **argv)
+ case 'A':
+ addr_file = optarg;
+ break;
++ case 'a':
++ auto_addr = 1;
++ break;
+ case 'O':
+ opts_file = optarg;
+ break;