summaryrefslogtreecommitdiff
path: root/src/import/pull-tar.c
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2015-08-23 14:30:52 +0200
committerLennart Poettering <lennart@poettering.net>2015-08-24 22:46:45 +0200
commit25300b5a1fcf54674a69d0f4ab08925be00b0227 (patch)
treea29da7b64948e59d558fe4051893e1161e2df4e6 /src/import/pull-tar.c
parentb59abc4d1e5c8e99323f404ef4a09bd6da68064f (diff)
util: make machine_name_is_valid() a macro and move it to hostname-util.h
As it turns out machine_name_is_valid() does the exact same thing as hostname_is_valid() these days, as it just invoked that and checked the name length was < 64. However, hostname_is_valid() checks the length against HOST_NAME_MAX anyway (which is 64 on Linux), hence any additional check is redundant. We hence replace machine_name_is_valid() by a macro that simply maps it to hostname_is_valid() but sets the allow_trailing_dot parameter to false. We also move this this call to hostname-util.h, to the same place as the hostname_is_valid() declaration.
Diffstat (limited to 'src/import/pull-tar.c')
-rw-r--r--src/import/pull-tar.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/import/pull-tar.c b/src/import/pull-tar.c
index 71b8908a58..d38a2158c4 100644
--- a/src/import/pull-tar.c
+++ b/src/import/pull-tar.c
@@ -32,13 +32,14 @@
#include "mkdir.h"
#include "rm-rf.h"
#include "path-util.h"
+#include "process-util.h"
+#include "hostname-util.h"
#include "import-util.h"
#include "import-common.h"
#include "curl-util.h"
#include "pull-job.h"
#include "pull-common.h"
#include "pull-tar.h"
-#include "process-util.h"
typedef enum TarProgress {
TAR_DOWNLOADING,