Initially we only have one user, but following patches will add more.
/* 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;
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;
+}