Date: Wed, 11 Nov 1998 12:22:55 +0100 (CET) From: Andrzej Bialecki <abial@nask.pl> To: Pascal Hofstee <daeron@Wit401305.student.utwente.nl> Cc: Shawn Ramsey <shawn@cpl.net>, oZZ!!! <osa@etrust.ru>, current@FreeBSD.ORG Subject: Re: StarOffice-5.0... Message-ID: <Pine.BSF.4.02A.9811111218510.20241-200000@korin.warman.org.pl> In-Reply-To: <Pine.BSF.4.05.9811111001370.25823-100000@Wit401305.student.utwente.nl>
next in thread | previous in thread | raw e-mail | index | archive | help
[-- Attachment #1 --] On Wed, 11 Nov 1998, Pascal Hofstee wrote: > > > On Tue, 10 Nov 1998, Shawn Ramsey wrote: > > > I don't think 5.0 works on FreeBSD. I attempted it, and was only able to > > achieve a core dump executing setup. > > > > This was on a 2.2.7-RELEASE system. > > As far as I know StarOffice 5.0 install-program tries to read the > commandline from /proc ... I think i saw some postings about this on > comps.os.unix.bsd.* (or something like that) Yes, I've got the diffs against relatively fresh current. BTW, I asked this question on -emulation, but got back a profound silence... Can we/ should we incorporate this patch, and hide it under a kernel option, say PROCFS_CMDLINE? The life would be soooo easier for people new to our linux emulation... Andrzej Bialecki -------------------- ++-------++ ------------------------------------- <abial@nask.pl> ||PicoBSD|| FreeBSD in your pocket? Go and see: Research & Academic |+-------+| "Small & Embedded FreeBSD" Network in Poland | |TT~~~| | http://www.freebsd.org/~picobsd/ -------------------- ~-+==---+-+ ------------------------------------- [-- Attachment #2 --] Index: procfs.h =================================================================== RCS file: /home/ncvs/src/sys/miscfs/procfs/procfs.h,v retrieving revision 1.20 diff -c -r1.20 procfs.h *** procfs.h 1998/07/07 04:08:44 1.20 --- procfs.h 1998/11/06 12:16:59 *************** *** 56,62 **** Pnote, /* process notifier */ Pnotepg, /* process group notifier */ Pmap, /* memory map */ ! Ptype /* executable type */ } pfstype; /* --- 56,63 ---- Pnote, /* process notifier */ Pnotepg, /* process group notifier */ Pmap, /* memory map */ ! Ptype, /* executable type */ ! Pcmdln /* executable type */ } pfstype; /* *************** *** 154,159 **** --- 155,161 ---- int procfs_dostatus __P((struct proc *, struct proc *, struct pfsnode *pfsp, struct uio *uio)); int procfs_domap __P((struct proc *, struct proc *, struct pfsnode *pfsp, struct uio *uio)); int procfs_dotype __P((struct proc *, struct proc *, struct pfsnode *pfsp, struct uio *uio)); + int procfs_docmdln __P((struct proc *, struct proc *, struct pfsnode *pfsp, struct uio *uio)); /* Return 1 if process has special kernel digging privileges */ int procfs_kmemaccess __P((struct proc *)); Index: procfs_status.c =================================================================== RCS file: /home/ncvs/src/sys/miscfs/procfs/procfs_status.c,v retrieving revision 1.11 diff -c -r1.11 procfs_status.c *** procfs_status.c 1998/07/11 07:45:45 1.11 --- procfs_status.c 1998/11/06 12:21:08 *************** *** 147,149 **** --- 147,191 ---- return (error); } + + int + procfs_docmdln(curp, p, pfs, uio) + struct proc *curp; + struct proc *p; + struct pfsnode *pfs; + struct uio *uio; + { + struct session *sess; + struct tty *tp; + struct ucred *cr; + char *ps; + char *sep; + int pid,ppid,pgid,sid; + int i; + int xlen; + int error; + char psbuf[256]; + + if(uio->uio_rw!=UIO_READ) + return(EOPNOTSUPP); + + pid=p->p_pid; + ppid=p->p_pptr?p->p_pptr->p_pid:0; + pgid=p->p_pgrp->pg_id; + sess=p->p_pgrp->pg_session; + sid=sess->s_leader ? sess->s_leader->p_pid : 0; + ps=psbuf; + bcopy(p->p_comm, ps, MAXCOMLEN); + ps[MAXCOMLEN] = '\0'; + ps += strlen(ps); + + xlen = ps - psbuf; + xlen -= uio->uio_offset; + ps = psbuf + uio->uio_offset; + xlen = min(xlen, uio->uio_resid); + if (xlen <= 0) + error=0; + else + error=uiomove(ps,xlen,uio); + return(error); + } Index: procfs_subr.c =================================================================== RCS file: /home/ncvs/src/sys/miscfs/procfs/procfs_subr.c,v retrieving revision 1.21 diff -c -r1.21 procfs_subr.c *** procfs_subr.c 1997/12/12 03:33:43 1.21 --- procfs_subr.c 1998/11/06 12:00:38 *************** *** 181,186 **** --- 181,187 ---- case Ptype: case Pmap: case Pstatus: + case Pcmdln: pfs->pfs_mode = (VREAD) | (VREAD >> 3) | (VREAD >> 6); *************** *** 280,285 **** --- 281,290 ---- case Ptype: rtval = procfs_dotype(curp, p, pfs, uio); + break; + + case Pcmdln: + rtval = procfs_docmdln(curp, p, pfs, uio); break; default: Index: procfs_vnops.c =================================================================== RCS file: /home/ncvs/src/sys/miscfs/procfs/procfs_vnops.c,v retrieving revision 1.61 diff -c -r1.61 procfs_vnops.c *** procfs_vnops.c 1998/07/11 07:45:46 1.61 --- procfs_vnops.c 1998/11/06 12:21:50 *************** *** 101,106 **** --- 101,107 ---- { DT_REG, N("notepg"), Pnotepg, NULL }, { DT_REG, N("map"), Pmap, procfs_validmap }, { DT_REG, N("etype"), Ptype, procfs_validtype }, + { DT_REG, N("cmdline"), Pcmdln, NULL }, #undef N }; static const int nproc_targets = sizeof(proc_targets) / sizeof(proc_targets[0]); *************** *** 573,578 **** --- 574,580 ---- case Pstatus: case Pnote: case Pnotepg: + case Pcmdln: vap->va_nlink = 1; vap->va_uid = procp->p_ucred->cr_uid; vap->va_gid = procp->p_ucred->cr_gid;
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.BSF.4.02A.9811111218510.20241-200000>
