1
0
mirror of https://git.FreeBSD.org/src.git synced 2024-12-13 10:02:38 +00:00

Revert previous commit to subr_prf.c and make it more tidy.

As mentioned by bz and bde, the change I made wasn't the proper way to
fix. Inspired by bde's patch, perform some small cleanups to uprintf().

Reviewed by:	bz
This commit is contained in:
Ed Schouten 2009-02-27 12:50:25 +00:00
parent 0834dc77ba
commit ff7b7d9039
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=189102

View File

@ -127,16 +127,18 @@ tablefull(const char *tab)
int
uprintf(const char *fmt, ...)
{
struct thread *td = curthread;
struct proc *p = td->td_proc;
va_list ap;
struct putchar_arg pca;
struct proc *p;
struct thread *td;
int retval;
if (td == NULL || TD_IS_IDLETHREAD(td))
td = curthread;
if (TD_IS_IDLETHREAD(td))
return (0);
sx_slock(&proctree_lock);
p = td->td_proc;
PROC_LOCK(p);
if ((p->p_flag & P_CONTROLT) == 0) {
PROC_UNLOCK(p);