Commit 6dc9ccad authored by topjohnwu's avatar topjohnwu

Use const char*

parent 6add0270
......@@ -370,7 +370,7 @@ int main(int argc, char *argv[]) {
if (cmd.skip_initramfs) {
// Clear rootfs
excl_list = (char *[]) { "overlay", ".backup", "proc", "sys", "init.bak", NULL };
excl_list = (const char *[]) { "overlay", ".backup", "proc", "sys", "init.bak", NULL };
frm_rf(root);
} else {
// Revert original init binary
......@@ -399,7 +399,7 @@ int main(int argc, char *argv[]) {
int system_root = open("/system_root", O_RDONLY | O_CLOEXEC);
// Clone rootfs except /system
excl_list = (char *[]) { "system", NULL };
excl_list = (const char *[]) { "system", NULL };
clone_dir(system_root, root);
close(system_root);
......
......@@ -15,7 +15,7 @@
#include "utils.h"
#include "selinux.h"
char **excl_list = NULL;
const char **excl_list = NULL;
static int is_excl(const char *name) {
if (excl_list)
......
......@@ -109,7 +109,7 @@ int __fsetxattr(int fd, const char *name, const void *value, size_t size, int fl
#define align(p, a) (((p) + (a) - 1) / (a) * (a))
#define align_off(p, a) (align(p, a) - (p))
extern char **excl_list;
extern const char **excl_list;
struct file_attr {
struct stat st;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment