standalone: getmode() conflicts with BSD includes
authorAlan Cox <alan@linux.intel.com>
Fri, 2 Oct 2015 10:45:27 +0000 (11:45 +0100)
committerAlan Cox <alan@linux.intel.com>
Fri, 2 Oct 2015 10:45:27 +0000 (11:45 +0100)
Standalone/fuzix_fs.h
Standalone/xfs1.c
Standalone/xfs1a.c
Standalone/xfs1b.c
Standalone/xfs2.c

index 9c44c81..79f54ee 100644 (file)
@@ -312,7 +312,7 @@ int _ioctl( int fd, int request, char *data);
 int getperm(inoptr ino);
 int _mount( char *spec, char *dir, int rwflag);
 int _time( int tvec[]);
-int getmode(inoptr ino);
+int fuzix_getmode(inoptr ino);
 void bawrite(bufptr bp);
 int isdevice(inoptr ino);
 int bfree(bufptr bp, int dirty);
index 3202b5a..ca1dff6 100644 (file)
@@ -55,7 +55,7 @@ int _open(char *name, int16_t flag)
        register inoptr ino;
        register int16_t perm;
        inoptr n_open();
-       int getperm(), getmode(), isdevice(), d_open();
+       int getperm(), fuzix_getmode(), isdevice(), d_open();
        int uf_alloc(), oft_alloc();
 
        udata.u_error = 0;
@@ -82,7 +82,7 @@ int _open(char *name, int16_t flag)
                goto cantopen;
        }
 
-       if (getmode(ino) == F_DIR &&
+       if (fuzix_getmode(ino) == F_DIR &&
            (flag == FO_WRONLY || flag == FO_RDWR)) {
                udata.u_error = EISDIR;
                goto cantopen;
@@ -145,7 +145,7 @@ int _creat(char *name, int16_t mode)
        register int16_t j;
        inoptr n_open();
        inoptr newfile();
-       int getperm(), getmode(), uf_alloc(), oft_alloc();
+       int getperm(), fuzix_getmode(), uf_alloc(), oft_alloc();
 
        udata.u_error = 0;
        parent = NULLINODE;
@@ -158,7 +158,7 @@ int _creat(char *name, int16_t mode)
        ino = n_open(name, &parent);
        if (ino) {
                i_deref(parent);
-               if (getmode(ino) == F_DIR) {
+               if (fuzix_getmode(ino) == F_DIR) {
                        i_deref(ino);
                        udata.u_error = EISDIR;
                        goto nogood;
@@ -168,7 +168,7 @@ int _creat(char *name, int16_t mode)
                        udata.u_error = EACCES;
                        goto nogood;
                }
-               if (getmode(ino) == F_REG) {
+               if (fuzix_getmode(ino) == F_REG) {
                        /* Truncate the file to zero length */
                        f_trunc(ino);
                        /* Reset any oft pointers */
@@ -213,13 +213,13 @@ int _link(char *name1, char *name2)
        inoptr parent2;
        char *filename();
        inoptr n_open();
-       int ch_link(), getmode(), super();
+       int ch_link(), fuzix_getmode(), super();
 
        udata.u_error = 0;
        ifnot(ino = n_open(name1, NULLINOPTR))
            return (-1);
 
-       if (getmode(ino) == F_DIR && !super()) {
+       if (fuzix_getmode(ino) == F_DIR && !super()) {
                udata.u_error = EPERM;
                goto nogood;
        }
@@ -266,7 +266,7 @@ int _unlink(char *path)
        char *filename();
     /*--    inoptr i_open();--*/
        inoptr n_open();
-       int getmode(), ch_link(), super();
+       int fuzix_getmode(), ch_link(), super();
 
        udata.u_error = 0;
        ino = n_open(path, &pino);
@@ -276,7 +276,7 @@ int _unlink(char *path)
                return (-1);
        }
 
-       if (getmode(ino) == F_DIR && !super()) {
+       if (fuzix_getmode(ino) == F_DIR && !super()) {
                udata.u_error = EPERM;
                goto nogood;
        }
index 9073f33..96c212e 100644 (file)
@@ -55,7 +55,7 @@ void readi(inoptr ino)
        int dev;
 
        dev = ino->c_dev;
-       switch (getmode(ino)) {
+       switch (fuzix_getmode(ino)) {
 
        case F_DIR:
        case F_REG:
@@ -108,7 +108,7 @@ void writei(inoptr ino)
 
        dev = ino->c_dev;
 
-       switch (getmode(ino)) {
+       switch (fuzix_getmode(ino)) {
 
        case F_BDEV:
                dev = swizzle16(*(ino->c_node.i_addr));
index 1beebe2..24d0c19 100644 (file)
@@ -92,13 +92,13 @@ int _chdir(char *dir)
 {
        register inoptr newcwd;
        inoptr n_open();
-       int getmode();
+       int fuzix_getmode();
 
        udata.u_error = 0;
        ifnot(newcwd = n_open(dir, NULLINOPTR))
            return (-1);
 
-       if (getmode(newcwd) != F_DIR) {
+       if (fuzix_getmode(newcwd) != F_DIR) {
                udata.u_error = ENOTDIR;
                i_deref(newcwd);
                return (-1);
@@ -362,11 +362,11 @@ int _mount(char *spec, char *dir, int rwflag)
                i_deref(sino);
                return (-1);
        }
-       if (getmode(sino) != F_BDEV) {
+       if (fuzix_getmode(sino) != F_BDEV) {
                udata.u_error = ENOTBLK;
                goto nogood;
        }
-       if (getmode(dino) != F_DIR) {
+       if (fuzix_getmode(dino) != F_DIR) {
                udata.u_error = ENOTDIR;
                goto nogood;
        }
@@ -412,7 +412,7 @@ int _umount(char *spec)
        ifnot(sino = n_open(spec, NULLINOPTR))
            return (-1);
 
-       if (getmode(sino) != F_BDEV) {
+       if (fuzix_getmode(sino) != F_BDEV) {
                udata.u_error = ENOTBLK;
                goto nogood;
        }
index dac8b9b..7a8f558 100644 (file)
@@ -56,7 +56,7 @@ inoptr n_open(register char *name, register inoptr * parent)
                }
                i_deref(wd);
                wd = ninode;
-               if (getmode(wd) != F_DIR) {
+               if (fuzix_getmode(wd) != F_DIR) {
                        udata.u_error = ENOTDIR;
                        goto nodir;
                }
@@ -814,7 +814,7 @@ blkno_t bmap(inoptr ip, blkno_t bn, int rwflg)
        int sh;
        int dev;
 
-       if (getmode(ip) == F_BDEV)
+       if (fuzix_getmode(ip) == F_BDEV)
                return (bn);
 
        dev = ip->c_dev;
@@ -976,7 +976,7 @@ void setftime(inoptr ino, int flag)
 }
 
 
-int getmode(inoptr ino)
+int fuzix_getmode(inoptr ino)
 {
        return (swizzle16(ino->c_node.i_mode) & F_MASK);
 }