diff --git a/services/init/init_common_cmds.c b/services/init/init_common_cmds.c index 0d7ca460892b784dfd395af27cc7194d0d5b4e6d..2c0ea15542a38f891fc3885b71cf817a9d6b6b91 100755 --- a/services/init/init_common_cmds.c +++ b/services/init/init_common_cmds.c @@ -302,7 +302,7 @@ static void DoChown(const struct CmdArgs *ctx) const int pathPos = 2; int ret = SetOwner(ctx->argv[pathPos], ctx->argv[0], ctx->argv[1]); if (ret != 0) { - INIT_FATAL("Failed to change owner for %s, err %d.", ctx->argv[pathPos], errno); + INIT_LOGE("Failed to change owner for %s, err %d.", ctx->argv[pathPos], errno); } return; } @@ -358,7 +358,7 @@ static void DoChmod(const struct CmdArgs *ctx) } if (chmod(ctx->argv[1], mode) != 0) { - INIT_FATAL("Failed to change mode \" %s \" mode to %04o, err = %d", ctx->argv[1], mode, errno); + INIT_LOGE("Failed to change mode \" %s \" mode to %04o, err = %d", ctx->argv[1], mode, errno); } } diff --git a/test/unittest/init/cmds_unittest.cpp b/test/unittest/init/cmds_unittest.cpp index 18275a1e82805c738923531d5ca005ee4aeb2341..3658b4834709bdd8abe5c544414ea249a8d866e2 100755 --- a/test/unittest/init/cmds_unittest.cpp +++ b/test/unittest/init/cmds_unittest.cpp @@ -38,7 +38,7 @@ public: HWTEST_F(CmdsUnitTest, TestCmdExecByName, TestSize.Level1) { - SetInitLogLevel(INIT_INFO); + SetInitLogLevel(INIT_FATAL); DoCmdByName("load_param ", " /system/etc/param onlyadd"); DoCmdByName("symlink ", "/proc/self/fd/0 /dev/stdin"); DoCmdByName("insmod ",