dissect: add new helper dissected_partition_fstype()
Initially we only have one user, but following patches will add more.
This commit is contained in:
@@ -1523,7 +1523,7 @@ static int mount_partition(
|
||||
|
||||
/* Use decrypted node and matching fstype if available, otherwise use the original device */
|
||||
node = FORMAT_PROC_FD_PATH(m->mount_node_fd);
|
||||
fstype = m->decrypted_node ? m->decrypted_fstype: m->fstype;
|
||||
fstype = dissected_partition_fstype(m);
|
||||
|
||||
if (!fstype)
|
||||
return -EAFNOSUPPORT;
|
||||
|
||||
@@ -193,3 +193,9 @@ int dissect_fstype_ok(const char *fstype);
|
||||
|
||||
int probe_sector_size(int fd, uint32_t *ret);
|
||||
int probe_sector_size_prefer_ioctl(int fd, uint32_t *ret);
|
||||
|
||||
static inline const char *dissected_partition_fstype(const DissectedPartition *m) {
|
||||
assert(m);
|
||||
|
||||
return m->decrypted_node ? m->decrypted_fstype : m->fstype;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user