chiark
/
gitweb
/
~ianmdlvl
/
elogind.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
unit: set default working directory to the user's home directory when running in...
[elogind.git]
/
src
/
core
/
swap.c
diff --git
a/src/core/swap.c
b/src/core/swap.c
index f3c7fa30766ca3a0272715d7b4245b2854dee3a9..ed61ba3c816493e466fca490966a38d4f5f3eaf7 100644
(file)
--- a/
src/core/swap.c
+++ b/
src/core/swap.c
@@
-294,6
+294,10
@@
static int swap_load(Unit *u) {
if (UNIT(s)->default_dependencies)
if ((r = swap_add_default_dependencies(s)) < 0)
return r;
if (UNIT(s)->default_dependencies)
if ((r = swap_add_default_dependencies(s)) < 0)
return r;
+
+ r = unit_patch_working_directory(UNIT(s), &s->exec_context);
+ if (r < 0)
+ return r;
}
return swap_verify(s);
}
return swap_verify(s);
@@
-1335,7
+1339,6
@@
static const char* const swap_result_table[_SWAP_RESULT_MAX] = {
DEFINE_STRING_TABLE_LOOKUP(swap_result, SwapResult);
const UnitVTable swap_vtable = {
DEFINE_STRING_TABLE_LOOKUP(swap_result, SwapResult);
const UnitVTable swap_vtable = {
- .suffix = ".swap",
.object_size = sizeof(Swap),
.sections =
"Unit\0"
.object_size = sizeof(Swap),
.sections =
"Unit\0"