nkk71

Untitled

Mar 6th, 2017
105
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.63 KB | None | 0 0
  1. string vdc_cryptfs_cmd(string log_name) {
  2.     string cmd;
  3.  
  4.     cmd = "LD_LIBRARY_PATH=/system/lib64:/system/lib /system/bin/vdc cryptfs";
  5.  
  6. #ifndef TW_CRYPTO_SYSTEM_VOLD_DEBUG
  7.     (void)log_name; // do nothing, but get rid of compiler warning in non debug builds
  8. #else
  9.     if (has_timeout && has_strace)
  10.         cmd = "/sbin/strace -q -tt -ff -v -y -s 1000 -o /tmp/strace_vdc_" + log_name + " /sbin/timeout -t 30 -s KILL env " + cmd;
  11.     else if (has_strace)
  12.         cmd = "/sbin/strace -q -tt -ff -v -y -s 1000 -o /tmp/strace_vdc_" + log_name + " -E " + cmd;
  13.     else
  14. #endif
  15.     if (has_timeout)
  16.         cmd = "/sbin/timeout -t 30 -s KILL env " + cmd;
  17.  
  18.     return cmd;
  19. }
Advertisement
Add Comment
Please, Sign In to add comment