]> Zhao Yanbai Git Server - minix.git/commitdiff
include/limits.h: merged
authorLionel Sambuc <lionel@minix3.org>
Tue, 3 Dec 2013 12:55:11 +0000 (13:55 +0100)
committerLionel Sambuc <lionel@minix3.org>
Mon, 3 Mar 2014 19:47:03 +0000 (20:47 +0100)
Replacing SYMLOOP_MAX, SYMLINK_MAX, by _POSIX_SYMLOOP_MAX,
_POSIX_SYMLINK_MAX respectively.

Change-Id: I020c20b0dbf6d44e777879d786a20811f23d1561

include/limits.h
lib/libpuffs/path.c
lib/libvtreefs/path.c
servers/ext2/path.c
servers/mfs/path.c
servers/vfs/link.c
servers/vfs/path.c

index 770bd2002b9bab75be6cd920285dc3d13d63a431..1ac515b0a27dc7890966f50ee2d66a2203299d83 100644 (file)
 # define CHAR_MAX     SCHAR_MAX
 #endif
 
-#ifdef __minix
-#define SYMLOOP_MAX            16
-#define SYMLINK_MAX            1024
-#endif /* __minix */
-
 #include <sys/syslimits.h>
 
 #endif /* !_LIMITS_H_ */
index 8b13d37d79bdcef8b5c7dcd7b54e0612dec73c22..4c4b7ac5ae0ef1e3a7dafc6d3276bbc22aaa7d1a 100644 (file)
@@ -258,7 +258,7 @@ int *symlinkp
                *offsetp = 0;
 
                /* Symloop limit reached? */
-               if (++(*symlinkp) > SYMLOOP_MAX)
+               if (++(*symlinkp) > _POSIX_SYMLOOP_MAX)
                        r = ELOOP;
 
                if (r != OK)
index cfd7bca1a4fc3cbd46785d1e91a76825720239cd..55e468c19bc4fdef47500f9932ab917afe7817e2 100644 (file)
@@ -230,7 +230,7 @@ int fs_lookup(void)
                                (ptr[0] != '\0' ||
                                !(fs_m_in.REQ_FLAGS & PATH_RET_SYMLINK))) {
 
-                               if (++symloop == SYMLOOP_MAX) {
+                               if (++symloop == _POSIX_SYMLOOP_MAX) {
                                        put_inode(next_ino);
 
                                        r = ELOOP;
index d67a18037a8864dc9af636bf6ba3d12eb9b79789..314c1d9f6fadcff60f61922223682a94f07f0a20 100644 (file)
@@ -251,7 +251,7 @@ int *symlinkp;
                *offsetp = 0;
 
                /* Symloop limit reached? */
-               if (++(*symlinkp) > SYMLOOP_MAX)
+               if (++(*symlinkp) > _POSIX_SYMLOOP_MAX)
                        r = ELOOP;
 
                if (r != OK) {
index e5d648be636de8e5966e704116f8b30d955c3f86..7676c07437a0435373799a448735ab8d2e8bc0d3 100644 (file)
@@ -246,7 +246,7 @@ int *symlinkp
                *offsetp = 0;
 
                /* Symloop limit reached? */
-               if (++(*symlinkp) > SYMLOOP_MAX)
+               if (++(*symlinkp) > _POSIX_SYMLOOP_MAX)
                        r = ELOOP;
 
                if (r != OK) {
index ecfdb1828fd85e6be747a57907f7c8957377d662..c243349e956e0bd096702c143ebc1023062fae91 100644 (file)
@@ -409,7 +409,7 @@ int do_slink(void)
   vname2_length = job_m_in.VFS_LINK_LEN2;
 
   if (vname1_length <= 1) return(ENOENT);
-  if (vname1_length >= SYMLINK_MAX) return(ENAMETOOLONG);
+  if (vname1_length >= _POSIX_SYMLINK_MAX) return(ENAMETOOLONG);
 
   /* Get dir inode of 'name2' */
   if (fetch_name(vname2, vname2_length, fullpath) != OK) return(err_code);
index 727e2b92f0d551cc5f6d7906d66bb1b872d94072..8cf11f851ea9b9e065fb57e855266f3d34bdb8c7 100644 (file)
@@ -353,9 +353,9 @@ struct fproc *rfp;
                }
        }
        break;
-  } while (symloop < SYMLOOP_MAX);
+  } while (symloop < _POSIX_SYMLOOP_MAX);
 
-  if (symloop >= SYMLOOP_MAX) {
+  if (symloop >= _POSIX_SYMLOOP_MAX) {
        err_code = ELOOP;
        res_vp = NULL;
   }
@@ -475,7 +475,7 @@ struct fproc *rfp;
 
        /* Update the current value of the symloop counter */
        symloop += res.symloop;
-       if (symloop > SYMLOOP_MAX) {
+       if (symloop > _POSIX_SYMLOOP_MAX) {
                if (vmpres) unlock_vmnt(vmpres);
                *(resolve->l_vmp) = NULL;
                return(ELOOP);
@@ -708,9 +708,9 @@ struct fproc *rfp;
        /* encountered a symlink -- loop again */
        strlcpy(orig_path, temp_path, PATH_MAX);
        symloop++;
-  } while (symloop < SYMLOOP_MAX);
+  } while (symloop < _POSIX_SYMLOOP_MAX);
 
-  if (symloop >= SYMLOOP_MAX) {
+  if (symloop >= _POSIX_SYMLOOP_MAX) {
        if (dir_vp) {
                unlock_vnode(dir_vp);
                unlock_vmnt(dir_vmp);