liblp: partition_opener: fix log; more logs

Test: manual
Change-Id: I48777a479651dbd389e0a4420505342cb272b9f2
This commit is contained in:
Yifan Hong 2018-11-14 14:44:07 -08:00
parent b9cb149441
commit 098cc974de

View file

@ -53,18 +53,18 @@ bool GetBlockDeviceInfo(const std::string& block_device, BlockDeviceInfo* device
return false;
}
if (ioctl(fd, BLKIOMIN, &device_info->alignment) < 0) {
PERROR << __PRETTY_FUNCTION__ << "BLKIOMIN failed";
PERROR << __PRETTY_FUNCTION__ << "BLKIOMIN failed on " << block_device;
return false;
}
int alignment_offset;
if (ioctl(fd, BLKALIGNOFF, &alignment_offset) < 0) {
PERROR << __PRETTY_FUNCTION__ << "BLKIOMIN failed";
PERROR << __PRETTY_FUNCTION__ << "BLKALIGNOFF failed on " << block_device;
return false;
}
int logical_block_size;
if (ioctl(fd, BLKSSZGET, &logical_block_size) < 0) {
PERROR << __PRETTY_FUNCTION__ << "BLKSSZGET failed";
PERROR << __PRETTY_FUNCTION__ << "BLKSSZGET failed on " << block_device;
return false;
}