Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 8b028bcd authored by Paolo 'Blaisorblade' Giarrusso's avatar Paolo 'Blaisorblade' Giarrusso Committed by Linus Torvalds
Browse files

[PATCH] uml: code convention cleanup of a file



Fix coding conventions violations is arch/um/os-Linux/helper.c.

Signed-off-by: default avatarPaolo 'Blaisorblade' Giarrusso <blaisorblade@yahoo.it>
Cc: Jeff Dike <jdike@addtoit.com>
Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
parent c13e5690
Loading
Loading
Loading
Loading
+28 −25
Original line number Diff line number Diff line
@@ -46,7 +46,7 @@ static int helper_child(void *arg)
	printk("helper_child - execve of '%s' failed - errno = %d\n", argv[0], errno);
	os_write_file(data->fd, &errval, sizeof(errval));
	kill(os_getpid(), SIGKILL);
	return(0);
	return 0;
}

/* Returns either the pid of the child process we run or -E* on failure.
@@ -60,7 +60,8 @@ int run_helper(void (*pre_exec)(void *), void *pre_data, char **argv,

	if ((stack_out != NULL) && (*stack_out != 0))
		stack = *stack_out;
	else stack = alloc_stack(0, __cant_sleep());
	else
		stack = alloc_stack(0, __cant_sleep());
	if (stack == 0)
		return -ENOMEM;

@@ -95,9 +96,9 @@ int run_helper(void (*pre_exec)(void *), void *pre_data, char **argv,
	/* Read the errno value from the child, if the exec failed, or get 0 if
	 * the exec succeeded because the pipe fd was set as close-on-exec. */
	n = os_read_file(fds[0], &ret, sizeof(ret));
	if(n == 0)
	if (n == 0) {
		ret = pid;
	else {
	} else {
		if (n < 0) {
			printk("run_helper : read on pipe failed, ret = %d\n",
			       -n);
@@ -114,8 +115,9 @@ out_close:
out_free:
	if (stack_out == NULL)
		free_stack(stack, 0);
	else *stack_out = stack;
	return(ret);
	else
		*stack_out = stack;
	return ret;
}

int run_helper_thread(int (*proc)(void *), void *arg, unsigned int flags,
@@ -125,7 +127,8 @@ int run_helper_thread(int (*proc)(void *), void *arg, unsigned int flags,
	int pid, status, err;

	stack = alloc_stack(stack_order, __cant_sleep());
	if(stack == 0) return(-ENOMEM);
	if (stack == 0)
		return -ENOMEM;

	sp = stack + (page_size() << stack_order) - sizeof(void *);
	pid = clone(proc, (void *) sp, flags | SIGCHLD, arg);
@@ -147,9 +150,9 @@ int run_helper_thread(int (*proc)(void *), void *arg, unsigned int flags,
			printk("run_helper_thread - thread returned status "
			       "0x%x\n", status);
		free_stack(stack, stack_order);
	}
	else *stack_out = stack;
	return(pid);
	} else
		*stack_out = stack;
	return pid;
}

int helper_wait(int pid)
@@ -161,5 +164,5 @@ int helper_wait(int pid)
		ret = -errno;
		printk("helper_wait : waitpid failed, errno = %d\n", errno);
	}
	return(ret);
	return ret;
}