Merge branch 'ni/tuxbox' into ni/mp/tuxbox

Origin commit data
------------------
Commit: 89beeb2c10
Author: vanhofen <vanhofen@gmx.de>
Date: 2017-01-27 (Fri, 27 Jan 2017)
This commit is contained in:
vanhofen
2017-01-27 18:49:24 +01:00
51 changed files with 417 additions and 262 deletions

View File

@@ -66,6 +66,9 @@
#include <crc32.h>
#include <inttypes.h>
#if __cplusplus >= 201103
#include <algorithm>
#endif
#include <string>
#ifdef HAVE_CONFIG_H
@@ -759,7 +762,11 @@ void CMkfsJFFS2::pad_block_if_less_than(int req)
void CMkfsJFFS2::padblock(void)
{
while (out_ofs % erase_block_size) {
#if __cplusplus < 201103
full_write(out_fd, ffbuf, min(sizeof(ffbuf),
#else
full_write(out_fd, ffbuf, std::min(sizeof(ffbuf),
#endif
(size_t)(erase_block_size - (out_ofs % erase_block_size))));
}
}
@@ -872,7 +879,11 @@ void CMkfsJFFS2::create_target_filesystem(struct filesystem_entry *root)
}
} else {
while (out_ofs < pad_fs_size) {
#if __cplusplus < 201103
full_write(out_fd, ffbuf, min(sizeof(ffbuf), (size_t)(pad_fs_size - out_ofs)));
#else
full_write(out_fd, ffbuf, std::min(sizeof(ffbuf), (size_t)(pad_fs_size - out_ofs)));
#endif
}
}