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

Commit 1aa351a3 authored by Jeff Dike's avatar Jeff Dike Committed by Linus Torvalds
Browse files

uml: tidy helper code



Style fixes to arch/um/os/helper.c and tidying up the breakpoint fix a
bit.

helper.c gets all the usual style fixes -
	 updated copyright
	 all printks get severities

Also -
	 errval changes to err in helper_child
	 fixed an obsolete comment
	 run_helper was killing a child process which is guaranteed to
be dead or dying anyway

Removed the nohang and pname arguments from helper_wait and fixed the
declaration and callers.  nohang was used only in the slirp driver and
I don't think it was needed.  I think pname was a bit of overkill in
putting out an error message when something goes wrong.

Signed-off-by: default avatarJeff Dike <jdike@linux.intel.com>
Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
parent fce8c41c
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -201,7 +201,7 @@ static int change_tramp(char **argv, char *output, int output_len)
	close(fds[1]);

	if (pid > 0)
		helper_wait(pid, 0, "change_tramp");
		helper_wait(pid);
	return pid;
}

+1 −1
Original line number Diff line number Diff line
@@ -109,7 +109,7 @@ static int slip_tramp(char **argv, int fd)
	read_output(fds[0], output, output_len);
	printk("%s", output);

	err = helper_wait(pid, 0, argv[0]);
	err = helper_wait(pid);
	close(fds[0]);

out_free:
+1 −1
Original line number Diff line number Diff line
@@ -98,7 +98,7 @@ static void slirp_close(int fd, void *data)
		       "(%d)\n", pri->pid, errno);
	}
#endif
	err = helper_wait(pri->pid, 1, "slirp_close");
	err = helper_wait(pri->pid);
	if (err < 0)
		return;

+1 −1
Original line number Diff line number Diff line
@@ -207,7 +207,7 @@ extern int execvp_noalloc(char *buf, const char *file, char *const argv[]);
extern int run_helper(void (*pre_exec)(void *), void *pre_data, char **argv);
extern int run_helper_thread(int (*proc)(void *), void *arg,
			     unsigned int flags, unsigned long *stack_out);
extern int helper_wait(int pid, int nohang, char *pname);
extern int helper_wait(int pid);


/* tls.c */
+1 −1
Original line number Diff line number Diff line
@@ -131,7 +131,7 @@ static int etap_tramp(char *dev, char *gate, int control_me,
	}
	if (c != 1) {
		printk(UM_KERN_ERR "etap_tramp : uml_net failed\n");
		err = helper_wait(pid, 0, "uml_net");
		err = helper_wait(pid);
	}
	return err;
}
Loading