Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 18 Aug 1999 15:55:14 -0700 (PDT)
From:      william woods <wwoods@cybcon.com>
To:        Ollivier Robert <roberto@keltia.freenix.fr>
Cc:        freebsd-smp@FreeBSD.ORG
Subject:   Re: StarOffice on a SMP system....
Message-ID:  <XFMail.990818155514.wwoods@cybcon.com>
In-Reply-To: <19990819002802.A87509@keltia.freenix.fr>

next in thread | previous in thread | raw e-mail | index | archive | help
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 <sys/tty.h>
>   #include <sys/resourcevar.h>
>   #include <miscfs/procfs/procfs.h>
> + #include <vm/vm.h>
> + #include <vm/pmap.h>
> + #include <vm/vm_param.h>
> + #include <sys/exec.h>
>   
>   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 <wwoods@cybcon.com>
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




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?XFMail.990818155514.wwoods>