#define SUCCESS 0
#define FAIL -1
-const char* kChromiumMountReady = "/tmp/.chromium_mount.ready";
+const char* kChromiumUpdateOrPreloadMountReady =
+ "/tmp/.chromium_update_or_preload_mount.ready";
+const char* kChromiumUpgradeMountReady = "/tmp/.chromium_upgrade_mount.ready";
+const char* kChromiumUpgradeTPKExists = "/tmp/.chromium_upgrade_tpk.exists";
const char* kColdBootRequester = "chromium-efl";
const char* kLaunchFail = "rtc/memory/WebApp/LaunchFail";
const char* kPSAgentReady = "/run/ps_agent.pid";
return FAIL;
}
- if (LwipcEventDone(kChromiumMountReady) < 0) {
- // The Lwipc api simply calls the ioctl() inside the function.
- // Failure of this API means that there are some kernel issues.
- LOG(ERROR) << kChromiumMountReady << " Event Failed.";
- }
-
return SUCCESS;
}
int result = FAIL;
if (!access(LIB_RO_ROOT_DIR "/version", F_OK)) {
LOG(INFO) << LIB_RO_ROOT_DIR "/version file already exists.";
- if (LwipcEventDone(kChromiumMountReady) < 0) {
+ if (LwipcEventDone(kChromiumUpdateOrPreloadMountReady) < 0) {
// The Lwipc api simply calls the ioctl() inside the function.
// Failure of this API means that there are some kernel issues.
- LOG(ERROR) << kChromiumMountReady << " Event Failed.";
+ LOG(ERROR) << kChromiumUpdateOrPreloadMountReady << " Event Failed.";
}
return SUCCESS;
}
LOG(INFO) << PATH_UPDATED_CHROMIUM_EFL_IMG << " exists.";
kTargetTPK = "WebEngine Updated TPK ";
result = mount(true, MOUNT_ARGS_UPDATED_CHROMIUM);
+
+ if (LwipcEventDone(kChromiumUpdateOrPreloadMountReady) < 0) {
+ // The Lwipc api simply calls the ioctl() inside the function.
+ // Failure of this API means that there are some kernel issues.
+ LOG(ERROR) << kChromiumUpdateOrPreloadMountReady << " Event Failed.";
+ }
}
if (result != SUCCESS && !access(PATH_PRELOAD_CHROMIUM_EFL_IMG, F_OK)) {
LOG(INFO) << PATH_PRELOAD_CHROMIUM_EFL_IMG << " exists.";
kTargetTPK = "WebEngine Preload TPK ";
result = mount(true, MOUNT_ARGS_PRELOAD_CHROMIUM);
+
+ if (LwipcEventDone(kChromiumUpdateOrPreloadMountReady) < 0) {
+ // The Lwipc api simply calls the ioctl() inside the function.
+ // Failure of this API means that there are some kernel issues.
+ LOG(ERROR) << kChromiumUpdateOrPreloadMountReady << " Event Failed.";
+ }
}
return result;
}
+static void AlertUpgradeTPK() {
+ if (!access(PATH_UPGRADE_CHROMIUM_EFL_IMG, F_OK)) {
+ LOG(INFO) << PATH_UPGRADE_CHROMIUM_EFL_IMG << " exists.";
+
+ if (LwipcEventDone(kChromiumUpgradeTPKExists) < 0) {
+ // The Lwipc api simply calls the ioctl() inside the function.
+ // Failure of this API means that there are some kernel issues.
+ LOG(ERROR) << kChromiumUpgradeTPKExists << " Event Failed.";
+ }
+ } else {
+ LOG(INFO) << "No WebEngine Upgrade TPK found";
+ }
+}
+
static void MountUpgradeTPK() {
if (!access(LIB_UPGRADE_ROOT_DIR "/version", F_OK)) {
RequestColdBoot();
LOG(INFO) << PATH_UPGRADE_CHROMIUM_EFL_IMG << " exists.";
kTargetTPK = "WebEngine Upgrade TPK ";
mount(true, MOUNT_ARGS_UPGRADE_CHROMIUM);
+ if (LwipcEventDone(kChromiumUpgradeMountReady) < 0) {
+ // The Lwipc api simply calls the ioctl() inside the function.
+ // Failure of this API means that there are some kernel issues.
+ LOG(ERROR) << kChromiumUpgradeMountReady << " Event Failed.";
+ }
} else {
LOG(INFO) << "No WebEngine Upgrade TPK found";
}
}
if (option == InstallTpk) { // InstallTpk
+ AlertUpgradeTPK();
// TV does not install tpk. Built-in installer installs.
// To avoid concurrency problem, a lock must be shared with installer.
//