Explorar el Código

* Tell where the new binary was moved when using -U/-U

svn: 1684
Bryan Drewery hace 21 años
padre
commit
5d0c7d9e3d
Se han modificado 1 ficheros con 3 adiciones y 2 borrados
  1. 3 2
      src/misc.c

+ 3 - 2
src/misc.c

@@ -706,7 +706,7 @@ int updatebin(int idx, char *par, int secs)
     putlog(LOG_MISC, "*", "Couldn't restart new binary (error %d)", i);
     putlog(LOG_MISC, "*", "Couldn't restart new binary (error %d)", i);
     return i;
     return i;
   }
   }
-#endif /* CYGWIN_HACKS */
+#endif /* !CYGWIN_HACKS */
 #ifdef CYGWIN_HACKS
 #ifdef CYGWIN_HACKS
   {
   {
     size_t binsize = strlen(tmpdir) + 7 + 1;
     size_t binsize = strlen(tmpdir) + 7 + 1;
@@ -718,12 +718,13 @@ int updatebin(int idx, char *par, int secs)
     free(tmpbuf);
     free(tmpbuf);
   }
   }
 #endif /* CYGWIN_HACKS */  
 #endif /* CYGWIN_HACKS */  
-  
   if (movefile(path, binname)) {
   if (movefile(path, binname)) {
     logidx(idx, "Can't rename %s to %s", path, binname);
     logidx(idx, "Can't rename %s to %s", path, binname);
     free(path);
     free(path);
     return 1;
     return 1;
   }
   }
+  if (updating == 2)
+    printf("* Moved binary to: %s\n", binname);
 
 
   /* safe to run new binary.. */
   /* safe to run new binary.. */