Palacios Public Git Repository

To checkout Palacios execute

  git clone http://v3vee.org/palacios/palacios.web/palacios.git
This will give you the master branch. You probably want the devel branch or one of the release branches. To switch to the devel branch, simply execute
  cd palacios
  git checkout --track -b devel origin/devel
The other branches are similar.


Linux userspace tools for live migration
[palacios.git] / linux_usr / v3_env_inject.c
index 466e8a5..f9eb854 100644 (file)
@@ -18,7 +18,7 @@
 
 
 static void usage (char* bin) {
-       fprintf(stderr, "Usage: %s /dev/v3-vm<N> env-file inject-point-exe\n", bin);
+       fprintf(stderr, "usage: %s /dev/v3-vm<N> env-file inject-point-exe\n", bin);
 }
 
 int main (int argc, char **argv) {
@@ -52,6 +52,10 @@ int main (int argc, char **argv) {
         if (tmp_str[len] == '\n')
             tmp_str[len] = 0;
         strings[i] = (char*)malloc(MAX_STRING_LEN);
+        if (!strings[i]) {
+                fprintf(stderr, "Error allocating space for variable\n");
+                return -1;
+        }
         strcpy(strings[i], tmp_str);
         i++;
     }