Index: libcio/open.c
===================================================================
--- libcio/open.c	(revision 99cac8608770916f6368b2cb7e41876121107061)
+++ libcio/open.c	(revision f261cc812347add3e89af579e27e87bcece03114)
@@ -34,5 +34,5 @@
 */
 
-int16_t open(int8_t *name, uint16_t flag)
+int16_t open(int8_t *name, uint16_t flags)
 {
 	register struct devtabl	*dp;
@@ -58,5 +58,5 @@
 
 	dev = dp->d_dev;
-	mdmask = (flag & 3) + 1;
+	mdmask = (flags & 3) + 1;
 
 	if (mdmask & 1) {	/* see if device is readable */
@@ -85,5 +85,5 @@
 	chp->c_close = _nopc;
 
-	if ((*dev->d_open)(name, flag, chp, dp) < 0) {	/* open */
+	if ((*dev->d_open)(name, flags, chp, dp) < 0) {	/* open */
 
 		chp->c_close = _badfc;	/* couldn't open for some reason */
@@ -96,35 +96,35 @@
 /*
    =============================================================================
-	opena(name, flag, mode) -- Opens ASCII file 'name' with flags 'flag'
-	and access mode 'mode'.  Newline translation will be done.
-	Returns a file descriptor (small positive integer) if successful, or
-	FAILURE (-1) if an error occurred.
-   =============================================================================
-*/
-
-int16_t opena(int8_t *name, uint16_t flag)
-{
-	return(open(name, flag));
-}
-
-/*
-   =============================================================================
-	openb(name, flag, mode) -- Opens binary file 'name' with flags 'flag'
-	and access mode 'mode'.  No newline translation is done.
-	Returns a file descriptor (small positive integer) if successful, or
-	FAILURE (-1) if an error occurred.
-   =============================================================================
-*/
-
-int16_t openb(int8_t *name, uint16_t flag)
-{
-	return(open(name, flag|O_RAW));
-}
-
-/*
-   =============================================================================
-	creat(name, mode) -- Creates file 'name' with access mode 'mode'.
+	opena(name, flag, mode) -- Opens ASCII file 'name' with flags 'flags'
+	Newline translation will be done.
+	Returns a file descriptor (small positive integer) if successful, or
+	FAILURE (-1) if an error occurred.
+   =============================================================================
+*/
+
+int16_t opena(int8_t *name, uint16_t flags)
+{
+	return(open(name, flags));
+}
+
+/*
+   =============================================================================
+	openb(name, flag, mode) -- Opens binary file 'name' with flags 'flags'.
+	No newline translation is done.
+	Returns a file descriptor (small positive integer) if successful, or
+	FAILURE (-1) if an error occurred.
+   =============================================================================
+*/
+
+int16_t openb(int8_t *name, uint16_t flags)
+{
+	return(open(name, flags|O_RAW));
+}
+
+/*
+   =============================================================================
+	creat(name, mode) -- Creates file 'name'.
 	The created file is initially open for writing only.  The file
-	will be ASCII unless mode contains O_RAW.
+	will be ASCII.
 	Returns a file descriptor (small positive integer) if successful, or
 	FAILURE (-1) if an error occurred.
@@ -139,5 +139,5 @@
 /*
    =============================================================================
-	creata(name, mode) -- Creates ASCII file 'name' with access mode 'mode'.
+	creata(name, mode) -- Creates ASCII file 'name'.
 	The created file is initially open for writing only.
 	Files created with creata() do newline translations.
@@ -154,5 +154,5 @@
 /*
    =============================================================================
-	creatb(name, mode) -- create binary file 'name' with access mode 'mode'.
+	creatb(name, mode) -- create binary file 'name'.
 	The created file is initially open for writing only.
 	Files created with creatb don't do newline translations.
@@ -175,5 +175,5 @@
 */
 
-int16_t _fileop(int8_t *name, uint16_t flag, struct channel *chp, struct devtabl *dp)
+int16_t _fileop(int8_t *name, uint16_t flags, struct channel *chp, struct devtabl *dp)
 {
 	register struct fcb *fp;
@@ -195,5 +195,5 @@
 	/* setup the initial fcb */
 
-	if (_inifcb(fp, FilName(name, tmpname), FilExt(name, tmpext), flag)) {
+	if (_inifcb(fp, FilName(name, tmpname), FilExt(name, tmpext), flags)) {
 
 		errno = EINVAL;		/* bad file name or flags */
