Commit ba78d155 authored by Kir Kolyshkin's avatar Kir Kolyshkin Committed by Andrei Vagin

Spring whitespace cleanup

Replace 8-spaces with a tab in code.
Signed-off-by: 's avatarKir Kolyshkin <kir@openvz.org>
Signed-off-by: 's avatarAndrei Vagin <avagin@virtuozzo.com>
parent f4e7b6e7
...@@ -38,8 +38,8 @@ int cpu_dump_cpuinfo(void) ...@@ -38,8 +38,8 @@ int cpu_dump_cpuinfo(void)
int ret = -1; int ret = -1;
img = open_image(CR_FD_CPUINFO, O_DUMP); img = open_image(CR_FD_CPUINFO, O_DUMP);
if (!img) if (!img)
return -1; return -1;
cpu_info.ppc64_entry = &cpu_ppc64_info_ptr; cpu_info.ppc64_entry = &cpu_ppc64_info_ptr;
cpu_info.n_ppc64_entry = 1; cpu_info.n_ppc64_entry = 1;
...@@ -51,7 +51,7 @@ int cpu_dump_cpuinfo(void) ...@@ -51,7 +51,7 @@ int cpu_dump_cpuinfo(void)
ret = pb_write_one(img, &cpu_info, PB_CPUINFO); ret = pb_write_one(img, &cpu_info, PB_CPUINFO);
close_image(img); close_image(img);
return ret; return ret;
} }
int cpu_validate_cpuinfo(void) int cpu_validate_cpuinfo(void)
...@@ -60,12 +60,12 @@ int cpu_validate_cpuinfo(void) ...@@ -60,12 +60,12 @@ int cpu_validate_cpuinfo(void)
CpuinfoPpc64Entry *cpu_ppc64_entry; CpuinfoPpc64Entry *cpu_ppc64_entry;
struct cr_img *img; struct cr_img *img;
int ret = -1; int ret = -1;
img = open_image(CR_FD_CPUINFO, O_RSTR); img = open_image(CR_FD_CPUINFO, O_RSTR);
if (!img) if (!img)
return -1; return -1;
if (pb_read_one(img, &cpu_info, PB_CPUINFO) < 0) if (pb_read_one(img, &cpu_info, PB_CPUINFO) < 0)
goto error; goto error;
if (cpu_info->n_ppc64_entry != 1) { if (cpu_info->n_ppc64_entry != 1) {
pr_err("No PPC64 related entry in image\n"); pr_err("No PPC64 related entry in image\n");
...@@ -121,22 +121,22 @@ error: ...@@ -121,22 +121,22 @@ error:
int cpuinfo_dump(void) int cpuinfo_dump(void)
{ {
if (cpu_init()) if (cpu_init())
return -1; return -1;
if (cpu_dump_cpuinfo()) if (cpu_dump_cpuinfo())
return -1; return -1;
return 0; return 0;
} }
int cpuinfo_check(void) int cpuinfo_check(void)
{ {
if (cpu_init()) if (cpu_init())
return -1; return -1;
if (cpu_validate_cpuinfo()) if (cpu_validate_cpuinfo())
return 1; return 1;
return 0; return 0;
} }
...@@ -239,7 +239,7 @@ static void xfree_tm_state(UserPpc64TmRegsEntry *tme) ...@@ -239,7 +239,7 @@ static void xfree_tm_state(UserPpc64TmRegsEntry *tme)
xfree(tme->vsxstate->vsxregs); xfree(tme->vsxstate->vsxregs);
xfree(tme->vsxstate); xfree(tme->vsxstate);
} }
if (tme->gpregs) { if (tme->gpregs) {
if (tme->gpregs->gpr) if (tme->gpregs->gpr)
xfree(tme->gpregs->gpr); xfree(tme->gpregs->gpr);
xfree(tme->gpregs); xfree(tme->gpregs);
...@@ -286,25 +286,25 @@ static int copy_tm_regs(user_regs_struct_t *regs, user_fpregs_struct_t *fpregs, ...@@ -286,25 +286,25 @@ static int copy_tm_regs(user_regs_struct_t *regs, user_fpregs_struct_t *fpregs,
CoreEntry *core) CoreEntry *core)
{ {
UserPpc64TmRegsEntry *tme; UserPpc64TmRegsEntry *tme;
UserPpc64RegsEntry *gpregs = core->ti_ppc64->gpregs; UserPpc64RegsEntry *gpregs = core->ti_ppc64->gpregs;
pr_debug("Copying TM registers\n"); pr_debug("Copying TM registers\n");
tme = xmalloc(sizeof(*tme)); tme = xmalloc(sizeof(*tme));
if (!tme) if (!tme)
return -1; return -1;
user_ppc64_tm_regs_entry__init(tme); user_ppc64_tm_regs_entry__init(tme);
tme->gpregs = allocate_gp_regs(); tme->gpregs = allocate_gp_regs();
if (!tme->gpregs) if (!tme->gpregs)
goto out_free; goto out_free;
gpregs->has_tfhar = true; gpregs->has_tfhar = true;
gpregs->tfhar = fpregs->tm.tm_spr_regs.tfhar; gpregs->tfhar = fpregs->tm.tm_spr_regs.tfhar;
gpregs->has_texasr = true; gpregs->has_texasr = true;
gpregs->texasr = fpregs->tm.tm_spr_regs.texasr; gpregs->texasr = fpregs->tm.tm_spr_regs.texasr;
gpregs->has_tfiar = true; gpregs->has_tfiar = true;
gpregs->tfiar = fpregs->tm.tm_spr_regs.tfiar; gpregs->tfiar = fpregs->tm.tm_spr_regs.tfiar;
/* This is the checkpointed state, we must save it in place of the /* This is the checkpointed state, we must save it in place of the
...@@ -315,32 +315,32 @@ static int copy_tm_regs(user_regs_struct_t *regs, user_fpregs_struct_t *fpregs, ...@@ -315,32 +315,32 @@ static int copy_tm_regs(user_regs_struct_t *regs, user_fpregs_struct_t *fpregs,
copy_gp_regs(gpregs, &fpregs->tm.regs); copy_gp_regs(gpregs, &fpregs->tm.regs);
if (fpregs->tm.flags & USER_FPREGS_FL_FP) { if (fpregs->tm.flags & USER_FPREGS_FL_FP) {
core->ti_ppc64->fpstate = copy_fp_regs(fpregs->tm.fpregs); core->ti_ppc64->fpstate = copy_fp_regs(fpregs->tm.fpregs);
if (!core->ti_ppc64->fpstate) if (!core->ti_ppc64->fpstate)
goto out_free; goto out_free;
} }
if (fpregs->tm.flags & USER_FPREGS_FL_ALTIVEC) { if (fpregs->tm.flags & USER_FPREGS_FL_ALTIVEC) {
core->ti_ppc64->vrstate = copy_altivec_regs(fpregs->tm.vrregs); core->ti_ppc64->vrstate = copy_altivec_regs(fpregs->tm.vrregs);
if (!core->ti_ppc64->vrstate) if (!core->ti_ppc64->vrstate)
goto out_free; goto out_free;
/* /*
* Force the MSR_VEC bit of the restored MSR otherwise the * Force the MSR_VEC bit of the restored MSR otherwise the
* kernel will not restore them from the signal frame. * kernel will not restore them from the signal frame.
*/ */
gpregs->msr |= MSR_VEC; gpregs->msr |= MSR_VEC;
if (fpregs->tm.flags & USER_FPREGS_FL_VSX) { if (fpregs->tm.flags & USER_FPREGS_FL_VSX) {
core->ti_ppc64->vsxstate = copy_vsx_regs(fpregs->tm.vsxregs); core->ti_ppc64->vsxstate = copy_vsx_regs(fpregs->tm.vsxregs);
if (!core->ti_ppc64->vsxstate) if (!core->ti_ppc64->vsxstate)
goto out_free; goto out_free;
/* /*
* Force the MSR_VSX bit of the restored MSR otherwise * Force the MSR_VSX bit of the restored MSR otherwise
* the kernel will not restore them from the signal * the kernel will not restore them from the signal
* frame. * frame.
*/ */
gpregs->msr |= MSR_VSX; gpregs->msr |= MSR_VSX;
} }
} }
...@@ -380,7 +380,7 @@ static int __copy_task_regs(user_regs_struct_t *regs, ...@@ -380,7 +380,7 @@ static int __copy_task_regs(user_regs_struct_t *regs,
fpstate = &(core->ti_ppc64->fpstate); fpstate = &(core->ti_ppc64->fpstate);
vrstate = &(core->ti_ppc64->vrstate); vrstate = &(core->ti_ppc64->vrstate);
vsxstate = &(core->ti_ppc64->vsxstate); vsxstate = &(core->ti_ppc64->vsxstate);
} }
copy_gp_regs(gpregs, regs); copy_gp_regs(gpregs, regs);
if (fpregs->flags & USER_FPREGS_FL_FP) { if (fpregs->flags & USER_FPREGS_FL_FP) {
...@@ -392,22 +392,22 @@ static int __copy_task_regs(user_regs_struct_t *regs, ...@@ -392,22 +392,22 @@ static int __copy_task_regs(user_regs_struct_t *regs,
*vrstate = copy_altivec_regs(fpregs->vrregs); *vrstate = copy_altivec_regs(fpregs->vrregs);
if (!*vrstate) if (!*vrstate)
return -1; return -1;
/* /*
* Force the MSR_VEC bit of the restored MSR otherwise the * Force the MSR_VEC bit of the restored MSR otherwise the
* kernel will not restore them from the signal frame. * kernel will not restore them from the signal frame.
*/ */
gpregs->msr |= MSR_VEC; gpregs->msr |= MSR_VEC;
if (fpregs->flags & USER_FPREGS_FL_VSX) { if (fpregs->flags & USER_FPREGS_FL_VSX) {
*vsxstate = copy_vsx_regs(fpregs->vsxregs); *vsxstate = copy_vsx_regs(fpregs->vsxregs);
if (!*vsxstate) if (!*vsxstate)
return -1; return -1;
/* /*
* Force the MSR_VSX bit of the restored MSR otherwise * Force the MSR_VSX bit of the restored MSR otherwise
* the kernel will not restore them from the signal * the kernel will not restore them from the signal
* frame. * frame.
*/ */
gpregs->msr |= MSR_VSX; gpregs->msr |= MSR_VSX;
} }
} }
return 0; return 0;
...@@ -441,7 +441,7 @@ int arch_alloc_thread_info(CoreEntry *core) ...@@ -441,7 +441,7 @@ int arch_alloc_thread_info(CoreEntry *core)
void arch_free_thread_info(CoreEntry *core) void arch_free_thread_info(CoreEntry *core)
{ {
if (CORE_THREAD_ARCH_INFO(core)) { if (CORE_THREAD_ARCH_INFO(core)) {
if (CORE_THREAD_ARCH_INFO(core)->fpstate) { if (CORE_THREAD_ARCH_INFO(core)->fpstate) {
xfree(CORE_THREAD_ARCH_INFO(core)->fpstate->fpregs); xfree(CORE_THREAD_ARCH_INFO(core)->fpstate->fpregs);
xfree(CORE_THREAD_ARCH_INFO(core)->fpstate); xfree(CORE_THREAD_ARCH_INFO(core)->fpstate);
...@@ -455,11 +455,11 @@ void arch_free_thread_info(CoreEntry *core) ...@@ -455,11 +455,11 @@ void arch_free_thread_info(CoreEntry *core)
xfree(CORE_THREAD_ARCH_INFO(core)->vsxstate); xfree(CORE_THREAD_ARCH_INFO(core)->vsxstate);
} }
xfree_tm_state(CORE_THREAD_ARCH_INFO(core)->tmstate); xfree_tm_state(CORE_THREAD_ARCH_INFO(core)->tmstate);
xfree(CORE_THREAD_ARCH_INFO(core)->gpregs->gpr); xfree(CORE_THREAD_ARCH_INFO(core)->gpregs->gpr);
xfree(CORE_THREAD_ARCH_INFO(core)->gpregs); xfree(CORE_THREAD_ARCH_INFO(core)->gpregs);
xfree(CORE_THREAD_ARCH_INFO(core)); xfree(CORE_THREAD_ARCH_INFO(core));
CORE_THREAD_ARCH_INFO(core) = NULL; CORE_THREAD_ARCH_INFO(core) = NULL;
} }
} }
int restore_fpu(struct rt_sigframe *sigframe, CoreEntry *core) int restore_fpu(struct rt_sigframe *sigframe, CoreEntry *core)
......
...@@ -73,8 +73,8 @@ void restore_tls(tls_t *ptls) ...@@ -73,8 +73,8 @@ void restore_tls(tls_t *ptls)
memcpy(stack32, desc, sizeof(user_desc_t)); memcpy(stack32, desc, sizeof(user_desc_t));
asm volatile ( asm volatile (
" mov %1,%%eax \n" " mov %1,%%eax \n"
" mov %2,%%ebx \n" " mov %2,%%ebx \n"
" int $0x80 \n" " int $0x80 \n"
" mov %%eax,%0 \n" " mov %%eax,%0 \n"
: "=g"(ret) : "=g"(ret)
......
...@@ -57,19 +57,19 @@ int do_task_reset_dirty_track(int pid) ...@@ -57,19 +57,19 @@ int do_task_reset_dirty_track(int pid)
ret = write(fd, cmd, sizeof(cmd)); ret = write(fd, cmd, sizeof(cmd));
if (ret < 0) { if (ret < 0) {
if (errno == EINVAL) /* No clear-soft-dirty in kernel */ if (errno == EINVAL) /* No clear-soft-dirty in kernel */
ret = 1; ret = 1;
else { else {
pr_perror("Can't reset %d's dirty memory tracker (%d)", pid, errno); pr_perror("Can't reset %d's dirty memory tracker (%d)", pid, errno);
ret = -1; ret = -1;
} }
} else { } else {
pr_info(" ... done\n"); pr_info(" ... done\n");
ret = 0; ret = 0;
} }
close(fd); close(fd);
return ret; return ret;
} }
unsigned long dump_pages_args_size(struct vm_area_list *vmas) unsigned long dump_pages_args_size(struct vm_area_list *vmas)
......
...@@ -586,7 +586,7 @@ err: ...@@ -586,7 +586,7 @@ err:
return ret; return ret;
} }
#define RESERVED_PIDS 300 #define RESERVED_PIDS 300
static int get_free_pid() static int get_free_pid()
{ {
static struct pid *prev, *next; static struct pid *prev, *next;
......
...@@ -15,10 +15,10 @@ ...@@ -15,10 +15,10 @@
struct netlink_sk_desc { struct netlink_sk_desc {
struct socket_desc sd; struct socket_desc sd;
u32 portid; u32 portid;
u32 *groups; u32 *groups;
u32 gsize; u32 gsize;
u32 dst_portid; u32 dst_portid;
u32 dst_group; u32 dst_group;
u8 state; u8 state;
u8 protocol; u8 protocol;
......
...@@ -27,10 +27,10 @@ struct packet_sock_info { ...@@ -27,10 +27,10 @@ struct packet_sock_info {
}; };
struct packet_mreq_max { struct packet_mreq_max {
int mr_ifindex; int mr_ifindex;
unsigned short mr_type; unsigned short mr_type;
unsigned short mr_alen; unsigned short mr_alen;
unsigned char mr_address[MAX_ADDR_LEN]; unsigned char mr_address[MAX_ADDR_LEN];
}; };
struct packet_sock_desc { struct packet_sock_desc {
......
...@@ -16,17 +16,17 @@ ...@@ -16,17 +16,17 @@
#endif #endif
enum { enum {
TCPF_ESTABLISHED = (1 << 1), TCPF_ESTABLISHED = (1 << 1),
TCPF_SYN_SENT = (1 << 2), TCPF_SYN_SENT = (1 << 2),
TCPF_SYN_RECV = (1 << 3), TCPF_SYN_RECV = (1 << 3),
TCPF_FIN_WAIT1 = (1 << 4), TCPF_FIN_WAIT1 = (1 << 4),
TCPF_FIN_WAIT2 = (1 << 5), TCPF_FIN_WAIT2 = (1 << 5),
TCPF_TIME_WAIT = (1 << 6), TCPF_TIME_WAIT = (1 << 6),
TCPF_CLOSE = (1 << 7), TCPF_CLOSE = (1 << 7),
TCPF_CLOSE_WAIT = (1 << 8), TCPF_CLOSE_WAIT = (1 << 8),
TCPF_LAST_ACK = (1 << 9), TCPF_LAST_ACK = (1 << 9),
TCPF_LISTEN = (1 << 10), TCPF_LISTEN = (1 << 10),
TCPF_CLOSING = (1 << 11), TCPF_CLOSING = (1 << 11),
}; };
/* /*
...@@ -561,9 +561,9 @@ static int send_fin(struct libsoccr_sk *sk, struct libsoccr_sk_data *data, ...@@ -561,9 +561,9 @@ static int send_fin(struct libsoccr_sk *sk, struct libsoccr_sk_data *data,
libnet_type = LIBNET_RAW4; libnet_type = LIBNET_RAW4;
l = libnet_init( l = libnet_init(
libnet_type, /* injection type */ libnet_type, /* injection type */
NULL, /* network interface */ NULL, /* network interface */
errbuf); /* errbuf */ errbuf); /* errbuf */
if (l == NULL) if (l == NULL)
return -1; return -1;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment