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:
Denys Vlasenko 2012-02-25 02:44:25 +01:00
parent 329655a466
commit 523635f4da

View File

@ -87,6 +87,7 @@
# ifndef ERESTART_RESTARTBLOCK # ifndef ERESTART_RESTARTBLOCK
# define ERESTART_RESTARTBLOCK 516 /* restart by calling sys_restart_syscall */ # define ERESTART_RESTARTBLOCK 516 /* restart by calling sys_restart_syscall */
#endif #endif
#ifndef NSIG #ifndef NSIG
# warning: NSIG is not defined, using 32 # warning: NSIG is not defined, using 32
# define NSIG 32 # define NSIG 32
@ -338,7 +339,7 @@ qualify_one(int n, int bitflag, int not, int pers)
else else
qual_flags1[n] |= bitflag; qual_flags1[n] |= bitflag;
} }
#endif /* SUPPORTED_PERSONALITIES >= 2 */ #endif
#if SUPPORTED_PERSONALITIES >= 3 #if SUPPORTED_PERSONALITIES >= 3
if (pers == 2 || pers < 0) { if (pers == 2 || pers < 0) {
@ -347,7 +348,7 @@ qualify_one(int n, int bitflag, int not, int pers)
else else
qual_flags2[n] |= bitflag; qual_flags2[n] |= bitflag;
} }
#endif /* SUPPORTED_PERSONALITIES >= 3 */ #endif
} }
static int static int
@ -375,7 +376,7 @@ qual_syscall(const char *s, int bitflag, int not)
qualify_one(i, bitflag, not, 1); qualify_one(i, bitflag, not, 1);
rc = 0; rc = 0;
} }
#endif /* SUPPORTED_PERSONALITIES >= 2 */ #endif
#if SUPPORTED_PERSONALITIES >= 3 #if SUPPORTED_PERSONALITIES >= 3
for (i = 0; i < nsyscalls2; i++) 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); qualify_one(i, bitflag, not, 2);
rc = 0; rc = 0;
} }
#endif /* SUPPORTED_PERSONALITIES >= 3 */ #endif
return rc; return rc;
} }
@ -501,13 +502,13 @@ qualify(const char *s)
for (i = 0; i < nsyscalls1; i++) for (i = 0; i < nsyscalls1; i++)
if (sysent1[i].sys_flags & n) if (sysent1[i].sys_flags & n)
qualify_one(i, opt->bitflag, not, 1); qualify_one(i, opt->bitflag, not, 1);
#endif /* SUPPORTED_PERSONALITIES >= 2 */ #endif
#if SUPPORTED_PERSONALITIES >= 3 #if SUPPORTED_PERSONALITIES >= 3
for (i = 0; i < nsyscalls2; i++) for (i = 0; i < nsyscalls2; i++)
if (sysent2[i].sys_flags & n) if (sysent2[i].sys_flags & n)
qualify_one(i, opt->bitflag, not, 2); qualify_one(i, opt->bitflag, not, 2);
#endif /* SUPPORTED_PERSONALITIES >= 3 */ #endif
continue; continue;
} }
@ -619,12 +620,9 @@ getrval2(struct tcb *tcp)
return -1; return -1;
#endif #endif
return val; return val;
} }
int int
is_restart_error(struct tcb *tcp) is_restart_error(struct tcb *tcp)
{ {
@ -1097,7 +1095,6 @@ get_scno(struct tcb *tcp)
return -1; return -1;
#endif #endif
tcp->scno = scno; tcp->scno = scno;
return 1; return 1;
} }
@ -1112,8 +1109,6 @@ get_scno(struct tcb *tcp)
static int static int
syscall_fixup_on_sysenter(struct tcb *tcp) syscall_fixup_on_sysenter(struct tcb *tcp)
{ {
/* A common case of "not a syscall entry" is post-execve SIGTRAP */ /* A common case of "not a syscall entry" is post-execve SIGTRAP */
#if defined(I386) #if defined(I386)
if (i386_regs.eax != -ENOSYS) { if (i386_regs.eax != -ENOSYS) {
@ -1474,7 +1469,6 @@ trace_syscall_entering(struct tcb *tcp)
} }
#endif /* SYS_socket_subcall || SYS_ipc_subcall */ #endif /* SYS_socket_subcall || SYS_ipc_subcall */
internal_syscall(tcp); internal_syscall(tcp);
if ((SCNO_IN_RANGE(tcp->scno) && if ((SCNO_IN_RANGE(tcp->scno) &&
@ -1610,7 +1604,6 @@ get_syscall_result(struct tcb *tcp)
return -1; return -1;
#endif #endif
return 1; return 1;
} }
@ -1624,8 +1617,6 @@ get_syscall_result(struct tcb *tcp)
static int static int
syscall_fixup_on_sysexit(struct tcb *tcp) syscall_fixup_on_sysexit(struct tcb *tcp)
{ {
#if defined(S390) || defined(S390X) #if defined(S390) || defined(S390X)
if (syscall_mode != -ENOSYS) if (syscall_mode != -ENOSYS)
syscall_mode = tcp->scno; syscall_mode = tcp->scno;