[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH 2/3] Add a file_exec_file_name RPC
From: |
Carl Fredrik Hammar |
Subject: |
Re: [PATCH 2/3] Add a file_exec_file_name RPC |
Date: |
Mon, 19 Jul 2010 10:34:58 +0200 |
User-agent: |
Mutt/1.5.20 (2009-06-14) |
On Fri, Jul 16, 2010 at 12:15:06PM +0200, Emilio Pozuelo Monfort wrote:
> >From 3804a36fcf95a3fd588ce67a08a36346134b8d1f Mon Sep 17 00:00:00 2001
> From: Emilio Pozuelo Monfort <pochu27@gmail.com>
> Date: Wed, 26 May 2010 01:27:40 +0200
> Subject: [PATCH 2/3] Add a file_exec_file_name RPC
>
> * hurd/fs.defs (file_exec_file_name): New RPC.
> (file_exec): Label as deprecated.
>
> * libdiskfs/file-exec.c (diskfs_S_file_exec_file_name):
> New function.
> * libnetfs/file-exec.c (netfs_S_file_exec_file_name):
> Likewise.
> * libtrivfs/file-exec.c (trivfs_S_file_exec_file_name):
> Likewise.
> * trans/fakeroot.c (netfs_S_file_exec_file_name): Likewise.
>
> * utils/login.c: Call file_exec_file_name, and fallback to
> file_exec_file_name if necessary.
> * libfshelp/start-translator-long.c: Likewise.
> * exec/hashexec.c: Likewise.
> * init/init.c: Likewise.
> * trans/fakeroot.c: Likewise.
>
> * doc/hurd.texi: Change file_exec with file_exec_file_name.
> * hurd/hurd_types.h: Likewise.
> * libdiskfs/boot-start.c: Likewise.
> * TODO: Likewise.
Again no leading tabs. You don't mention changes to the old
implementations but since most changes are mechanical you can probably
get away with something like this:
* hurd/fs.defs (file_exec): Deprecate in favor of...
(file_exec_file_name): ...this new RPC.
Change all implementations and forward old implementations to
the new version. Change all callers but fallback to old version.
Change comments and documentation.
I should've thought of this before you wrote the ChangeLog, sorry.
> @@ -133,14 +167,28 @@ netfs_S_file_exec (struct protid *cred,
> if (newpi)
> {
> right = ports_get_send_right (newpi);
> - err = exec_exec (_netfs_exec,
> - right, MACH_MSG_TYPE_COPY_SEND,
> - task, flags, argv, argvlen, envp, envplen,
> - fds, MACH_MSG_TYPE_COPY_SEND, fdslen,
> - portarray, MACH_MSG_TYPE_COPY_SEND, portarraylen,
> - intarray, intarraylen,
> - deallocnames, deallocnameslen,
> - destroynames, destroynameslen);
> + err = exec_exec_file_name (_netfs_exec,
> + right, MACH_MSG_TYPE_COPY_SEND,
> + task, flags, filename,
> + argv, argvlen, envp, envplen,
> + fds, MACH_MSG_TYPE_COPY_SEND, fdslen,
> + portarray, MACH_MSG_TYPE_COPY_SEND,
> + portarraylen,
> + intarray, intarraylen,
> + deallocnames, deallocnameslen,
> + destroynames, destroynameslen);
> + /* For backwards compatibility. Just drop it when we kill
> + file_exec. */
> + if (err == MIG_BAD_ID)
> + err = exec_exec (_netfs_exec,
> + right, MACH_MSG_TYPE_COPY_SEND,
> + task, flags, argv, argvlen, envp, envplen,
> + fds, MACH_MSG_TYPE_COPY_SEND, fdslen,
> + portarray, MACH_MSG_TYPE_COPY_SEND,
> portarraylen,
Hmm, seems I missed this long line. You might as well fix it since you
need to resend the patch anyway.
Regards,
Fredrik