Home
last modified time | relevance | path

Searched refs:nr_sec (Results 1 – 6 of 6) sorted by relevance

/system/vold/
DVoldUtil.cpp22 void get_blkdev_size(int fd, unsigned long* nr_sec) { in get_blkdev_size() argument
23 if ((ioctl(fd, BLKGETSIZE, nr_sec)) == -1) { in get_blkdev_size()
24 *nr_sec = 0; in get_blkdev_size()
DMetadataCrypt.cpp102 static bool get_number_of_sectors(const std::string& real_blkdev, uint64_t *nr_sec) { in get_number_of_sectors() argument
116 *nr_sec = res; in get_number_of_sectors()
139 static bool create_crypto_blk_dev(const std::string& dm_name, uint64_t nr_sec, in create_crypto_blk_dev() argument
178 tgt->length = nr_sec; in create_crypto_blk_dev()
220 uint64_t nr_sec; in e4crypt_mount_metadata_encrypted() local
221 if (!get_number_of_sectors(data_rec->blk_device, &nr_sec)) return false; in e4crypt_mount_metadata_encrypted()
223 if (!create_crypto_blk_dev(kDmNameUserdata, nr_sec, DEFAULT_KEY_TARGET_TYPE, in e4crypt_mount_metadata_encrypted()
228 LOG(INFO) << "Beginning inplace encryption, nr_sec: " << nr_sec; in e4crypt_mount_metadata_encrypted()
232 nr_sec, &size_already_done, nr_sec, 0, false); in e4crypt_mount_metadata_encrypted()
237 if (static_cast<uint64_t>(size_already_done) != nr_sec) { in e4crypt_mount_metadata_encrypted()
DVoldUtil.h27 void get_blkdev_size(int fd, unsigned long* nr_sec);
Dcryptfs.cpp462 unsigned long nr_sec = 0; in get_crypt_ftr_info() local
463 get_blkdev_size(fd, &nr_sec); in get_crypt_ftr_info()
464 if (nr_sec != 0) { in get_crypt_ftr_info()
470 cached_off = ((off64_t)nr_sec * 512) - CRYPT_FOOTER_OFFSET; in get_crypt_ftr_info()
1888 unsigned long nr_sec = 0; in cryptfs_setup_ext_volume() local
1889 get_blkdev_size(fd, &nr_sec); in cryptfs_setup_ext_volume()
1892 if (nr_sec == 0) { in cryptfs_setup_ext_volume()
1899 ext_crypt_ftr.fs_size = nr_sec; in cryptfs_setup_ext_volume()
2212 unsigned long nr_sec; in cryptfs_enable_internal() local
2213 get_blkdev_size(fd, &nr_sec); in cryptfs_enable_internal()
[all …]
DUtils.cpp566 unsigned long nr_sec = 0; in WipeBlockDevice() local
575 if ((ioctl(fd, BLKGETSIZE, &nr_sec)) == -1) { in WipeBlockDevice()
581 range[1] = (unsigned long long) nr_sec * 512; in WipeBlockDevice()
/system/vold/model/
DObbVolume.cpp62 unsigned long nr_sec = 0; in doCreate() local
70 get_blkdev_size(loop_fd.get(), &nr_sec); in doCreate()
71 if (nr_sec == 0) { in doCreate()
78 if (Devmapper::create(getId().c_str(), mLoopPath.c_str(), mSourceKey.c_str(), nr_sec, in doCreate()