include/limits.h: merged
Replacing SYMLOOP_MAX, SYMLINK_MAX, by _POSIX_SYMLOOP_MAX, _POSIX_SYMLINK_MAX respectively. Change-Id: I020c20b0dbf6d44e777879d786a20811f23d1561
This commit is contained in:
parent
57476292b0
commit
3053b27247
7 changed files with 10 additions and 15 deletions
|
@ -171,11 +171,6 @@
|
|||
# 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_ */
|
||||
|
|
|
@ -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)
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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) {
|
||||
|
|
|
@ -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) {
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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);
|
||||
|
|
Loading…
Reference in a new issue