Lines Matching defs:to
10 ** Unless required by applicable law or agreed to in writing, software
36 #include <cutils/log.h> // TODO: Move everything to base/logging.
86 PLOG(ERROR) << "Failed to prepare " << path;
90 PLOG(ERROR) << "Failed to setfilecon " << path;
97 PLOG(ERROR) << "Failed to prepare " << path;
102 PLOG(ERROR) << "Failed to setfilecon " << path;
111 PLOG(ERROR) << "Failed to prepare " << profile_path;
117 PLOG(ERROR) << "Failed to prepare " << profile_path;
121 // dex2oat/profman runs under the shared app gid and it needs to read/write reference
126 PLOG(ERROR) << "Failed to prepare " << ref_profile_path;
135 // This method only exists to upgrade system apps that have requested
138 // never want to risk exposing data on a device with real CE/DE storage.
147 PLOG(ERROR) << "Failed to mark default storage " << ce_path;
160 PLOG(ERROR) << "Failed to delete";
164 PLOG(ERROR) << "Failed to rename";
179 // Nothing to clear. That's ok.
192 // (the app will write again to the profile).
197 // eventually cleared by the app itself due to checksum mismatch.
201 // If the app attempts to acquire a lock while we've held one here,
312 // beneficial to keep the reference profile around.
313 // Verify if it's ok to do that.
326 auto to = create_data_app_package_path(to_uuid, data_app_name);
340 LOG(DEBUG) << "Copying " << from << " to " << to;
344 LOG(ERROR) << "Failed copying " << from << " to " << to
349 if (selinux_android_restorecon(to.c_str(), SELINUX_ANDROID_RESTORECON_RECURSE) != 0) {
350 LOG(ERROR) << "Failed to restorecon " << to;
367 LOG(ERROR) << "Failed to create package target on " << to_uuid;
384 auto to = create_data_user_de_path(to_uuid, user);
386 argv[7] = (char*) to.c_str();
388 LOG(DEBUG) << "Copying " << from << " to " << to;
391 LOG(ERROR) << "Failed copying " << from << " to " << to << " with status " << rc;
397 auto to = create_data_user_ce_path(to_uuid, user);
399 argv[7] = (char*) to.c_str();
401 LOG(DEBUG) << "Copying " << from << " to " << to;
404 LOG(ERROR) << "Failed copying " << from << " to " << to << " with status " << rc;
411 LOG(ERROR) << "Failed to restorecon";
424 auto to = create_data_app_package_path(to_uuid, data_app_name);
425 if (delete_dir_contents(to.c_str(), 1, NULL) != 0) {
426 LOG(WARNING) << "Failed to rollback " << to;
431 auto to = create_data_user_de_package_path(to_uuid, user, package_name);
432 if (delete_dir_contents(to.c_str(), 1, NULL) != 0) {
433 LOG(WARNING) << "Failed to rollback " << to;
437 auto to = create_data_user_ce_package_path(to_uuid, user, package_name);
438 if (delete_dir_contents(to.c_str(), 1, NULL) != 0) {
439 LOG(WARNING) << "Failed to rollback " << to;
472 /* Try to ensure free_size bytes of storage are available.
538 PLOG(WARNING) << "Failed to open " << path;
954 // above. If the default value is true, we can avoid to check whether this is a low-mem device,
985 PLOG(WARNING) << "Failed to close fd for " << description << " at index " << i;
995 // different points and it's possible we'll attempt to open a profile
998 PLOG(ERROR) << "Failed to open profile_dir: " << profile_dir;
1017 PLOG(ERROR) << "Failed to lstat profile_dir: " << profile_dir;
1051 // Open the reference profile in read-write mode as profman might need to save the merge.
1061 // Add to the lists only if both fds are valid.
1138 PLOG(WARNING) << "Failed to close fd for reference profile";
1198 PLOG(WARNING) << "Failed to close fd for reference profile";
1218 profman_args.push_back(StringPrintf("--dump-output-to-fd=%d", output_fd));
1270 ALOGE("profman dump: no profiles to dump for '%s'", pkgname);
1305 PLOG(WARNING) << "Failed to close fd for reference profile";
1362 // Note: the cache path will require an additional 5 bytes for ".swap", but we'll try to run
1364 // extension to the cache path (5 bytes).
1419 // Note: it's OK to not find a profile here.
1481 // Immediately unlink. We don't really want to hit flash.
1498 // Recreate is true since we do not want to modify a mapped image. If the app is already
1536 // Pass dex2oat the relative path to the input file.
1583 // We failed to compile. Unlink the reference profile. Current profiles are already unlinked
1607 ALOGE("Unable to unlink boot marker at %s, error=%s", boot_marker_path,
1626 ALOGW("Unable to make directory %s: %s\n", path, strerror(errno));
1650 ALOGE("failed to chown '%s': %s\n", pkgdir, strerror(errno));
1655 ALOGE("linklib() 1: failed to chmod '%s': %s\n", pkgdir, strerror(errno));
1690 ALOGE("linklib() 2: failed to chmod '%s': %s\n", pkgdir, strerror(errno));
1695 ALOGE("failed to chown '%s' : %s\n", pkgdir, strerror(errno));
1714 // Transform string /a/b/c.apk to (prefix)/a@b@c.apk@(suffix)
1715 // eg /a/b/c.apk to /data/resource-cache/a@b@c.apk@idmap
1795 exit(1); /* only if exec call to idmap failed */
1822 ALOGE("Package name or seinfo tag is null when trying to restorecon.");
1902 static bool unlink_and_rename(const char* from, const char* to) {
1906 if (stat(to, &s) == 0) {
1908 LOG(ERROR) << from << " is not a regular file to replace for A/B.";
1911 if (unlink(to) != 0) {
1912 LOG(ERROR) << "Could not unlink " << to << " to move A/B.";
1920 // Try to rename "to" to "from."
1921 if (rename(from, to) != 0) {
1922 PLOG(ERROR) << "Could not rename " << from << " to " << to;
1955 // Silently ignore for now. The service calling this isn't smart enough to understand
1961 // Try to unlink, but swallow errors.
1967 // Rename B to A.