From f7ae72a36c5309218db1671c5623c3b689d81e6d Mon Sep 17 00:00:00 2001 From: topjohnwu Date: Sat, 23 Feb 2019 02:42:26 -0500 Subject: [PATCH] Move CPIO to libutils --- native/jni/Android.mk | 1 - native/jni/magiskboot/ramdisk.cpp | 2 +- native/jni/utils/Android.mk | 1 + native/jni/{magiskboot => utils}/cpio.cpp | 4 ++-- native/jni/{magiskboot => utils/include}/cpio.h | 0 5 files changed, 4 insertions(+), 4 deletions(-) rename native/jni/{magiskboot => utils}/cpio.cpp (99%) rename native/jni/{magiskboot => utils/include}/cpio.h (100%) diff --git a/native/jni/Android.mk b/native/jni/Android.mk index 4064c71cb..41f475787 100644 --- a/native/jni/Android.mk +++ b/native/jni/Android.mk @@ -100,7 +100,6 @@ LOCAL_C_INCLUDES := \ LOCAL_SRC_FILES := \ magiskboot/main.cpp \ - magiskboot/cpio.cpp \ magiskboot/bootimg.cpp \ magiskboot/hexpatch.cpp \ magiskboot/compress.cpp \ diff --git a/native/jni/magiskboot/ramdisk.cpp b/native/jni/magiskboot/ramdisk.cpp index 679713d59..52f01a671 100644 --- a/native/jni/magiskboot/ramdisk.cpp +++ b/native/jni/magiskboot/ramdisk.cpp @@ -3,9 +3,9 @@ #include #include +#include #include "magiskboot.h" -#include "cpio.h" using namespace std; diff --git a/native/jni/utils/Android.mk b/native/jni/utils/Android.mk index 7dc3883a6..5c0c78b6c 100644 --- a/native/jni/utils/Android.mk +++ b/native/jni/utils/Android.mk @@ -9,6 +9,7 @@ LOCAL_SRC_FILES := \ misc.cpp \ selinux.cpp \ logging.cpp \ + cpio.cpp \ xwrap.cpp include $(BUILD_STATIC_LIBRARY) diff --git a/native/jni/magiskboot/cpio.cpp b/native/jni/utils/cpio.cpp similarity index 99% rename from native/jni/magiskboot/cpio.cpp rename to native/jni/utils/cpio.cpp index 57e978429..b6e469824 100644 --- a/native/jni/magiskboot/cpio.cpp +++ b/native/jni/utils/cpio.cpp @@ -3,10 +3,10 @@ #include #include #include + #include #include - -#include "cpio.h" +#include using namespace std; diff --git a/native/jni/magiskboot/cpio.h b/native/jni/utils/include/cpio.h similarity index 100% rename from native/jni/magiskboot/cpio.h rename to native/jni/utils/include/cpio.h