[rtems-libbsd commit] Added rtems_bsd_thread0_ucred as a single global ucred.
Sebastian Huber
sebastian.huber at embedded-brains.de
Thu May 10 13:37:49 UTC 2012
On 05/01/2012 08:48 PM, Jennifer Averett wrote:
> diff --git a/freebsd/kern/init_main.c b/freebsd/kern/init_main.c
> index 540e0cb..8ae8a71 100644
> --- a/freebsd/kern/init_main.c
> +++ b/freebsd/kern/init_main.c
> @@ -118,6 +118,8 @@ SYSINIT(placeholder, SI_SUB_DUMMY, SI_ORDER_ANY, NULL, NULL);
> * The sysinit table itself. Items are checked off as the are run.
> * If we want to register new sysinit types, add them to newsysinit.
> */
> +#else /* __rtems__ */
> +struct ucred *rtems_bsd_thread0_ucred;
> #endif /* __rtems__ */
> SET_DECLARE(sysinit_set, struct sysinit);
> #ifndef __rtems__
> @@ -191,6 +193,13 @@ mi_startup(void)
> #ifndef __rtems__
> if (boothowto& RB_VERBOSE)
> bootverbose++;
> +#else /* __rtems__ */
> + rtems_bsd_thread0_ucred = crget();
> + rtems_bsd_thread0_ucred->cr_ngroups = 1; /* group 0 */
> + rtems_bsd_thread0_ucred->cr_uidinfo = uifind(0);
> + rtems_bsd_thread0_ucred = uifind(0);
> + rtems_bsd_thread0_ucred->cr_prison =&prison0;
> +
> #endif /* __rtems__ */
This change is quite bad. Firstly it places code into a general FreeBSD file
which doesn't belong to its context. Secondly it adds a lot of dependencies to
users (like the USB stack) which don't care about a thread0 or credentials.
--
Sebastian Huber, embedded brains GmbH
Address : Obere Lagerstr. 30, D-82178 Puchheim, Germany
Phone : +49 89 18 90 80 79-6
Fax : +49 89 18 90 80 79-9
E-Mail : sebastian.huber at embedded-brains.de
PGP : Public key available on request.
Diese Nachricht ist keine geschäftliche Mitteilung im Sinne des EHUG.
More information about the devel
mailing list