From owner-freebsd-current Mon May 17 4:10:39 1999 Delivered-To: freebsd-current@freebsd.org Received: from herring.nlsystems.com (nlsys.demon.co.uk [158.152.125.33]) by hub.freebsd.org (Postfix) with ESMTP id 017F314E93 for ; Mon, 17 May 1999 04:10:35 -0700 (PDT) (envelope-from dfr@nlsystems.com) Received: from localhost (dfr@localhost) by herring.nlsystems.com (8.9.3/8.8.8) with ESMTP id MAA56424; Mon, 17 May 1999 12:07:51 +0100 (BST) (envelope-from dfr@nlsystems.com) Date: Mon, 17 May 1999 12:07:51 +0100 (BST) From: Doug Rabson To: Poul-Henning Kamp Cc: John Polstra , current@freebsd.org Subject: Re: sys/types.h rev. 1.33 breaks ps etc. on alpha In-Reply-To: <22167.926938043@critter.freebsd.dk> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-current@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG On Mon, 17 May 1999, Poul-Henning Kamp wrote: > In message , Doug > Rabson writes: > >On Mon, 17 May 1999, Poul-Henning Kamp wrote: > > > >> In message , Doug > >> Rabson writes: > >> >On Mon, 17 May 1999, Poul-Henning Kamp wrote: > >> > > >> >> > >> >> Try it and tell me if it works... > >> > > >> >Not good so far. In my test kernel which defines udev_t as uintptr_t, sh > >> >faults when init tries to go multiuser. > >> > >> I'm worried about the sign extension from 32 to 64 bits... > > > >I haven't been able to diagnose the problem yet but I don't think its sign > >extension since uintptr_t is an unsigned type. > > Lots of places fiddle minor/major in ints... This alternative patch seems to fix things (and its probably more correct). Index: sys/user.h =================================================================== RCS file: /home/ncvs/src/sys/sys/user.h,v retrieving revision 1.20 diff -u -r1.20 user.h --- user.h 1999/01/26 02:38:11 1.20 +++ user.h 1999/05/17 10:55:26 @@ -74,7 +74,7 @@ pid_t e_ppid; /* parent process id */ pid_t e_pgid; /* process group id */ short e_jobc; /* job control counter */ - dev_t e_tdev; /* controlling tty dev */ + udev_t e_tdev; /* controlling tty dev */ pid_t e_tpgid; /* tty process group id */ struct session *e_tsess; /* tty session pointer */ #define WMESGLEN 7 Index: kern/kern_proc.c =================================================================== RCS file: /home/ncvs/src/sys/kern/kern_proc.c,v retrieving revision 1.50 diff -u -r1.50 kern_proc.c --- kern_proc.c 1999/05/11 19:54:29 1.50 +++ kern_proc.c 1999/05/17 10:55:17 @@ -443,7 +443,7 @@ if ((p->p_flag & P_CONTROLT) && (ep->e_sess != NULL) && ((tp = ep->e_sess->s_ttyp) != NULL)) { - ep->e_tdev = tp->t_dev; + ep->e_tdev = dev2udev(tp->t_dev); ep->e_tpgid = tp->t_pgrp ? tp->t_pgrp->pg_id : NO_PID; ep->e_tsess = tp->t_session; } else -- Doug Rabson Mail: dfr@nlsystems.com Nonlinear Systems Ltd. Phone: +44 181 442 9037 To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-current" in the body of the message