Reindent preprocessor directives in syscall.c; fix style.
* syscall.c: Fix indentation of preprocessor directives broken by automatic removal of non-Linux code. Fix style to use consistent defined(FOO) instead of defined (FOO). Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
This commit is contained in:
parent
329655a466
commit
523635f4da
23
syscall.c
23
syscall.c
@ -87,6 +87,7 @@
|
||||
# ifndef ERESTART_RESTARTBLOCK
|
||||
# define ERESTART_RESTARTBLOCK 516 /* restart by calling sys_restart_syscall */
|
||||
#endif
|
||||
|
||||
#ifndef NSIG
|
||||
# warning: NSIG is not defined, using 32
|
||||
# define NSIG 32
|
||||
@ -338,7 +339,7 @@ qualify_one(int n, int bitflag, int not, int pers)
|
||||
else
|
||||
qual_flags1[n] |= bitflag;
|
||||
}
|
||||
#endif /* SUPPORTED_PERSONALITIES >= 2 */
|
||||
#endif
|
||||
|
||||
#if SUPPORTED_PERSONALITIES >= 3
|
||||
if (pers == 2 || pers < 0) {
|
||||
@ -347,7 +348,7 @@ qualify_one(int n, int bitflag, int not, int pers)
|
||||
else
|
||||
qual_flags2[n] |= bitflag;
|
||||
}
|
||||
#endif /* SUPPORTED_PERSONALITIES >= 3 */
|
||||
#endif
|
||||
}
|
||||
|
||||
static int
|
||||
@ -375,7 +376,7 @@ qual_syscall(const char *s, int bitflag, int not)
|
||||
qualify_one(i, bitflag, not, 1);
|
||||
rc = 0;
|
||||
}
|
||||
#endif /* SUPPORTED_PERSONALITIES >= 2 */
|
||||
#endif
|
||||
|
||||
#if SUPPORTED_PERSONALITIES >= 3
|
||||
for (i = 0; i < nsyscalls2; i++)
|
||||
@ -383,7 +384,7 @@ qual_syscall(const char *s, int bitflag, int not)
|
||||
qualify_one(i, bitflag, not, 2);
|
||||
rc = 0;
|
||||
}
|
||||
#endif /* SUPPORTED_PERSONALITIES >= 3 */
|
||||
#endif
|
||||
|
||||
return rc;
|
||||
}
|
||||
@ -501,13 +502,13 @@ qualify(const char *s)
|
||||
for (i = 0; i < nsyscalls1; i++)
|
||||
if (sysent1[i].sys_flags & n)
|
||||
qualify_one(i, opt->bitflag, not, 1);
|
||||
#endif /* SUPPORTED_PERSONALITIES >= 2 */
|
||||
#endif
|
||||
|
||||
#if SUPPORTED_PERSONALITIES >= 3
|
||||
for (i = 0; i < nsyscalls2; i++)
|
||||
if (sysent2[i].sys_flags & n)
|
||||
qualify_one(i, opt->bitflag, not, 2);
|
||||
#endif /* SUPPORTED_PERSONALITIES >= 3 */
|
||||
#endif
|
||||
|
||||
continue;
|
||||
}
|
||||
@ -619,12 +620,9 @@ getrval2(struct tcb *tcp)
|
||||
return -1;
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
return val;
|
||||
}
|
||||
|
||||
|
||||
int
|
||||
is_restart_error(struct tcb *tcp)
|
||||
{
|
||||
@ -1097,7 +1095,6 @@ get_scno(struct tcb *tcp)
|
||||
return -1;
|
||||
#endif
|
||||
|
||||
|
||||
tcp->scno = scno;
|
||||
return 1;
|
||||
}
|
||||
@ -1112,8 +1109,6 @@ get_scno(struct tcb *tcp)
|
||||
static int
|
||||
syscall_fixup_on_sysenter(struct tcb *tcp)
|
||||
{
|
||||
|
||||
|
||||
/* A common case of "not a syscall entry" is post-execve SIGTRAP */
|
||||
#if defined(I386)
|
||||
if (i386_regs.eax != -ENOSYS) {
|
||||
@ -1474,7 +1469,6 @@ trace_syscall_entering(struct tcb *tcp)
|
||||
}
|
||||
#endif /* SYS_socket_subcall || SYS_ipc_subcall */
|
||||
|
||||
|
||||
internal_syscall(tcp);
|
||||
|
||||
if ((SCNO_IN_RANGE(tcp->scno) &&
|
||||
@ -1610,7 +1604,6 @@ get_syscall_result(struct tcb *tcp)
|
||||
return -1;
|
||||
#endif
|
||||
|
||||
|
||||
return 1;
|
||||
}
|
||||
|
||||
@ -1624,8 +1617,6 @@ get_syscall_result(struct tcb *tcp)
|
||||
static int
|
||||
syscall_fixup_on_sysexit(struct tcb *tcp)
|
||||
{
|
||||
|
||||
|
||||
#if defined(S390) || defined(S390X)
|
||||
if (syscall_mode != -ENOSYS)
|
||||
syscall_mode = tcp->scno;
|
||||
|
Loading…
Reference in New Issue
Block a user