summaryrefslogtreecommitdiff
path: root/src/home
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2020-05-05 09:55:53 +0200
committerLennart Poettering <lennart@poettering.net>2020-05-07 23:33:04 +0200
commitc07bf7a4edfa356d0b2dd7758f660624b5b97a06 (patch)
tree12799de52519db4f173e5c380c3930cfef59137d /src/home
parent1dfe5de09555d75b75b70df7eb4eae6461dbd3d1 (diff)
downloadsystemd-c07bf7a4edfa356d0b2dd7758f660624b5b97a06.tar.gz
homed: move supported_fstype() to home-util.c
That way we can use it from other modules too. Just some shifting around, no change in behaviour.
Diffstat (limited to 'src/home')
-rw-r--r--src/home/home-util.c6
-rw-r--r--src/home/home-util.h2
-rw-r--r--src/home/homework-luks.c7
3 files changed, 9 insertions, 6 deletions
diff --git a/src/home/home-util.c b/src/home/home-util.c
index 51406fd234..3fd57639f8 100644
--- a/src/home/home-util.c
+++ b/src/home/home-util.c
@@ -64,6 +64,12 @@ int suitable_image_path(const char *path) {
path_is_absolute(path);
}
+bool supported_fstype(const char *fstype) {
+ /* Limit the set of supported file systems a bit, as protection against little tested kernel file
+ * systems. Also, we only support the resize ioctls for these file systems. */
+ return STR_IN_SET(fstype, "ext4", "btrfs", "xfs");
+}
+
int split_user_name_realm(const char *t, char **ret_user_name, char **ret_realm) {
_cleanup_free_ char *user_name = NULL, *realm = NULL;
const char *c;
diff --git a/src/home/home-util.h b/src/home/home-util.h
index df20c0af71..78d6e7b417 100644
--- a/src/home/home-util.h
+++ b/src/home/home-util.h
@@ -12,6 +12,8 @@ bool suitable_user_name(const char *name);
int suitable_realm(const char *realm);
int suitable_image_path(const char *path);
+bool supported_fstype(const char *fstype);
+
int split_user_name_realm(const char *t, char **ret_user_name, char **ret_realm);
int bus_message_append_secret(sd_bus_message *m, UserRecord *secret);
diff --git a/src/home/homework-luks.c b/src/home/homework-luks.c
index 694f215b30..caa4168265 100644
--- a/src/home/homework-luks.c
+++ b/src/home/homework-luks.c
@@ -16,6 +16,7 @@
#include "fileio.h"
#include "fs-util.h"
#include "fsck-util.h"
+#include "home-util.h"
#include "homework-luks.h"
#include "homework-mount.h"
#include "id128-util.h"
@@ -39,12 +40,6 @@
* strictly round disk sizes down to the next 1K boundary.*/
#define DISK_SIZE_ROUND_DOWN(x) ((x) & ~UINT64_C(1023))
-static bool supported_fstype(const char *fstype) {
- /* Limit the set of supported file systems a bit, as protection against little tested kernel file
- * systems. Also, we only support the resize ioctls for these file systems. */
- return STR_IN_SET(fstype, "ext4", "btrfs", "xfs");
-}
-
static int probe_file_system_by_fd(
int fd,
char **ret_fstype,