dissect: add new helper dissected_partition_fstype()

Initially we only have one user, but following patches will add more.
This commit is contained in:
Lennart Poettering
2023-03-09 16:15:26 +01:00
parent 7d3b157b77
commit c571dee74b
2 changed files with 7 additions and 1 deletions
+1 -1
View File
@@ -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;
+6
View File
@@ -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;
}