]> git.openfabrics.org - ~shefty/ibacm.git/commitdiff
refresh
authorSean Hefty <sean.hefty@intel.com>
Thu, 20 Jan 2011 19:41:07 +0000 (11:41 -0800)
committerSean Hefty <sean.hefty@intel.com>
Thu, 20 Jan 2011 19:41:07 +0000 (11:41 -0800)
meta
patches/autoaddr
patches/refresh-temp [deleted file]

diff --git a/meta b/meta
index 9098dabe75c43cb9b11a5c301e85878fe3d1cd31..0168249deb0cd5c6337aa85ab1f4695c92da1031 100644 (file)
--- a/meta
+++ b/meta
@@ -1,9 +1,8 @@
 Version: 1
-Previous: 71952b230410f100d10d8a59fce46dff0d0e8ead
-Head: 47e56106d6eafcf5e9e73d01db58baebec2ee681
+Previous: 7b11c550bebd2eda13a5e5f3b269f402f6ec81bb
+Head: f7b588cb0a484c2a15c5bd81ef101c815bd992ee
 Applied:
-  autoaddr: b1e91c10b2510cf1f75087e5c943651fcba8096b
-  refresh-temp: 47e56106d6eafcf5e9e73d01db58baebec2ee681
+  autoaddr: f7b588cb0a484c2a15c5bd81ef101c815bd992ee
 Unapplied:
   async_mc: c51c6e84981821b2541daba97cee9a29cd1d3709
   addr_size: 8de02c47fbf595132105a7050ad6f755f49f9a7a
index 5047762543d130fb2c94cbe534fedf4dad5ec0c6..ad9a39b793a191d0c37e3ed7ef31cb28d2c4d9aa 100644 (file)
@@ -1,17 +1,86 @@
 Bottom: a8e8aa49b3591176bc809c876eb5943ae719ce0d
-Top:    a8e8aa49b3591176bc809c876eb5943ae719ce0d
+Top:    d65a2839777e9248477661e92509a1f24ef35537
 Author: Sean Hefty <sean.hefty@intel.com>
 Date:   2011-01-20 09:30:45 -0800
 
 Define option to auto-generate addresses
 
-Add an option to the acm_opts.cfg file to instruct the ib_acm
-service to automatically generate the address list.  This will
-make it easier to support dynamic changes to system configuration.
+Add an option that instructs the ib_acm service to automatically
+generate the address configureation file.  This will
+make it easier to handle dynamic changes to system configuration.
 
 Signed-off-by: Sean Hefty <sean.hefty@intel.com>
 
 
 ---
 
-
+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;
diff --git a/patches/refresh-temp b/patches/refresh-temp
deleted file mode 100644 (file)
index ee4961c..0000000
+++ /dev/null
@@ -1,79 +0,0 @@
-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;