Lines Matching refs:mentry
51 INIT_STATIC bool IsSkipRemount(const struct mntent mentry)
53 if (mentry.mnt_type == NULL || mentry.mnt_dir == NULL) {
56 if (!MntNeedRemount(mentry.mnt_dir)) {
59 if (strncmp(mentry.mnt_type, "erofs", strlen("erofs")) != 0) {
63 if (strncmp(mentry.mnt_fsname, "/dev/block/dm-", strlen("/dev/block/dm-")) != 0) {
160 INIT_STATIC bool DoRemount(struct mntent *mentry, bool *result)
165 ret = sscanf_s(mentry->mnt_fsname + strlen("/dev/block/dm-"), "%d", &devNum);
178 if (strncmp(mentry->mnt_dir, PREFIX_LOWER, strlen(PREFIX_LOWER)) == 0) {
179 mnt = mentry->mnt_dir + strlen(PREFIX_LOWER);
181 mnt = mentry->mnt_dir;
200 if (strncmp(mentry->mnt_dir, "/mnt/lower", strlen("/mnt/lower")) == 0) {
258 INIT_STATIC bool DoSystemRemount(struct mntent *mentry, bool *result)
262 ret = sscanf_s(mentry->mnt_fsname + strlen("/dev/block/dm-"), "%d", &devNum);
402 struct mntent *mentry = NULL;
408 while (NULL != (mentry = getmntent(fp))) {
409 if (IsSkipRemount(*mentry)) {
410 INIT_LOGI("skip remount %s", mentry->mnt_dir);
414 if (strcmp(mentry->mnt_dir, ROOT_MOUNT_DIR) == 0) {
415 DoSystemRemount(mentry, &result);
418 INIT_LOGI("do remount %s", mentry->mnt_dir);
419 if (!DoRemount(mentry, &result)) {
421 INIT_LOGE("do remount failed on %s", mentry->mnt_dir);