diff options
author | Lennart Poettering <lennart@poettering.net> | 2018-11-20 11:18:22 +0100 |
---|---|---|
committer | Lennart Poettering <lennart@poettering.net> | 2018-11-20 11:18:22 +0100 |
commit | 6bf3c61c57f1ba439b2124fb89229395a77f8f46 (patch) | |
tree | 528b456d3f556a36c26d2808b73e216f6a72d9fc /src/partition | |
parent | afe44c8ffd389b6296713acc8d56c68d2e44994b (diff) | |
download | systemd-6bf3c61c57f1ba439b2124fb89229395a77f8f46.tar.gz systemd-6bf3c61c57f1ba439b2124fb89229395a77f8f46.tar.bz2 systemd-6bf3c61c57f1ba439b2124fb89229395a77f8f46.zip |
log: introduce new helper call log_setup_service()
Let's reduce the common boilerplate and have a single setup function
used by all service code to setup logging.
Diffstat (limited to 'src/partition')
-rw-r--r-- | src/partition/growfs.c | 4 | ||||
-rw-r--r-- | src/partition/makefs.c | 4 |
2 files changed, 2 insertions, 6 deletions
diff --git a/src/partition/growfs.c b/src/partition/growfs.c index 2712849414..673b651da6 100644 --- a/src/partition/growfs.c +++ b/src/partition/growfs.c @@ -231,9 +231,7 @@ int main(int argc, char *argv[]) { struct statfs sfs; int r; - log_set_target(LOG_TARGET_AUTO); - log_parse_environment(); - log_open(); + log_setup_service(); r = parse_argv(argc, argv); if (r < 0) diff --git a/src/partition/makefs.c b/src/partition/makefs.c index b2702d20f7..22ff83dc77 100644 --- a/src/partition/makefs.c +++ b/src/partition/makefs.c @@ -49,9 +49,7 @@ static int run(int argc, char *argv[]) { struct stat st; int r; - log_set_target(LOG_TARGET_AUTO); - log_parse_environment(); - log_open(); + log_setup_service(); if (argc != 3) { log_error("This program expects two arguments."); |