chiark
/
gitweb
/
~ianmdlvl
/
elogind.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
64e70e4
)
gpt-auto-generator: Generate explicit dependencies on systemd-fsck@.service instead...
author
Thomas Bächler
<thomas@archlinux.org>
Sun, 29 Sep 2013 23:34:45 +0000
(
01:34
+0200)
committer
Tom Gundersen
<teg@jklm.no>
Sat, 19 Oct 2013 10:23:17 +0000
(12:23 +0200)
[tomegun: check for OOM]
src/gpt-auto-generator/gpt-auto-generator.c
patch
|
blob
|
history
diff --git
a/src/gpt-auto-generator/gpt-auto-generator.c
b/src/gpt-auto-generator/gpt-auto-generator.c
index fae4b7112c31801e5d2ef039b92d841b444fc0c9..25440e771ece5bfa90d2cd4d13c710ba9e9d6a87 100644
(file)
--- a/
src/gpt-auto-generator/gpt-auto-generator.c
+++ b/
src/gpt-auto-generator/gpt-auto-generator.c
@@
-182,7
+182,7
@@
static int add_swap(const char *path, const char *fstype) {
}
static int add_home(const char *path, const char *fstype) {
}
static int add_home(const char *path, const char *fstype) {
- _cleanup_free_ char *unit = NULL, *lnk = NULL;
+ _cleanup_free_ char *unit = NULL, *lnk = NULL
, *fsck = NULL
;
_cleanup_fclose_ FILE *f = NULL;
if (dir_is_empty("/home") <= 0)
_cleanup_fclose_ FILE *f = NULL;
if (dir_is_empty("/home") <= 0)
@@
-200,19
+200,23
@@
static int add_home(const char *path, const char *fstype) {
return -errno;
}
return -errno;
}
+ fsck = unit_name_from_path_instance("systemd-fsck", path, ".service");
+ if (!fsck)
+ return log_oom();
+
fprintf(f,
"# Automatically generated by systemd-gpt-auto-generator\n\n"
"[Unit]\n"
"DefaultDependencies=no\n"
fprintf(f,
"# Automatically generated by systemd-gpt-auto-generator\n\n"
"[Unit]\n"
"DefaultDependencies=no\n"
- "After=" SPECIAL_LOCAL_FS_PRE_TARGET "\n"
+ "Requires=%s\n"
+ "After=" SPECIAL_LOCAL_FS_PRE_TARGET " %s\n"
"Conflicts=" SPECIAL_UMOUNT_TARGET "\n"
"Before=" SPECIAL_UMOUNT_TARGET " " SPECIAL_LOCAL_FS_TARGET "\n\n"
"[Mount]\n"
"What=%s\n"
"Where=/home\n"
"Conflicts=" SPECIAL_UMOUNT_TARGET "\n"
"Before=" SPECIAL_UMOUNT_TARGET " " SPECIAL_LOCAL_FS_TARGET "\n\n"
"[Mount]\n"
"What=%s\n"
"Where=/home\n"
- "Type=%s\n"
- "FsckPassNo=2\n",
- path, fstype);
+ "Type=%s\n",
+ fsck, fsck, path, fstype);
fflush(f);
if (ferror(f)) {
fflush(f);
if (ferror(f)) {