@@ -463,7 +463,7 @@ static int wait_dexopt(pid_t pid, const char* apk_path)
463463 }
464464 }
465465 if (got_pid != pid ) {
466- LOGW ("waitpid failed: wanted %d, got %d: %s\n" ,
466+ ALOGW ("waitpid failed: wanted %d, got %d: %s\n" ,
467467 (int ) pid , (int ) got_pid , strerror (errno ));
468468 return 1 ;
469469 }
@@ -472,7 +472,7 @@ static int wait_dexopt(pid_t pid, const char* apk_path)
472472 ALOGV ("DexInv: --- END '%s' (success) ---\n" , apk_path );
473473 return 0 ;
474474 } else {
475- LOGW ("DexInv: --- END '%s' --- status=0x%04x, process failed\n" ,
475+ ALOGW ("DexInv: --- END '%s' --- status=0x%04x, process failed\n" ,
476476 apk_path , status );
477477 return status ; /* always nonzero */
478478 }
@@ -595,7 +595,7 @@ void mkinnerdirs(char* path, int basepos, mode_t mode, int uid, int gid,
595595 if (mkdir (path , mode ) == 0 ) {
596596 chown (path , uid , gid );
597597 } else {
598- LOGW ("Unable to make directory %s: %s\n" , path , strerror (errno ));
598+ ALOGW ("Unable to make directory %s: %s\n" , path , strerror (errno ));
599599 }
600600 }
601601 path [basepos ] = '/' ;
@@ -616,7 +616,7 @@ int movefileordir(char* srcpath, char* dstpath, int dstbasepos,
616616 int dstend = strlen (dstpath );
617617
618618 if (lstat (srcpath , statbuf ) < 0 ) {
619- LOGW ("Unable to stat %s: %s\n" , srcpath , strerror (errno ));
619+ ALOGW ("Unable to stat %s: %s\n" , srcpath , strerror (errno ));
620620 return 1 ;
621621 }
622622
@@ -631,7 +631,7 @@ int movefileordir(char* srcpath, char* dstpath, int dstbasepos,
631631 return 1 ;
632632 }
633633 } else {
634- LOGW ("Unable to rename %s to %s: %s\n" ,
634+ ALOGW ("Unable to rename %s to %s: %s\n" ,
635635 srcpath , dstpath , strerror (errno ));
636636 return 1 ;
637637 }
@@ -640,7 +640,7 @@ int movefileordir(char* srcpath, char* dstpath, int dstbasepos,
640640
641641 d = opendir (srcpath );
642642 if (d == NULL ) {
643- LOGW ("Unable to opendir %s: %s\n" , srcpath , strerror (errno ));
643+ ALOGW ("Unable to opendir %s: %s\n" , srcpath , strerror (errno ));
644644 return 1 ;
645645 }
646646
@@ -655,12 +655,12 @@ int movefileordir(char* srcpath, char* dstpath, int dstbasepos,
655655 }
656656
657657 if ((srcend + strlen (name )) >= (PKG_PATH_MAX - 2 )) {
658- LOGW ("Source path too long; skipping: %s/%s\n" , srcpath , name );
658+ ALOGW ("Source path too long; skipping: %s/%s\n" , srcpath , name );
659659 continue ;
660660 }
661661
662662 if ((dstend + strlen (name )) >= (PKG_PATH_MAX - 2 )) {
663- LOGW ("Destination path too long; skipping: %s/%s\n" , dstpath , name );
663+ ALOGW ("Destination path too long; skipping: %s/%s\n" , dstpath , name );
664664 continue ;
665665 }
666666
@@ -716,7 +716,7 @@ int movefiles()
716716 } else {
717717 subfd = openat (dfd , name , O_RDONLY );
718718 if (subfd < 0 ) {
719- LOGW ("Unable to open update commands at %s%s\n" ,
719+ ALOGW ("Unable to open update commands at %s%s\n" ,
720720 UPDATE_COMMANDS_DIR_PREFIX , name );
721721 continue ;
722722 }
@@ -742,7 +742,7 @@ int movefiles()
742742 // skip comments and empty lines.
743743 } else if (hasspace ) {
744744 if (dstpkg [0 ] == 0 ) {
745- LOGW ("Path before package line in %s%s: %s\n" ,
745+ ALOGW ("Path before package line in %s%s: %s\n" ,
746746 UPDATE_COMMANDS_DIR_PREFIX , name , buf + bufp );
747747 } else if (srcpkg [0 ] == 0 ) {
748748 // Skip -- source package no longer exists.
@@ -758,7 +758,7 @@ int movefiles()
758758 } else {
759759 char * div = strchr (buf + bufp , ':' );
760760 if (div == NULL ) {
761- LOGW ("Bad package spec in %s%s; no ':' sep: %s\n" ,
761+ ALOGW ("Bad package spec in %s%s; no ':' sep: %s\n" ,
762762 UPDATE_COMMANDS_DIR_PREFIX , name , buf + bufp );
763763 } else {
764764 * div = 0 ;
@@ -767,14 +767,14 @@ int movefiles()
767767 strcpy (dstpkg , buf + bufp );
768768 } else {
769769 srcpkg [0 ] = dstpkg [0 ] = 0 ;
770- LOGW ("Package name too long in %s%s: %s\n" ,
770+ ALOGW ("Package name too long in %s%s: %s\n" ,
771771 UPDATE_COMMANDS_DIR_PREFIX , name , buf + bufp );
772772 }
773773 if (strlen (div ) < PKG_NAME_MAX ) {
774774 strcpy (srcpkg , div );
775775 } else {
776776 srcpkg [0 ] = dstpkg [0 ] = 0 ;
777- LOGW ("Package name too long in %s%s: %s\n" ,
777+ ALOGW ("Package name too long in %s%s: %s\n" ,
778778 UPDATE_COMMANDS_DIR_PREFIX , name , div );
779779 }
780780 if (srcpkg [0 ] != 0 ) {
@@ -785,7 +785,7 @@ int movefiles()
785785 }
786786 } else {
787787 srcpkg [0 ] = 0 ;
788- LOGW ("Can't create path %s in %s%s\n" ,
788+ ALOGW ("Can't create path %s in %s%s\n" ,
789789 div , UPDATE_COMMANDS_DIR_PREFIX , name );
790790 }
791791 if (srcpkg [0 ] != 0 ) {
@@ -802,7 +802,7 @@ int movefiles()
802802 }
803803 } else {
804804 srcpkg [0 ] = 0 ;
805- LOGW ("Can't create path %s in %s%s\n" ,
805+ ALOGW ("Can't create path %s in %s%s\n" ,
806806 div , UPDATE_COMMANDS_DIR_PREFIX , name );
807807 }
808808 }
@@ -815,7 +815,7 @@ int movefiles()
815815 } else {
816816 if (bufp == 0 ) {
817817 if (bufp < bufe ) {
818- LOGW ("Line too long in %s%s, skipping: %s\n" ,
818+ ALOGW ("Line too long in %s%s, skipping: %s\n" ,
819819 UPDATE_COMMANDS_DIR_PREFIX , name , buf );
820820 }
821821 } else if (bufp < bufe ) {
@@ -825,7 +825,7 @@ int movefiles()
825825 }
826826 readlen = read (subfd , buf + bufe , PKG_PATH_MAX - bufe );
827827 if (readlen < 0 ) {
828- LOGW ("Failure reading update commands in %s%s: %s\n" ,
828+ ALOGW ("Failure reading update commands in %s%s: %s\n" ,
829829 UPDATE_COMMANDS_DIR_PREFIX , name , strerror (errno ));
830830 break ;
831831 } else if (readlen == 0 ) {
0 commit comments