summaryrefslogtreecommitdiff
path: root/src/blob.c
diff options
context:
space:
mode:
authorTimo Teräs <timo.teras@iki.fi>2015-04-08 11:08:16 +0300
committerTimo Teräs <timo.teras@iki.fi>2015-04-08 11:08:16 +0300
commit23d0a2244aa712ca33aa4ea9655298c095b8f0ba (patch)
tree03b38d91a7ea302bde66267d23319ab8cea70749 /src/blob.c
parent941fc1b10c00e904fb9fbd7b82e61f8f12e210bb (diff)
downloadapk-tools-23d0a2244aa712ca33aa4ea9655298c095b8f0ba.tar.gz
apk-tools-23d0a2244aa712ca33aa4ea9655298c095b8f0ba.tar.bz2
apk-tools-23d0a2244aa712ca33aa4ea9655298c095b8f0ba.tar.xz
apk-tools-23d0a2244aa712ca33aa4ea9655298c095b8f0ba.zip
ignore .apk-new files for overlays
Diffstat (limited to 'src/blob.c')
-rw-r--r--src/blob.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/blob.c b/src/blob.c
index f1fe221..007a0cd 100644
--- a/src/blob.c
+++ b/src/blob.c
@@ -225,6 +225,12 @@ int apk_blob_compare(apk_blob_t a, apk_blob_t b)
return 1;
}
+int apk_blob_ends_with(apk_blob_t a, apk_blob_t b)
+{
+ if (a.len < b.len) return 0;
+ return memcmp(a.ptr+a.len-b.len, b.ptr, b.len) == 0;
+}
+
int apk_blob_for_each_segment(apk_blob_t blob, const char *split,
int (*cb)(void *ctx, apk_blob_t blob), void *ctx)
{