Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in / Register
Toggle navigation
M
Magisk
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Administrator
Magisk
Commits
018c0064
Commit
018c0064
authored
Oct 22, 2018
by
topjohnwu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Make sure boot_img is initialized correctly
parent
c2b01637
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
3 deletions
+3
-3
bootimg.cpp
native/jni/magiskboot/bootimg.cpp
+3
-3
No files found.
native/jni/magiskboot/bootimg.cpp
View file @
018c0064
...
...
@@ -252,7 +252,7 @@ void boot_img::print_hdr() {
}
int
unpack
(
const
char
*
image
)
{
boot_img
boot
;
boot_img
boot
=
boot_img
()
;
int
ret
=
boot
.
parse_image
(
image
);
int
fd
;
...
...
@@ -290,7 +290,7 @@ int unpack(const char *image) {
#define file_align() write_zero(fd, align_off(lseek(fd, 0, SEEK_CUR) - header_off, boot.page_size()))
void
repack
(
const
char
*
orig_image
,
const
char
*
out_image
)
{
boot_img
boot
;
boot_img
boot
=
boot_img
()
;
off_t
header_off
,
kernel_off
,
ramdisk_off
,
second_off
,
extra_off
;
...
...
@@ -399,7 +399,7 @@ void repack(const char* orig_image, const char* out_image) {
// Map output image as rw
munmap
(
boot
.
map_addr
,
boot
.
map_size
);
mmap_rw
(
out_image
,
reinterpret_cast
<
void
**>
(
&
boot
.
map_addr
)
,
&
boot
.
map_size
);
mmap_rw
(
out_image
,
(
void
**
)
&
boot
.
map_addr
,
&
boot
.
map_size
);
// MTK headers
if
(
boot
.
flags
&
MTK_KERNEL
)
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment