mirror of
https://gitlab.rtems.org/rtems/rtos/rtems.git
synced 2026-09-26 20:40:44 +08:00
2011-01-17 Joel Sherrill <joel.sherrill@oarcorp.com>
* libmisc/shell/main_dd.c: Make symbol unique to avoid conflict with same name in <sys/stat.h>.
This commit is contained in:
@@ -1,3 +1,8 @@
|
||||
2011-01-17 Joel Sherrill <joel.sherrill@oarcorp.com>
|
||||
|
||||
* libmisc/shell/main_dd.c: Make symbol unique to avoid conflict with
|
||||
same name in <sys/stat.h>.
|
||||
|
||||
2011-01-17 Alin Rus <alin.codejunkie@gmail.com>
|
||||
|
||||
* posix/src/aio_cancel.c: Fixed ending of if braces.
|
||||
|
||||
@@ -76,7 +76,7 @@ __FBSDID("$FreeBSD: src/bin/dd/dd.c,v 1.43 2004/08/15 19:10:05 rwatson Exp $");
|
||||
#include "dd.h"
|
||||
#include "extern-dd.h"
|
||||
|
||||
#define DEFFILEMODE 0
|
||||
#define DD_DEFFILEMODE 0
|
||||
|
||||
static void dd_close(rtems_shell_dd_globals* globals);
|
||||
static void dd_in(rtems_shell_dd_globals* globals);
|
||||
@@ -194,14 +194,14 @@ setup(rtems_shell_dd_globals* globals)
|
||||
} else {
|
||||
#define OFLAGS \
|
||||
(O_CREAT | (ddflags & (C_SEEK | C_NOTRUNC) ? 0 : O_TRUNC))
|
||||
out.fd = open(out.name, O_RDWR | OFLAGS, DEFFILEMODE);
|
||||
out.fd = open(out.name, O_RDWR | OFLAGS, DD_DEFFILEMODE);
|
||||
/*
|
||||
* May not have read access, so try again with write only.
|
||||
* Without read we may have a problem if output also does
|
||||
* not support seeks.
|
||||
*/
|
||||
if (out.fd == -1) {
|
||||
out.fd = open(out.name, O_WRONLY | OFLAGS, DEFFILEMODE);
|
||||
out.fd = open(out.name, O_WRONLY | OFLAGS, DD_DEFFILEMODE);
|
||||
out.flags |= NOREAD;
|
||||
}
|
||||
if (out.fd == -1)
|
||||
|
||||
Reference in New Issue
Block a user