]> xenbits.xensource.com Git - people/andrewcoop/hwloc.git/commitdiff
hwloc-bind: Add -e as a synonym to --get-last-cpu-location
authorBrice Goglin <Brice.Goglin@inria.fr>
Wed, 18 Dec 2013 19:42:57 +0000 (20:42 +0100)
committerBrice Goglin <Brice.Goglin@inria.fr>
Wed, 18 Dec 2013 19:43:00 +0000 (20:43 +0100)
To match what hwloc-ps supports.

NEWS
utils/hwloc-bind.1in
utils/hwloc-bind.c

diff --git a/NEWS b/NEWS
index 15a6560eca9c00e05e5980fe91e9ad413e466624..eb70283f756798de1bb3b77985b816b41b3d5c1a 100644 (file)
--- a/NEWS
+++ b/NEWS
@@ -25,6 +25,7 @@ Version 1.9.0
 * Tools
   + Add -e or --get-last-cpu-location to hwloc-ps to report where
     processes/threads run instead of where they are bound.
+  + Add -e as a synonym to --get-last-cpu-location in hwloc-bind.
 
 
 Version 1.8.0
index 1d85f6f01d42d0d85bc92e9b9d83917be480ee4b..1a486417436774bab4ba6b784d199469431126bf 100644 (file)
@@ -48,7 +48,7 @@ Report the current bindings.
 When combined with \fB\-\-membind\fR, report the memory binding
 instead of CPU binding.
 .TP
-\fB\-\-get-last-cpu-location\fR
+\fB\-e\fR \fB\-\-get-last-cpu-location\fR
 Report the last processors where the process ran.
 Note that the result may already be outdated when reported since
 the operating system may move the process to other processors
index ed773b170385c8cb5c6b073bbca926c6907e98db..b2bc397fc5ed7f792b81754ca3a556b4c2fb0c3b 100644 (file)
@@ -33,7 +33,7 @@ void usage(const char *name, FILE *where)
   fprintf(where, "  --single       Bind on a single CPU to prevent migration\n");
   fprintf(where, "  --strict       Require strict binding\n");
   fprintf(where, "  --get          Retrieve current process binding\n");
-  fprintf(where, "  --get-last-cpu-location\n"
+  fprintf(where, "  -e --get-last-cpu-location\n"
                 "                 Retrieve the last processors where the current process ran\n");
   fprintf(where, "  --pid <pid>    Operate on process <pid>\n");
   fprintf(where, "  --taskset      Use taskset-specific format when displaying cpuset strings\n");
@@ -144,7 +144,7 @@ int main(int argc, char *argv[])
         taskset = 1;
         goto next;
       }
-      else if (!strncmp (argv[0], "--get-last-cpu-location", 10)) {
+      else if (!strcmp (argv[0], "-e") || !strncmp (argv[0], "--get-last-cpu-location", 10)) {
        get_last_cpu_location = 1;
        goto next;
       }