-
Notifications
You must be signed in to change notification settings - Fork 506
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refresh handle-read-only-files.patch Signed-off-by: Wang Mingyu <[email protected]> Signed-off-by: Richard Purdie <[email protected]>
- Loading branch information
1 parent
ada5da0
commit 978f04f
Showing
2 changed files
with
10 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -15,10 +15,10 @@ Signed-off-by: Fabio Berton <[email protected]> | |
1 file changed, 15 insertions(+), 1 deletion(-) | ||
|
||
diff --git a/src/patchelf.cc b/src/patchelf.cc | ||
index fd1e7b7..a941da1 100644 | ||
index 1aeae88..6b77afe 100644 | ||
--- a/src/patchelf.cc | ||
+++ b/src/patchelf.cc | ||
@@ -527,9 +527,19 @@ void ElfFile<ElfFileParamNames>::sortShdrs() | ||
@@ -534,9 +534,19 @@ void ElfFile<ElfFileParamNames>::sortShdrs() | ||
|
||
static void writeFile(const std::string & fileName, const FileContents & contents) | ||
{ | ||
|
@@ -39,14 +39,17 @@ index fd1e7b7..a941da1 100644 | |
if (fd == -1) | ||
error("open"); | ||
|
||
@@ -543,6 +553,10 @@ static void writeFile(const std::string & fileName, const FileContents & content | ||
|
||
if (close(fd) != 0) | ||
error("close"); | ||
@@ -564,6 +574,10 @@ static void writeFile(const std::string & fileName, const FileContents & content | ||
if (errno == EINTR) | ||
return; | ||
error("close"); | ||
+ | ||
+ if (chmod(fileName.c_str(), st.st_mode) != 0) | ||
+ error("chmod"); | ||
+ | ||
} | ||
|
||
|
||
-- | ||
2.25.1 | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters