summaryrefslogtreecommitdiff
path: root/src/shared/dissect-image.h
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2023-03-07 14:39:47 +0100
committerLennart Poettering <lennart@poettering.net>2023-03-09 16:15:26 +0100
commitc571dee74bf5bea67bbe94e3734d19b1092765dd (patch)
treece5bb0a2a4f7e6fdcb3e156a865fb29729b136d5 /src/shared/dissect-image.h
parent7d3b157b774600a48f8533491eefc01a8c96c4fb (diff)
downloadsystemd-c571dee74bf5bea67bbe94e3734d19b1092765dd.tar.gz
dissect: add new helper dissected_partition_fstype()
Initially we only have one user, but following patches will add more.
Diffstat (limited to 'src/shared/dissect-image.h')
-rw-r--r--src/shared/dissect-image.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/shared/dissect-image.h b/src/shared/dissect-image.h
index 6b90895216..ff69ec4539 100644
--- a/src/shared/dissect-image.h
+++ b/src/shared/dissect-image.h
@@ -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;
+}