--- /dev/null
+Bottom: e51eb499bbd274dcb85a7a69e7837890cd9a0e16
+Top: 09bc4f43699418809ec483f853154e9581482fc0
+Author: Sean Hefty <sean.hefty@intel.com>
+Date: 2010-07-28 12:26:49 -0700
+
+Refresh of cfg
+
+---
+
+diff --git a/src/acme.c b/src/acme.c
+index 8a64b7f..283002b 100755
+--- a/src/acme.c
++++ b/src/acme.c
+@@ -1,5 +1,5 @@
+ /*
+- * Copyright (c) 2009 Intel Corporation. All rights reserved.
++ * Copyright (c) 2009-2010 Intel Corporation. All rights reserved.
+ *
+ * This software is available to you under the OpenIB.org BSD license
+ * below:
+@@ -39,8 +39,9 @@
+ #include <infiniband/acm.h>
+ #include "libacm.h"
+
+-static char opts_file[100] = "/etc/ibacm/acm_opts.cfg";
+-static char addr_file[100] = "/etc/ibacm/acm_addr.cfg";
++static char dest_dir = "/etc/ibacm";
++static char opts_file = "acm_opts.cfg";
++static char addr_file = "acm_addr.cfg";
+ static char *dest_addr;
+ static char *src_addr;
+ static char addr_type = 'i';
+@@ -62,9 +63,11 @@ static void show_usage(char *program)
+ printf(" -d dest_addr - format defined by -f option\n");
+ printf(" [-v] - verify ACM response against SA query response\n");
+ printf("usage 2: %s\n", program);
+- printf(" -A - generate local acm_addr.cfg configuration file\n");
+- printf(" -O - generate local acm_opts.cfg options file\n");
+- printf(" -D - specify destination directory for output files\n");
++ printf(" -A [addr_file] - generate local address configuration file\n");
++ printf(" (default is acm_addr.cfg)\n");
++ printf(" -O [opt_file] - generate local acm_opts.cfg options file\n");
++ printf(" (default is acm_opts.cfg)\n");
++ printf(" -D dest_dir - specify destination directory for output files\n");
+ printf(" (default is /etc/ibacm)\n");
+ }
+
+@@ -195,8 +198,9 @@ static int gen_opts(void)
+ FILE *f;
+
+ printf("Generating acm_opts.cfg\n");
++ mkdir(dest_dir, S_IRUSR | S_IWUSR | S_IRGRP | S_IWGRP | S_IROTH);
+ if (!(f = fopen(opts_file, "w"))) {
+- printf("Failed to open option configuration file\n");
++ printf("Failed to open option configuration file: %s\n", strerror(errno));
+ return -1;
+ }
+
+@@ -330,8 +334,9 @@ static int gen_addr(void)
+ int ret;
+
+ printf("Generating acm_addr.cfg\n");
++ mkdir(dest_dir, S_IRUSR | S_IWUSR | S_IRGRP | S_IWGRP | S_IROTH);
+ if (!(f = fopen(addr_file, "w"))) {
+- printf("Failed to open address configuration file\n");
++ printf("Failed to open address configuration file: %s\n", strerror(errno));
+ return -1;
+ }
+
+@@ -505,7 +510,7 @@ int CDECL_FUNC main(int argc, char **argv)
+ if (ret)
+ goto out;
+
+- while ((op = getopt(argc, argv, "f:s:d:vAOD:")) != -1) {
++ while ((op = getopt(argc, argv, "f:s:d:vA::O::D:")) != -1) {
+ switch (op) {
+ case 'f':
+ addr_type = optarg[0];
+@@ -521,13 +526,19 @@ int CDECL_FUNC main(int argc, char **argv)
+ break;
+ case 'A':
+ make_addr = 1;
++ if (optarg)
++ addr_file = optarg;
++printf("set addr file to %s\n", addr_file);
+ break;
+ case 'O':
+ make_opts = 1;
++ if (optarg)
++ opt_file = optarg;
++printf("set opt file to %s\n", addr_file);
+ break;
+ case 'D':
+- snprintf(opts_file, 80, "%s/acm_opts.cfg", optarg);
+- snprintf(addr_file, 80, "%s/acm_addr.cfg", optarg);
++ dest_dir = optarg;
++printf("set dest dir to %s\n", dest_dir);
+ break;
+ default:
+ show_usage(argv[0]);