summaryrefslogtreecommitdiff
path: root/tools/mkenvimage.c
diff options
context:
space:
mode:
authorMike Frysinger <vapier@gentoo.org>2012-07-18 16:59:45 +0000
committerWolfgang Denk <wd@denx.de>2012-07-20 08:53:34 +0200
commit4f7136e7c55e95aa3a5c6b99f9ef9f32c906612c (patch)
tree6a5983084837ec87b60fe20b8ada86fe89af8ad8 /tools/mkenvimage.c
parent6705e036ce2a815ff23eef0e4ed123550474516d (diff)
tools: clean up mingw ifdefs
We have a header file specifically for mingw cruft, so keep it there to avoid crap spreading into the main tools. This lets our devs just worry about *nix systems. Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Diffstat (limited to 'tools/mkenvimage.c')
-rw-r--r--tools/mkenvimage.c10
1 files changed, 2 insertions, 8 deletions
diff --git a/tools/mkenvimage.c b/tools/mkenvimage.c
index 4001d2f517..55212687e1 100644
--- a/tools/mkenvimage.c
+++ b/tools/mkenvimage.c
@@ -46,13 +46,6 @@
#define CRC_SIZE sizeof(uint32_t)
-#ifdef __MINGW32__
-#define FILE_PERM (S_IRUSR | S_IWUSR)
-#else
-#define FILE_PERM (S_IRUSR | S_IWUSR | S_IRGRP |\
- S_IWGRP)
-#endif
-
static void usage(const char *exec_name)
{
fprintf(stderr, "%s [-h] [-r] [-b] [-p <byte>] -s <environment partition size> -o <output> <input file>\n"
@@ -300,7 +293,8 @@ int main(int argc, char **argv)
if (!bin_filename || strcmp(bin_filename, "-") == 0) {
bin_fd = STDOUT_FILENO;
} else {
- bin_fd = creat(bin_filename, FILE_PERM);
+ bin_fd = creat(bin_filename, S_IRUSR | S_IWUSR | S_IRGRP |
+ S_IWGRP);
if (bin_fd == -1) {
fprintf(stderr, "Can't open output file \"%s\": %s\n",
bin_filename, strerror(errno));