kernel: Adapt to low version Android init process (#973)

1. Adapt to low version Android init process
2. Add stop hook output
3. Fix output with missing line breaks
This commit is contained in:
longhuan1999
2023-10-02 12:00:24 +08:00
committed by GitHub
parent 945e2c3209
commit 54ee400dc5
8 changed files with 89 additions and 29 deletions

View File

@@ -592,14 +592,14 @@ static bool add_filename_trans(struct policydb *db, const char *s,
trans = (struct filename_trans_datum *)kcalloc(sizeof(*trans),
1, GFP_ATOMIC);
if (!trans) {
pr_err("add_filename_trans: Failed to alloc datum");
pr_err("add_filename_trans: Failed to alloc datum\n");
return false;
}
struct filename_trans *new_key =
(struct filename_trans *)kmalloc(sizeof(*new_key),
GFP_ATOMIC);
if (!new_key) {
pr_err("add_filename_trans: Failed to alloc new_key");
pr_err("add_filename_trans: Failed to alloc new_key\n");
return false;
}
*new_key = key;