summaryrefslogtreecommitdiff
path: root/src/import/import-dkr.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/import/import-dkr.c')
-rw-r--r--src/import/import-dkr.c34
1 files changed, 2 insertions, 32 deletions
diff --git a/src/import/import-dkr.c b/src/import/import-dkr.c
index 1a6cd4eaff..0e99275090 100644
--- a/src/import/import-dkr.c
+++ b/src/import/import-dkr.c
@@ -28,10 +28,11 @@
#include "btrfs-util.h"
#include "utf8.h"
#include "mkdir.h"
+#include "import-util.h"
#include "curl-util.h"
#include "aufs-util.h"
-#include "import-util.h"
#include "import-job.h"
+#include "import-common.h"
#include "import-dkr.h"
struct DkrImport {
@@ -854,34 +855,3 @@ int dkr_import_pull(DkrImport *i, const char *name, const char *tag, const char
return import_job_begin(i->images_job);
}
-
-bool dkr_name_is_valid(const char *name) {
- const char *slash, *p;
-
- if (isempty(name))
- return false;
-
- slash = strchr(name, '/');
- if (!slash)
- return false;
-
- if (!filename_is_valid(slash + 1))
- return false;
-
- p = strndupa(name, slash - name);
- if (!filename_is_valid(p))
- return false;
-
- return true;
-}
-
-bool dkr_id_is_valid(const char *id) {
-
- if (!filename_is_valid(id))
- return false;
-
- if (!in_charset(id, "0123456789abcdef"))
- return false;
-
- return true;
-}