chiark
/
gitweb
/
~ianmdlvl
/
elogind.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
import: add support for pulling raw tar balls as containers
[elogind.git]
/
src
/
import
/
import-raw.c
diff --git
a/src/import/import-raw.c
b/src/import/import-raw.c
index 486157aa9676a7a1c1b61e0a1f11f382be070f24..1fe27b6932025bf9f10b3cfe1c9ada67061097d5 100644
(file)
--- a/
src/import/import-raw.c
+++ b/
src/import/import-raw.c
@@
-30,6
+30,7
@@
#include "qcow2-util.h"
#include "strv.h"
#include "copy.h"
#include "qcow2-util.h"
#include "strv.h"
#include "copy.h"
+#include "import-util.h"
#include "import-raw.h"
typedef struct RawImportFile RawImportFile;
#include "import-raw.h"
typedef struct RawImportFile RawImportFile;
@@
-691,17
+692,6
@@
static int raw_import_file_progress_callback(void *userdata, curl_off_t dltotal,
return 0;
}
return 0;
}
-static bool etag_is_valid(const char *etag) {
-
- if (!endswith(etag, "\""))
- return false;
-
- if (!startswith(etag, "\"") && !startswith(etag, "W/\""))
- return false;
-
- return true;
-}
-
static int raw_import_file_find_old_etags(RawImportFile *f) {
_cleanup_free_ char *escaped_url = NULL;
_cleanup_closedir_ DIR *d = NULL;
static int raw_import_file_find_old_etags(RawImportFile *f) {
_cleanup_free_ char *escaped_url = NULL;
_cleanup_closedir_ DIR *d = NULL;
@@
-751,7
+741,7
@@
static int raw_import_file_find_old_etags(RawImportFile *f) {
if (!u)
return -ENOMEM;
if (!u)
return -ENOMEM;
- if (!etag_is_valid(u)) {
+ if (!
http_
etag_is_valid(u)) {
free(u);
continue;
}
free(u);
continue;
}