From owner-freebsd-smp Wed Aug 18 15:57:11 1999 Delivered-To: freebsd-smp@freebsd.org Received: from mail.cybcon.com (mail.cybcon.com [216.190.188.5]) by hub.freebsd.org (Postfix) with ESMTP id CB1CA14EA3 for ; Wed, 18 Aug 1999 15:57:08 -0700 (PDT) (envelope-from wwoods@cybcon.com) Received: from freebsd.cybcon.com (william@pm3a-28.cybcon.com [205.147.75.157]) by mail.cybcon.com (8.9.0/8.9.0) with ESMTP id PAA28383; Wed, 18 Aug 1999 15:54:51 -0700 (PDT) Message-ID: X-Mailer: XFMail 1.3 [p0] on FreeBSD X-Priority: 3 (Normal) Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 8bit MIME-Version: 1.0 In-Reply-To: <19990819002802.A87509@keltia.freenix.fr> Date: Wed, 18 Aug 1999 15:55:14 -0700 (PDT) Reply-To: wwoods@cybcon.com From: william woods To: Ollivier Robert Subject: Re: StarOffice on a SMP system.... Cc: freebsd-smp@FreeBSD.ORG Sender: owner-freebsd-smp@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org What does this patch do and how would I apply it? On 18-Aug-99 Ollivier Robert wrote: > According to Andreas Klemm: >> O.k. this doesn't belong here, but if you have an Idea, what's >> causing this, then it would be nice, if you could drop some >> mail to me. > > You MUST have this patch applied. Marcel will probably commit before the end > of the week. > > Index: procfs_status.c > =================================================================== > RCS file: /repository/src/sys/miscfs/procfs/procfs_status.c,v > retrieving revision 1.12 > diff -c -r1.12 procfs_status.c > *** procfs_status.c 1999/01/05 03:53:06 1.12 > --- procfs_status.c 1999/05/15 20:36:16 > *************** > *** 47,52 **** > --- 47,56 ---- > #include > #include > #include > + #include > + #include > + #include > + #include > > int > procfs_dostatus(curp, p, pfs, uio) > *************** > *** 164,178 **** > return (EOPNOTSUPP); > > /* > ! * For now, this is a hack. To implement this fully would require > ! * groping around in the process address space to follow argv etc. > */ > ! ps = psbuf; > ! bcopy(p->p_comm, ps, MAXCOMLEN); > ! ps[MAXCOMLEN] = '\0'; > ! ps += strlen(ps); > ! > ! ps += sprintf(ps, "\n"); > > xlen = ps - psbuf; > xlen -= uio->uio_offset; > --- 168,207 ---- > return (EOPNOTSUPP); > > /* > ! * This is a hack: the correct behaviour is only implemented for > ! * the case of the current process enquiring about its own argv > ! * (due to the difficulty of accessing other processes' address space). > ! * For other cases, we cop out and just return argv[0] from p->p_comm. > ! * Note that if the argv is no longer available, we deliberately > ! * don't fall back on p->p_comm or return an error: the authentic > ! * Linux behaviour is to return zero-length in this case. > */ > ! if (curproc == p) { > ! struct ps_strings pstr; > ! int i; > ! size_t bytes_left, done; > ! > ! error = copyin((void*)PS_STRINGS, &pstr, sizeof(pstr)); > ! if (error) return (error); > ! bytes_left = sizeof(psbuf); > ! ps = psbuf; > ! for (i = 0; bytes_left && (i < pstr.ps_nargvstr); i++) { > ! error = copyinstr(pstr.ps_argvstr[i], ps, > ! bytes_left, &done); > ! /* If too long or malformed, just truncate */ > ! if (error) { > ! error = 0; > ! break; > ! } > ! ps += done; > ! bytes_left -= done; > ! } > ! } else { > ! ps = psbuf; > ! bcopy(p->p_comm, ps, MAXCOMLEN); > ! ps[MAXCOMLEN] = '\0'; > ! ps += strlen(ps); > ! } > > xlen = ps - psbuf; > xlen -= uio->uio_offset; > > -- > Sascha Blank | FreeBSD - > Student and System Administrator | that's where you want to go today! > at the University of Trier, Germany | > mailto:blank@fox.uni-trier.de | See http://www.freebsd.org for details > > -- > Ollivier ROBERT -=- FreeBSD: The Power to Serve! -=- > roberto@keltia.freenix.fr > FreeBSD keltia.freenix.fr 4.0-CURRENT #73: Sat Jul 31 15:36:05 CEST 1999 > > > > To Unsubscribe: send mail to majordomo@FreeBSD.org > with "unsubscribe freebsd-smp" in the body of the message ---------------------------------- E-Mail: william woods Date: 18-Aug-99 Time: 15:53:49 This message was sent by XFMail ---------------------------------- To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-smp" in the body of the message