mirror of
https://github.com/tuxbox-neutrino/neutrino.git
synced 2025-08-28 16:01:20 +02:00
update_ext: fix build with glibc > 2.21 (open needs mode)
This commit is contained in:
@@ -324,7 +324,7 @@ bool CExtUpdate::applySettings()
|
|||||||
fd2 = -1;
|
fd2 = -1;
|
||||||
int tmpCount = 0;
|
int tmpCount = 0;
|
||||||
while (fd2 < 0) {
|
while (fd2 < 0) {
|
||||||
fd2 = open(mtdBlockFileName.c_str(), O_WRONLY);
|
fd2 = open(mtdBlockFileName.c_str(), O_WRONLY, 00644);
|
||||||
tmpCount++;
|
tmpCount++;
|
||||||
if (tmpCount > 3)
|
if (tmpCount > 3)
|
||||||
break;
|
break;
|
||||||
@@ -375,7 +375,7 @@ bool CExtUpdate::applySettings()
|
|||||||
if (fd1 < 0)
|
if (fd1 < 0)
|
||||||
return ErrorReset(RESET_UNLOAD | DELETE_MTDBUF, "cannot read mtdBlock");
|
return ErrorReset(RESET_UNLOAD | DELETE_MTDBUF, "cannot read mtdBlock");
|
||||||
fsize = mtdRamSize;
|
fsize = mtdRamSize;
|
||||||
fd2 = open(imgFilename.c_str(), O_WRONLY | O_CREAT);
|
fd2 = open(imgFilename.c_str(), O_WRONLY | O_CREAT, 00644);
|
||||||
if (fd2 < 0)
|
if (fd2 < 0)
|
||||||
return ErrorReset(RESET_UNLOAD | CLOSE_FD1 | DELETE_MTDBUF, "cannot open image file: ", imgFilename);
|
return ErrorReset(RESET_UNLOAD | CLOSE_FD1 | DELETE_MTDBUF, "cannot open image file: ", imgFilename);
|
||||||
while(fsize > 0) {
|
while(fsize > 0) {
|
||||||
|
Reference in New Issue
Block a user