int fs_mgr_do_format(struct fstab_rec *fstab, bool crypt_footer) { int rc = -EINVAL; ERROR("%s: Format %s as '%s'.\n", __func__, fstab->blk_device, fstab->fs_type); if (!strncmp(fstab->fs_type, "f2fs", 4)) { rc = format_f2fs(fstab->blk_device); } else if (!strncmp(fstab->fs_type, "ext4", 4)) { rc = format_ext4(fstab->blk_device, fstab->mount_point, crypt_footer); } else { ERROR("File system type '%s' is not supported\n", fstab->fs_type); } return rc; }
int fs_mgr_do_format(struct fstab_rec *fstab, bool crypt_footer) { int rc = -EINVAL; LERROR << __FUNCTION__ << ": Format " << fstab->blk_device << " as '" << fstab->fs_type << "'"; if (!strncmp(fstab->fs_type, "f2fs", 4)) { rc = format_f2fs(fstab->blk_device); } else if (!strncmp(fstab->fs_type, "ext4", 4)) { rc = format_ext4(fstab->blk_device, fstab->mount_point, crypt_footer); } else { LERROR << "File system type '" << fstab->fs_type << "' is not supported"; } return rc; }