From: Lionel Sambuc Date: Tue, 3 Dec 2013 12:55:11 +0000 (+0100) Subject: include/limits.h: merged X-Git-Tag: v3.3.0~471 X-Git-Url: http://zhaoyanbai.com/repos/dnssec-importkey.html?a=commitdiff_plain;h=3053b272479e73615d0db93793de34c543f088aa;p=minix.git include/limits.h: merged Replacing SYMLOOP_MAX, SYMLINK_MAX, by _POSIX_SYMLOOP_MAX, _POSIX_SYMLINK_MAX respectively. Change-Id: I020c20b0dbf6d44e777879d786a20811f23d1561 --- diff --git a/include/limits.h b/include/limits.h index 770bd2002..1ac515b0a 100644 --- a/include/limits.h +++ b/include/limits.h @@ -171,11 +171,6 @@ # define CHAR_MAX SCHAR_MAX #endif -#ifdef __minix -#define SYMLOOP_MAX 16 -#define SYMLINK_MAX 1024 -#endif /* __minix */ - #include #endif /* !_LIMITS_H_ */ diff --git a/lib/libpuffs/path.c b/lib/libpuffs/path.c index 8b13d37d7..4c4b7ac5a 100644 --- a/lib/libpuffs/path.c +++ b/lib/libpuffs/path.c @@ -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) diff --git a/lib/libvtreefs/path.c b/lib/libvtreefs/path.c index cfd7bca1a..55e468c19 100644 --- a/lib/libvtreefs/path.c +++ b/lib/libvtreefs/path.c @@ -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; diff --git a/servers/ext2/path.c b/servers/ext2/path.c index d67a18037..314c1d9f6 100644 --- a/servers/ext2/path.c +++ b/servers/ext2/path.c @@ -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) { diff --git a/servers/mfs/path.c b/servers/mfs/path.c index e5d648be6..7676c0743 100644 --- a/servers/mfs/path.c +++ b/servers/mfs/path.c @@ -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) { diff --git a/servers/vfs/link.c b/servers/vfs/link.c index ecfdb1828..c243349e9 100644 --- a/servers/vfs/link.c +++ b/servers/vfs/link.c @@ -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); diff --git a/servers/vfs/path.c b/servers/vfs/path.c index 727e2b92f..8cf11f851 100644 --- a/servers/vfs/path.c +++ b/servers/vfs/path.c @@ -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);