summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2010-10-08 02:43:05 +0200
committerLennart Poettering <lennart@poettering.net>2010-10-08 02:43:08 +0200
commit40b8a33210fcfb28e7e8b775e265e249583d81ec (patch)
tree4e7ae4eb14c6ff0abf7e75bf52172f48794ecb0d
parent00dc5d769ac4a4019d6b6fe22e8383ec8b030a96 (diff)
mount: properly handle NULL fstype
https://bugzilla.redhat.com/show_bug.cgi?id=636752
-rw-r--r--src/mount.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/mount.c b/src/mount.c
index dcf0a43474..fefe76bb4d 100644
--- a/src/mount.c
+++ b/src/mount.c
@@ -282,7 +282,7 @@ static int mount_add_target_links(Mount *m) {
automount = !!mount_test_option(p->options, "comment=systemd.automount");
if (mount_test_option(p->options, "_netdev") ||
- fstype_is_network(p->fstype)) {
+ (p->fstype && fstype_is_network(p->fstype))) {
target = SPECIAL_REMOTE_FS_TARGET;
if (m->meta.manager->running_as == MANAGER_SYSTEM)
@@ -794,7 +794,7 @@ static void mount_enter_mounting(Mount *m) {
"/bin/mount",
m->parameters_fragment.what,
m->where,
- "-t", m->parameters_fragment.fstype,
+ "-t", m->parameters_fragment.fstype ? m->parameters_fragment.fstype : "auto",
m->parameters_fragment.options ? "-o" : NULL, m->parameters_fragment.options,
NULL);
else if (m->from_etc_fstab)
@@ -859,7 +859,7 @@ static void mount_enter_remounting(Mount *m, bool success) {
"/bin/mount",
m->parameters_fragment.what,
m->where,
- "-t", m->parameters_fragment.fstype,
+ "-t", m->parameters_fragment.fstype ? m->parameters_fragment.fstype : "auto",
"-o", o,
NULL);