* [ECOS] [PATCH] correcting fcnlt flags in hal/synth/hal_io.h
@ 2004-05-26 12:16 Neundorf, Alexander
2004-05-27 13:43 ` Andrew Lunn
0 siblings, 1 reply; 2+ messages in thread
From: Neundorf, Alexander @ 2004-05-26 12:16 UTC (permalink / raw)
To: ecos-discuss
[-- Attachment #1: Type: text/plain, Size: 252 bytes --]
Hi,
as reported earlier, the fcntl flags in hal/synth/arch/current/include/hal_io.h are not completely correct, they miss the leading 0 so that they are interpreted as decimal instead of octal.
A patch which fixes this is attached.
Bye
Alex
[-- Attachment #2: hal_io.h.diff --]
[-- Type: application/octet-stream, Size: 1644 bytes --]
--- save/packages/hal/synth/arch/current/include/hal_io.h Sun Sep 15 19:53:11 2002
+++ ecos/packages/hal/synth/arch/current/include/hal_io.h Wed May 26 12:58:34 2004
@@ -349,25 +349,25 @@ struct cyg_hal_sys_itimerval {
/* open/fcntl flags */
#define CYG_HAL_SYS_O_RDONLY 0
-#define CYG_HAL_SYS_O_WRONLY 1
-#define CYG_HAL_SYS_O_RDWR 2
-#define CYG_HAL_SYS_O_CREAT 100
-#define CYG_HAL_SYS_O_EXCL 200
-#define CYG_HAL_SYS_O_NOCTTY 400
-#define CYG_HAL_SYS_O_TRUNC 1000
-#define CYG_HAL_SYS_O_APPEND 2000
-#define CYG_HAL_SYS_O_NONBLOCK 4000
+#define CYG_HAL_SYS_O_WRONLY 01
+#define CYG_HAL_SYS_O_RDWR 02
+#define CYG_HAL_SYS_O_CREAT 0100
+#define CYG_HAL_SYS_O_EXCL 0200
+#define CYG_HAL_SYS_O_NOCTTY 0400
+#define CYG_HAL_SYS_O_TRUNC 01000
+#define CYG_HAL_SYS_O_APPEND 02000
+#define CYG_HAL_SYS_O_NONBLOCK 04000
#define CYG_HAL_SYS_O_NDELAY CYG_HAL_SYS_O_NONBLOCK
-#define CYG_HAL_SYS_O_SYNC 10000
+#define CYG_HAL_SYS_O_SYNC 010000
#define CYG_HAL_SYS_O_FSYNC CYG_HAL_SYS_O_SYNC
-#define CYG_HAL_SYS_O_ASYNC 20000
+#define CYG_HAL_SYS_O_ASYNC 020000
/* open mode flags */
-#define CYG_HAL_SYS_S_IRUSR 400
+#define CYG_HAL_SYS_S_IRUSR 0400
#define CYG_HAL_SYS_S_IREAD CYG_HAL_SYS_S_IRUSR
-#define CYG_HAL_SYS_S_IWUSR 200
+#define CYG_HAL_SYS_S_IWUSR 0200
#define CYG_HAL_SYS_S_IWRITE CYG_HAL_SYS_S_IWUSR
-#define CYG_HAL_SYS_S_IXUSR 100
+#define CYG_HAL_SYS_S_IXUSR 0100
#define CYG_HAL_SYS_S_IEXEC CYG_HAL_SYS_S_IXUSR
#define CYG_HAL_SYS_S_IRWXU \
(CYG_HAL_SYS_S_IREAD|CYG_HAL_SYS_S_IWRITE|CYG_HAL_SYS_S_IEXEC)
[-- Attachment #3: Type: text/plain, Size: 148 bytes --]
--
Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [ECOS] [PATCH] correcting fcnlt flags in hal/synth/hal_io.h
2004-05-26 12:16 [ECOS] [PATCH] correcting fcnlt flags in hal/synth/hal_io.h Neundorf, Alexander
@ 2004-05-27 13:43 ` Andrew Lunn
0 siblings, 0 replies; 2+ messages in thread
From: Andrew Lunn @ 2004-05-27 13:43 UTC (permalink / raw)
To: Neundorf, Alexander; +Cc: ecos-discuss
[-- Attachment #1: Type: text/plain, Size: 411 bytes --]
On Wed, May 26, 2004 at 12:50:38PM +0200, Neundorf, Alexander wrote:
> Hi,
>
> as reported earlier, the fcntl flags in
> hal/synth/arch/current/include/hal_io.h are not completely correct,
> they miss the leading 0 so that they are interpreted as decimal
> instead of octal.
I received a ChangeLog entry seperatly. Attached is the complete patch
which i have committed.
Thanks
Andrew
[-- Attachment #2: synth_hal.diff --]
[-- Type: text/plain, Size: 2709 bytes --]
Index: hal/synth/arch/current/ChangeLog
===================================================================
RCS file: /cvs/ecos/ecos/packages/hal/synth/arch/current/ChangeLog,v
retrieving revision 1.21
diff -u -r1.21 ChangeLog
--- hal/synth/arch/current/ChangeLog 22 Apr 2004 15:26:54 -0000 1.21
+++ hal/synth/arch/current/ChangeLog 27 May 2004 12:57:15 -0000
@@ -1,7 +1,13 @@
+2004-05-27 Alexander Neundorf <alexander.neundorf@jenoptik.com>
+
+ * include/hal_io.h:
+ Fix the open/fcntl flags by prepending a leading 0 so that they
+ are interpreted correctly as octal instead of decimal.
+
2004-04-22 Jani Monoses <jani@iv.ro>
- * cdl/hal_synth.cdl :
- Invoke tail with stricter syntax that works in latest coreutils.
+ * cdl/hal_synth.cdl :
+ Invoke tail with stricter syntax that works in latest coreutils.
2003-07-18 Nick Garnett <nickg@balti.calivar.com>
Index: hal/synth/arch/current/include/hal_io.h
===================================================================
RCS file: /cvs/ecos/ecos/packages/hal/synth/arch/current/include/hal_io.h,v
retrieving revision 1.7
diff -u -r1.7 hal_io.h
--- hal/synth/arch/current/include/hal_io.h 15 Sep 2002 17:53:11 -0000 1.7
+++ hal/synth/arch/current/include/hal_io.h 27 May 2004 12:57:16 -0000
@@ -349,25 +349,25 @@
/* open/fcntl flags */
#define CYG_HAL_SYS_O_RDONLY 0
-#define CYG_HAL_SYS_O_WRONLY 1
-#define CYG_HAL_SYS_O_RDWR 2
-#define CYG_HAL_SYS_O_CREAT 100
-#define CYG_HAL_SYS_O_EXCL 200
-#define CYG_HAL_SYS_O_NOCTTY 400
-#define CYG_HAL_SYS_O_TRUNC 1000
-#define CYG_HAL_SYS_O_APPEND 2000
-#define CYG_HAL_SYS_O_NONBLOCK 4000
+#define CYG_HAL_SYS_O_WRONLY 01
+#define CYG_HAL_SYS_O_RDWR 02
+#define CYG_HAL_SYS_O_CREAT 0100
+#define CYG_HAL_SYS_O_EXCL 0200
+#define CYG_HAL_SYS_O_NOCTTY 0400
+#define CYG_HAL_SYS_O_TRUNC 01000
+#define CYG_HAL_SYS_O_APPEND 02000
+#define CYG_HAL_SYS_O_NONBLOCK 04000
#define CYG_HAL_SYS_O_NDELAY CYG_HAL_SYS_O_NONBLOCK
-#define CYG_HAL_SYS_O_SYNC 10000
+#define CYG_HAL_SYS_O_SYNC 010000
#define CYG_HAL_SYS_O_FSYNC CYG_HAL_SYS_O_SYNC
-#define CYG_HAL_SYS_O_ASYNC 20000
+#define CYG_HAL_SYS_O_ASYNC 020000
/* open mode flags */
-#define CYG_HAL_SYS_S_IRUSR 400
+#define CYG_HAL_SYS_S_IRUSR 0400
#define CYG_HAL_SYS_S_IREAD CYG_HAL_SYS_S_IRUSR
-#define CYG_HAL_SYS_S_IWUSR 200
+#define CYG_HAL_SYS_S_IWUSR 0200
#define CYG_HAL_SYS_S_IWRITE CYG_HAL_SYS_S_IWUSR
-#define CYG_HAL_SYS_S_IXUSR 100
+#define CYG_HAL_SYS_S_IXUSR 0100
#define CYG_HAL_SYS_S_IEXEC CYG_HAL_SYS_S_IXUSR
#define CYG_HAL_SYS_S_IRWXU \
(CYG_HAL_SYS_S_IREAD|CYG_HAL_SYS_S_IWRITE|CYG_HAL_SYS_S_IEXEC)
[-- Attachment #3: Type: text/plain, Size: 148 bytes --]
--
Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2004-05-27 13:00 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-05-26 12:16 [ECOS] [PATCH] correcting fcnlt flags in hal/synth/hal_io.h Neundorf, Alexander
2004-05-27 13:43 ` Andrew Lunn
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).