svn commit: r223106 - in projects/largeSMP: bin/ps bin/sh
bin/sh/bltin contrib/gdb/gdb contrib/pf/pfctl
contrib/sendmail contrib/sendmail/cf/cf
contrib/sendmail/cf/feature contrib/sendmail/cf/m4 co...
Attilio Rao
attilio at FreeBSD.org
Wed Jun 15 07:20:23 UTC 2011
Author: attilio
Date: Wed Jun 15 07:20:22 2011
New Revision: 223106
URL: http://svn.freebsd.org/changeset/base/223106
Log:
MFC
Added:
projects/largeSMP/contrib/sendmail/cf/ostype/solaris11.m4
- copied unchanged from r223080, head/contrib/sendmail/cf/ostype/solaris11.m4
Modified:
projects/largeSMP/bin/ps/extern.h
projects/largeSMP/bin/ps/keyword.c
projects/largeSMP/bin/ps/print.c
projects/largeSMP/bin/ps/ps.1
projects/largeSMP/bin/sh/alias.c
projects/largeSMP/bin/sh/alias.h
projects/largeSMP/bin/sh/arith.h
projects/largeSMP/bin/sh/bltin/bltin.h
projects/largeSMP/bin/sh/cd.c
projects/largeSMP/bin/sh/cd.h
projects/largeSMP/bin/sh/eval.h
projects/largeSMP/bin/sh/exec.h
projects/largeSMP/bin/sh/expand.c
projects/largeSMP/bin/sh/expand.h
projects/largeSMP/bin/sh/histedit.c
projects/largeSMP/bin/sh/jobs.c
projects/largeSMP/bin/sh/jobs.h
projects/largeSMP/bin/sh/main.c
projects/largeSMP/bin/sh/main.h
projects/largeSMP/bin/sh/mkbuiltins
projects/largeSMP/bin/sh/myhistedit.h
projects/largeSMP/bin/sh/options.c
projects/largeSMP/bin/sh/options.h
projects/largeSMP/bin/sh/trap.c
projects/largeSMP/bin/sh/trap.h
projects/largeSMP/bin/sh/var.c
projects/largeSMP/bin/sh/var.h
projects/largeSMP/contrib/gdb/gdb/ppcfbsd-tdep.c
projects/largeSMP/contrib/pf/pfctl/pfctl.8
projects/largeSMP/contrib/pf/pfctl/pfctl.c
projects/largeSMP/contrib/pf/pfctl/pfctl_optimize.c
projects/largeSMP/contrib/pf/pfctl/pfctl_parser.c
projects/largeSMP/contrib/pf/pfctl/pfctl_parser.h
projects/largeSMP/contrib/sendmail/CACerts
projects/largeSMP/contrib/sendmail/FREEBSD-upgrade
projects/largeSMP/contrib/sendmail/KNOWNBUGS
projects/largeSMP/contrib/sendmail/LICENSE
projects/largeSMP/contrib/sendmail/PGPKEYS
projects/largeSMP/contrib/sendmail/RELEASE_NOTES
projects/largeSMP/contrib/sendmail/cf/cf/submit.cf
projects/largeSMP/contrib/sendmail/cf/feature/ldap_routing.m4
projects/largeSMP/contrib/sendmail/cf/m4/cfhead.m4
projects/largeSMP/contrib/sendmail/cf/m4/proto.m4
projects/largeSMP/contrib/sendmail/cf/m4/version.m4
projects/largeSMP/contrib/sendmail/contrib/qtool.pl
projects/largeSMP/contrib/sendmail/doc/op/op.me
projects/largeSMP/contrib/sendmail/include/sm/conf.h
projects/largeSMP/contrib/sendmail/libmilter/docs/overview.html
projects/largeSMP/contrib/sendmail/libmilter/docs/smfi_stop.html
projects/largeSMP/contrib/sendmail/libmilter/docs/xxfi_envrcpt.html
projects/largeSMP/contrib/sendmail/libmilter/engine.c
projects/largeSMP/contrib/sendmail/libmilter/sm_gethost.c
projects/largeSMP/contrib/sendmail/libmilter/worker.c
projects/largeSMP/contrib/sendmail/libsm/ldap.c
projects/largeSMP/contrib/sendmail/makemap/makemap.c
projects/largeSMP/contrib/sendmail/src/Makefile.m4
projects/largeSMP/contrib/sendmail/src/conf.c
projects/largeSMP/contrib/sendmail/src/daemon.c
projects/largeSMP/contrib/sendmail/src/deliver.c
projects/largeSMP/contrib/sendmail/src/domain.c
projects/largeSMP/contrib/sendmail/src/envelope.c
projects/largeSMP/contrib/sendmail/src/err.c
projects/largeSMP/contrib/sendmail/src/main.c
projects/largeSMP/contrib/sendmail/src/map.c
projects/largeSMP/contrib/sendmail/src/mci.c
projects/largeSMP/contrib/sendmail/src/parseaddr.c
projects/largeSMP/contrib/sendmail/src/queue.c
projects/largeSMP/contrib/sendmail/src/readcf.c
projects/largeSMP/contrib/sendmail/src/sendmail.8
projects/largeSMP/contrib/sendmail/src/sendmail.h
projects/largeSMP/contrib/sendmail/src/sm_resolve.c
projects/largeSMP/contrib/sendmail/src/srvrsmtp.c
projects/largeSMP/contrib/sendmail/src/tls.c
projects/largeSMP/contrib/sendmail/src/udb.c
projects/largeSMP/contrib/sendmail/src/usersmtp.c
projects/largeSMP/contrib/sendmail/src/version.c
projects/largeSMP/etc/periodic/daily/800.scrub-zfs
projects/largeSMP/etc/sendmail/freebsd.mc
projects/largeSMP/etc/sendmail/freebsd.submit.mc
projects/largeSMP/release/doc/en_US.ISO8859-1/relnotes/article.sgml
projects/largeSMP/sbin/camcontrol/camcontrol.c
projects/largeSMP/sbin/ifconfig/ifconfig.c
projects/largeSMP/sbin/ipfw/ipfw.8
projects/largeSMP/sbin/ipfw/ipfw2.c
projects/largeSMP/sbin/ipfw/ipfw2.h
projects/largeSMP/sbin/ipfw/nat.c
projects/largeSMP/share/misc/committers-ports.dot
projects/largeSMP/sys/amd64/conf/GENERIC
projects/largeSMP/sys/cam/ata/ata_da.c
projects/largeSMP/sys/cam/cam_ccb.h
projects/largeSMP/sys/cam/cam_periph.c
projects/largeSMP/sys/cam/cam_periph.h
projects/largeSMP/sys/cam/cam_xpt.c
projects/largeSMP/sys/cam/cam_xpt.h
projects/largeSMP/sys/cam/cam_xpt_internal.h
projects/largeSMP/sys/cam/scsi/scsi_all.c
projects/largeSMP/sys/cam/scsi/scsi_all.h
projects/largeSMP/sys/cam/scsi/scsi_da.c
projects/largeSMP/sys/cam/scsi/scsi_pass.c
projects/largeSMP/sys/cam/scsi/scsi_xpt.c
projects/largeSMP/sys/dev/ata/chipsets/ata-intel.c
projects/largeSMP/sys/dev/puc/puc.c
projects/largeSMP/sys/dev/puc/puc_bfe.h
projects/largeSMP/sys/dev/puc/puc_pccard.c
projects/largeSMP/sys/dev/puc/puc_pci.c
projects/largeSMP/sys/dev/sound/pci/hda/hdac.c
projects/largeSMP/sys/dev/xen/blkback/blkback.c
projects/largeSMP/sys/geom/geom.h
projects/largeSMP/sys/geom/geom_dev.c
projects/largeSMP/sys/geom/geom_disk.c
projects/largeSMP/sys/geom/geom_disk.h
projects/largeSMP/sys/geom/geom_event.c
projects/largeSMP/sys/geom/geom_subr.c
projects/largeSMP/sys/i386/conf/GENERIC
projects/largeSMP/sys/kern/kern_conf.c
projects/largeSMP/sys/kern/kern_exit.c
projects/largeSMP/sys/kern/subr_devstat.c
projects/largeSMP/sys/kern/subr_kdb.c
projects/largeSMP/sys/kern/sys_process.c
projects/largeSMP/sys/net/if.h
projects/largeSMP/sys/netinet/ipfw/ip_fw2.c
projects/largeSMP/sys/netinet/ipfw/ip_fw_nat.c
projects/largeSMP/sys/netinet/libalias/alias.h
projects/largeSMP/sys/sys/conf.h
projects/largeSMP/sys/sys/disk.h
projects/largeSMP/sys/sys/proc.h
projects/largeSMP/sys/ufs/ffs/ffs_softdep.c
projects/largeSMP/usr.sbin/diskinfo/diskinfo.c
Directory Properties:
projects/largeSMP/ (props changed)
projects/largeSMP/cddl/contrib/opensolaris/ (props changed)
projects/largeSMP/contrib/bind9/ (props changed)
projects/largeSMP/contrib/binutils/ (props changed)
projects/largeSMP/contrib/bzip2/ (props changed)
projects/largeSMP/contrib/compiler-rt/ (props changed)
projects/largeSMP/contrib/dialog/ (props changed)
projects/largeSMP/contrib/ee/ (props changed)
projects/largeSMP/contrib/expat/ (props changed)
projects/largeSMP/contrib/file/ (props changed)
projects/largeSMP/contrib/gcc/ (props changed)
projects/largeSMP/contrib/gdb/ (props changed)
projects/largeSMP/contrib/gdtoa/ (props changed)
projects/largeSMP/contrib/gnu-sort/ (props changed)
projects/largeSMP/contrib/groff/ (props changed)
projects/largeSMP/contrib/less/ (props changed)
projects/largeSMP/contrib/libpcap/ (props changed)
projects/largeSMP/contrib/libstdc++/ (props changed)
projects/largeSMP/contrib/llvm/ (props changed)
projects/largeSMP/contrib/llvm/tools/clang/ (props changed)
projects/largeSMP/contrib/ncurses/ (props changed)
projects/largeSMP/contrib/netcat/ (props changed)
projects/largeSMP/contrib/ntp/ (props changed)
projects/largeSMP/contrib/one-true-awk/ (props changed)
projects/largeSMP/contrib/openbsm/ (props changed)
projects/largeSMP/contrib/openpam/ (props changed)
projects/largeSMP/contrib/pf/ (props changed)
projects/largeSMP/contrib/sendmail/ (props changed)
projects/largeSMP/contrib/tcpdump/ (props changed)
projects/largeSMP/contrib/tcsh/ (props changed)
projects/largeSMP/contrib/top/ (props changed)
projects/largeSMP/contrib/top/install-sh (props changed)
projects/largeSMP/contrib/tzcode/stdtime/ (props changed)
projects/largeSMP/contrib/tzcode/zic/ (props changed)
projects/largeSMP/contrib/tzdata/ (props changed)
projects/largeSMP/contrib/wpa/ (props changed)
projects/largeSMP/contrib/xz/ (props changed)
projects/largeSMP/crypto/openssh/ (props changed)
projects/largeSMP/crypto/openssl/ (props changed)
projects/largeSMP/gnu/lib/ (props changed)
projects/largeSMP/gnu/usr.bin/binutils/ (props changed)
projects/largeSMP/gnu/usr.bin/cc/cc_tools/ (props changed)
projects/largeSMP/gnu/usr.bin/gdb/ (props changed)
projects/largeSMP/lib/libc/ (props changed)
projects/largeSMP/lib/libc/stdtime/ (props changed)
projects/largeSMP/lib/libutil/ (props changed)
projects/largeSMP/lib/libz/ (props changed)
projects/largeSMP/sbin/ (props changed)
projects/largeSMP/sbin/ipfw/ (props changed)
projects/largeSMP/share/mk/bsd.arch.inc.mk (props changed)
projects/largeSMP/share/zoneinfo/ (props changed)
projects/largeSMP/sys/ (props changed)
projects/largeSMP/sys/amd64/include/xen/ (props changed)
projects/largeSMP/sys/boot/ (props changed)
projects/largeSMP/sys/boot/i386/efi/ (props changed)
projects/largeSMP/sys/boot/ia64/efi/ (props changed)
projects/largeSMP/sys/boot/ia64/ski/ (props changed)
projects/largeSMP/sys/boot/powerpc/boot1.chrp/ (props changed)
projects/largeSMP/sys/boot/powerpc/ofw/ (props changed)
projects/largeSMP/sys/cddl/contrib/opensolaris/ (props changed)
projects/largeSMP/sys/conf/ (props changed)
projects/largeSMP/sys/contrib/dev/acpica/ (props changed)
projects/largeSMP/sys/contrib/octeon-sdk/ (props changed)
projects/largeSMP/sys/contrib/pf/ (props changed)
projects/largeSMP/sys/contrib/x86emu/ (props changed)
projects/largeSMP/usr.bin/calendar/ (props changed)
projects/largeSMP/usr.bin/csup/ (props changed)
projects/largeSMP/usr.bin/procstat/ (props changed)
projects/largeSMP/usr.sbin/ndiscvt/ (props changed)
projects/largeSMP/usr.sbin/zic/ (props changed)
Modified: projects/largeSMP/bin/ps/extern.h
==============================================================================
--- projects/largeSMP/bin/ps/extern.h Wed Jun 15 06:13:08 2011 (r223105)
+++ projects/largeSMP/bin/ps/extern.h Wed Jun 15 07:20:22 2011 (r223106)
@@ -70,6 +70,7 @@ void pmem(KINFO *, VARENT *);
void pri(KINFO *, VARENT *);
void printheader(void);
void priorityr(KINFO *, VARENT *);
+void egroupname(KINFO *, VARENT *);
void rgroupname(KINFO *, VARENT *);
void runame(KINFO *, VARENT *);
void rvar(KINFO *, VARENT *);
@@ -78,6 +79,7 @@ int s_cputime(KINFO *);
int s_label(KINFO *);
int s_loginclass(KINFO *);
int s_logname(KINFO *);
+int s_egroupname(KINFO *);
int s_rgroupname(KINFO *);
int s_runame(KINFO *);
int s_systime(KINFO *);
Modified: projects/largeSMP/bin/ps/keyword.c
==============================================================================
--- projects/largeSMP/bin/ps/keyword.c Wed Jun 15 06:13:08 2011 (r223105)
+++ projects/largeSMP/bin/ps/keyword.c Wed Jun 15 07:20:22 2011 (r223106)
@@ -88,12 +88,19 @@ static VAR var[] = {
{"cpu", "CPU", NULL, 0, kvar, NULL, 3, KOFF(ki_estcpu), UINT, "d",
0},
{"cputime", "", "time", 0, NULL, NULL, 0, 0, CHAR, NULL, 0},
+ {"egid", "", "gid", 0, NULL, NULL, 0, 0, CHAR, NULL, 0},
+ {"egroup", "", "group", 0, NULL, NULL, 0, 0, CHAR, NULL, 0},
{"emul", "EMUL", NULL, LJUST, emulname, NULL, EMULLEN, 0, CHAR,
NULL, 0},
{"etime", "ELAPSED", NULL, USER, elapsed, NULL, 12, 0, CHAR, NULL, 0},
{"etimes", "ELAPSED", NULL, USER, elapseds, NULL, 12, 0, CHAR, NULL, 0},
+ {"euid", "", "uid", 0, NULL, NULL, 0, 0, CHAR, NULL, 0},
{"f", "F", NULL, 0, kvar, NULL, 8, KOFF(ki_flag), INT, "x", 0},
{"flags", "", "f", 0, NULL, NULL, 0, 0, CHAR, NULL, 0},
+ {"gid", "GID", NULL, 0, kvar, NULL, UIDLEN, KOFF(ki_groups),
+ UINT, UIDFMT, 0},
+ {"group", "GROUP", NULL, LJUST, egroupname, s_egroupname,
+ USERLEN, 0, CHAR, NULL, 0},
{"ignored", "", "sigignore", 0, NULL, NULL, 0, 0, CHAR, NULL, 0},
{"inblk", "INBLK", NULL, USER, rvar, NULL, 4, ROFF(ru_inblock), LONG,
"ld", 0},
Modified: projects/largeSMP/bin/ps/print.c
==============================================================================
--- projects/largeSMP/bin/ps/print.c Wed Jun 15 06:13:08 2011 (r223105)
+++ projects/largeSMP/bin/ps/print.c Wed Jun 15 07:20:22 2011 (r223106)
@@ -341,6 +341,22 @@ s_uname(KINFO *k)
}
void
+egroupname(KINFO *k, VARENT *ve)
+{
+ VAR *v;
+
+ v = ve->var;
+ (void)printf("%-*s", v->width,
+ group_from_gid(k->ki_p->ki_groups[0], 0));
+}
+
+int
+s_egroupname(KINFO *k)
+{
+ return (strlen(group_from_gid(k->ki_p->ki_groups[0], 0)));
+}
+
+void
rgroupname(KINFO *k, VARENT *ve)
{
VAR *v;
Modified: projects/largeSMP/bin/ps/ps.1
==============================================================================
--- projects/largeSMP/bin/ps/ps.1 Wed Jun 15 06:13:08 2011 (r223105)
+++ projects/largeSMP/bin/ps/ps.1 Wed Jun 15 07:20:22 2011 (r223106)
@@ -29,7 +29,7 @@
.\" @(#)ps.1 8.3 (Berkeley) 4/18/94
.\" $FreeBSD$
.\"
-.Dd April 18, 2011
+.Dd June 14, 2011
.Dt PS 1
.Os
.Sh NAME
@@ -502,6 +502,12 @@ elapsed running time, in decimal integer
.It Cm flags
the process flags, in hexadecimal (alias
.Cm f )
+.It Cm gid
+effective group ID (alias
+.Cm egid )
+.It Cm group
+group name (from egid) (alias
+.Cm egroup )
.It Cm inblk
total blocks read (alias
.Cm inblock )
@@ -629,7 +635,8 @@ process pointer
.It Cm ucomm
name to be used for accounting
.It Cm uid
-effective user ID
+effective user ID (alias
+.Cm euid )
.It Cm upr
scheduling priority on return from system call (alias
.Cm usrpri )
Modified: projects/largeSMP/bin/sh/alias.c
==============================================================================
--- projects/largeSMP/bin/sh/alias.c Wed Jun 15 06:13:08 2011 (r223105)
+++ projects/largeSMP/bin/sh/alias.c Wed Jun 15 07:20:22 2011 (r223106)
@@ -46,6 +46,7 @@ __FBSDID("$FreeBSD$");
#include "mystring.h"
#include "alias.h"
#include "options.h" /* XXX for argptr (should remove?) */
+#include "builtins.h"
#define ATABSIZE 39
Modified: projects/largeSMP/bin/sh/alias.h
==============================================================================
--- projects/largeSMP/bin/sh/alias.h Wed Jun 15 06:13:08 2011 (r223105)
+++ projects/largeSMP/bin/sh/alias.h Wed Jun 15 07:20:22 2011 (r223106)
@@ -43,5 +43,3 @@ struct alias {
};
struct alias *lookupalias(const char *, int);
-int aliascmd(int, char **);
-int unaliascmd(int, char **);
Modified: projects/largeSMP/bin/sh/arith.h
==============================================================================
--- projects/largeSMP/bin/sh/arith.h Wed Jun 15 06:13:08 2011 (r223105)
+++ projects/largeSMP/bin/sh/arith.h Wed Jun 15 07:20:22 2011 (r223106)
@@ -36,4 +36,3 @@
arith_t arith(const char *);
void arith_lex_reset(void);
-int expcmd(int, char **);
Modified: projects/largeSMP/bin/sh/bltin/bltin.h
==============================================================================
--- projects/largeSMP/bin/sh/bltin/bltin.h Wed Jun 15 06:13:08 2011 (r223105)
+++ projects/largeSMP/bin/sh/bltin/bltin.h Wed Jun 15 07:20:22 2011 (r223106)
@@ -43,6 +43,7 @@
#include "../mystring.h"
#ifdef SHELL
#include "../output.h"
+#include "builtins.h"
#define FILE struct output
#undef stdout
#define stdout out1
@@ -75,7 +76,4 @@ pointer stalloc(int);
void error(const char *, ...) __printf0like(1, 2);
pid_t getjobpgrp(char *);
-int echocmd(int, char **);
-int testcmd(int, char **);
-
extern char *commandname;
Modified: projects/largeSMP/bin/sh/cd.c
==============================================================================
--- projects/largeSMP/bin/sh/cd.c Wed Jun 15 06:13:08 2011 (r223105)
+++ projects/largeSMP/bin/sh/cd.c Wed Jun 15 07:20:22 2011 (r223106)
@@ -63,6 +63,7 @@ __FBSDID("$FreeBSD$");
#include "mystring.h"
#include "show.h"
#include "cd.h"
+#include "builtins.h"
static int cdlogical(char *);
static int cdphysical(char *);
Modified: projects/largeSMP/bin/sh/cd.h
==============================================================================
--- projects/largeSMP/bin/sh/cd.h Wed Jun 15 06:13:08 2011 (r223105)
+++ projects/largeSMP/bin/sh/cd.h Wed Jun 15 07:20:22 2011 (r223106)
@@ -30,5 +30,3 @@
*/
void pwd_init(int);
-int cdcmd (int, char **);
-int pwdcmd(int, char **);
Modified: projects/largeSMP/bin/sh/eval.h
==============================================================================
--- projects/largeSMP/bin/sh/eval.h Wed Jun 15 06:13:08 2011 (r223105)
+++ projects/largeSMP/bin/sh/eval.h Wed Jun 15 07:20:22 2011 (r223106)
@@ -51,19 +51,10 @@ struct backcmd { /* result of evalbackc
#define EV_TESTED 02 /* exit status is checked; ignore -e flag */
#define EV_BACKCMD 04 /* command executing within back quotes */
-int evalcmd(int, char **);
void evalstring(char *, int);
union node; /* BLETCH for ansi C */
void evaltree(union node *, int);
void evalbackcmd(union node *, struct backcmd *);
-int bltincmd(int, char **);
-int breakcmd(int, char **);
-int returncmd(int, char **);
-int falsecmd(int, char **);
-int truecmd(int, char **);
-int execcmd(int, char **);
-int timescmd(int, char **);
-int commandcmd(int, char **);
/* in_function returns nonzero if we are currently evaluating a function */
#define in_function() funcnest
Modified: projects/largeSMP/bin/sh/exec.h
==============================================================================
--- projects/largeSMP/bin/sh/exec.h Wed Jun 15 06:13:08 2011 (r223105)
+++ projects/largeSMP/bin/sh/exec.h Wed Jun 15 07:20:22 2011 (r223106)
@@ -66,7 +66,6 @@ extern int exerrno; /* last exec error
void shellexec(char **, char **, const char *, int) __dead2;
char *padvance(const char **, const char *);
-int hashcmd(int, char **);
void find_command(const char *, struct cmdentry *, int, const char *);
int find_builtin(const char *, int *);
void hashcd(void);
@@ -75,5 +74,4 @@ void addcmdentry(const char *, struct cm
void defun(const char *, union node *);
int unsetfunc(const char *);
int typecmd_impl(int, char **, int, const char *);
-int typecmd(int, char **);
void clearcmdentry(void);
Modified: projects/largeSMP/bin/sh/expand.c
==============================================================================
--- projects/largeSMP/bin/sh/expand.c Wed Jun 15 06:13:08 2011 (r223105)
+++ projects/largeSMP/bin/sh/expand.c Wed Jun 15 07:20:22 2011 (r223106)
@@ -76,6 +76,7 @@ __FBSDID("$FreeBSD$");
#include "mystring.h"
#include "arith.h"
#include "show.h"
+#include "builtins.h"
/*
* Structure specifying which parts of the string should be searched
Modified: projects/largeSMP/bin/sh/expand.h
==============================================================================
--- projects/largeSMP/bin/sh/expand.h Wed Jun 15 06:13:08 2011 (r223105)
+++ projects/largeSMP/bin/sh/expand.h Wed Jun 15 07:20:22 2011 (r223106)
@@ -63,4 +63,3 @@ void expari(int);
int patmatch(const char *, const char *, int);
void rmescapes(char *);
int casematch(union node *, const char *);
-int wordexpcmd(int, char **);
Modified: projects/largeSMP/bin/sh/histedit.c
==============================================================================
--- projects/largeSMP/bin/sh/histedit.c Wed Jun 15 06:13:08 2011 (r223105)
+++ projects/largeSMP/bin/sh/histedit.c Wed Jun 15 07:20:22 2011 (r223106)
@@ -59,6 +59,7 @@ __FBSDID("$FreeBSD$");
#include "error.h"
#include "eval.h"
#include "memalloc.h"
+#include "builtins.h"
#define MAXHISTLOOPS 4 /* max recursions through fc */
#define DEFEDITOR "ed" /* default editor *should* be $EDITOR */
Modified: projects/largeSMP/bin/sh/jobs.c
==============================================================================
--- projects/largeSMP/bin/sh/jobs.c Wed Jun 15 06:13:08 2011 (r223105)
+++ projects/largeSMP/bin/sh/jobs.c Wed Jun 15 07:20:22 2011 (r223106)
@@ -71,6 +71,7 @@ __FBSDID("$FreeBSD$");
#include "error.h"
#include "mystring.h"
#include "var.h"
+#include "builtins.h"
static struct job *jobtab; /* array of jobs */
Modified: projects/largeSMP/bin/sh/jobs.h
==============================================================================
--- projects/largeSMP/bin/sh/jobs.h Wed Jun 15 06:13:08 2011 (r223105)
+++ projects/largeSMP/bin/sh/jobs.h Wed Jun 15 07:20:22 2011 (r223106)
@@ -88,12 +88,7 @@ extern int in_dowait; /* are we in dowa
extern volatile sig_atomic_t breakwaitcmd; /* break wait to process traps? */
void setjobctl(int);
-int fgcmd(int, char **);
-int bgcmd(int, char **);
-int jobscmd(int, char **);
void showjobs(int, int);
-int waitcmd(int, char **);
-int jobidcmd(int, char **);
struct job *makejob(union node *, int);
pid_t forkshell(struct job *, union node *, int);
int waitforjob(struct job *, int *);
Modified: projects/largeSMP/bin/sh/main.c
==============================================================================
--- projects/largeSMP/bin/sh/main.c Wed Jun 15 06:13:08 2011 (r223105)
+++ projects/largeSMP/bin/sh/main.c Wed Jun 15 07:20:22 2011 (r223106)
@@ -72,6 +72,7 @@ __FBSDID("$FreeBSD$");
#include "mystring.h"
#include "exec.h"
#include "cd.h"
+#include "builtins.h"
int rootpid;
int rootshell;
Modified: projects/largeSMP/bin/sh/main.h
==============================================================================
--- projects/largeSMP/bin/sh/main.h Wed Jun 15 06:13:08 2011 (r223105)
+++ projects/largeSMP/bin/sh/main.h Wed Jun 15 07:20:22 2011 (r223106)
@@ -39,5 +39,3 @@ extern struct jmploc main_handler; /* to
void readcmdfile(const char *);
void cmdloop(int);
-int dotcmd(int, char **);
-int exitcmd(int, char **);
Modified: projects/largeSMP/bin/sh/mkbuiltins
==============================================================================
--- projects/largeSMP/bin/sh/mkbuiltins Wed Jun 15 06:13:08 2011 (r223105)
+++ projects/largeSMP/bin/sh/mkbuiltins Wed Jun 15 07:20:22 2011 (r223106)
@@ -58,9 +58,7 @@ cat <<\!
!
awk '/^[^#]/ {if(('$havejobs' || $2 != "-j") && ('$havehist' || $2 != "-h")) \
print $0}' builtins.def | sed 's/-[hj]//' > $temp
-awk '{ printf "int %s(int, char **);\n", $1}' $temp
-echo '
-int (*const builtinfunc[])(int, char **) = {'
+echo 'int (*const builtinfunc[])(int, char **) = {'
awk '/^[^#]/ { printf "\t%s,\n", $1}' $temp
echo '};
@@ -94,5 +92,7 @@ struct builtincmd {
};
extern int (*const builtinfunc[])(int, char **);
-extern const struct builtincmd builtincmd[];'
+extern const struct builtincmd builtincmd[];
+'
+awk '{ printf "int %s(int, char **);\n", $1}' $temp
rm -f $temp
Modified: projects/largeSMP/bin/sh/myhistedit.h
==============================================================================
--- projects/largeSMP/bin/sh/myhistedit.h Wed Jun 15 06:13:08 2011 (r223105)
+++ projects/largeSMP/bin/sh/myhistedit.h Wed Jun 15 07:20:22 2011 (r223106)
@@ -39,8 +39,6 @@ extern int displayhist;
void histedit(void);
void sethistsize(const char *);
void setterm(const char *);
-int histcmd(int, char **);
int not_fcnumber(const char *);
int str_to_event(const char *, int);
-int bindcmd(int, char **);
Modified: projects/largeSMP/bin/sh/options.c
==============================================================================
--- projects/largeSMP/bin/sh/options.c Wed Jun 15 06:13:08 2011 (r223105)
+++ projects/largeSMP/bin/sh/options.c Wed Jun 15 07:20:22 2011 (r223106)
@@ -56,6 +56,7 @@ __FBSDID("$FreeBSD$");
#include "memalloc.h"
#include "error.h"
#include "mystring.h"
+#include "builtins.h"
#ifndef NO_HISTORY
#include "myhistedit.h"
#endif
Modified: projects/largeSMP/bin/sh/options.h
==============================================================================
--- projects/largeSMP/bin/sh/options.h Wed Jun 15 06:13:08 2011 (r223105)
+++ projects/largeSMP/bin/sh/options.h Wed Jun 15 07:20:22 2011 (r223106)
@@ -108,8 +108,5 @@ void procargs(int, char **);
void optschanged(void);
void setparam(char **);
void freeparam(struct shparam *);
-int shiftcmd(int, char **);
-int setcmd(int, char **);
-int getoptscmd(int, char **);
int nextopt(const char *);
void getoptsreset(const char *);
Modified: projects/largeSMP/bin/sh/trap.c
==============================================================================
--- projects/largeSMP/bin/sh/trap.c Wed Jun 15 06:13:08 2011 (r223105)
+++ projects/largeSMP/bin/sh/trap.c Wed Jun 15 07:20:22 2011 (r223106)
@@ -55,6 +55,7 @@ __FBSDID("$FreeBSD$");
#include "error.h"
#include "trap.h"
#include "mystring.h"
+#include "builtins.h"
#include "myhistedit.h"
Modified: projects/largeSMP/bin/sh/trap.h
==============================================================================
--- projects/largeSMP/bin/sh/trap.h Wed Jun 15 06:13:08 2011 (r223105)
+++ projects/largeSMP/bin/sh/trap.h Wed Jun 15 07:20:22 2011 (r223106)
@@ -37,7 +37,6 @@ extern int pendingsigs;
extern int in_dotrap;
extern volatile sig_atomic_t gotwinch;
-int trapcmd(int, char **);
void clear_traps(void);
int have_traps(void);
void setsignal(int);
Modified: projects/largeSMP/bin/sh/var.c
==============================================================================
--- projects/largeSMP/bin/sh/var.c Wed Jun 15 06:13:08 2011 (r223105)
+++ projects/largeSMP/bin/sh/var.c Wed Jun 15 07:20:22 2011 (r223106)
@@ -63,6 +63,7 @@ __FBSDID("$FreeBSD$");
#include "error.h"
#include "mystring.h"
#include "parser.h"
+#include "builtins.h"
#ifndef NO_HISTORY
#include "myhistedit.h"
#endif
Modified: projects/largeSMP/bin/sh/var.h
==============================================================================
--- projects/largeSMP/bin/sh/var.h Wed Jun 15 06:13:08 2011 (r223105)
+++ projects/largeSMP/bin/sh/var.h Wed Jun 15 07:20:22 2011 (r223106)
@@ -123,11 +123,7 @@ void updatecharset(void);
void initcharset(void);
char **environment(void);
int showvarscmd(int, char **);
-int exportcmd(int, char **);
-int localcmd(int, char **);
void mklocal(char *);
void poplocalvars(void);
-int setvarcmd(int, char **);
-int unsetcmd(int, char **);
int unsetvar(const char *);
int setvarsafe(const char *, const char *, int);
Modified: projects/largeSMP/contrib/gdb/gdb/ppcfbsd-tdep.c
==============================================================================
--- projects/largeSMP/contrib/gdb/gdb/ppcfbsd-tdep.c Wed Jun 15 06:13:08 2011 (r223105)
+++ projects/largeSMP/contrib/gdb/gdb/ppcfbsd-tdep.c Wed Jun 15 07:20:22 2011 (r223106)
@@ -27,7 +27,9 @@
#include "target.h"
#include "breakpoint.h"
#include "value.h"
+#include "gdb_string.h"
#include "osabi.h"
+#include "regset.h"
#include "ppc-tdep.h"
#include "ppcfbsd-tdep.h"
@@ -80,6 +82,17 @@ ppcfbsd_supply_reg (char *regs, int regn
regcache_raw_supply (current_regcache, PC_REGNUM,
regs + REG_PC_OFFSET);
}
+static void
+ppcfbsd_supply_gregset (const struct regset *regset,
+ struct regcache *regcache,
+ int regnum, void *gregs, size_t size)
+{
+ ppcfbsd_supply_reg (gregs, -1);
+}
+
+static struct regset ppcfbsd_gregset = {
+ NULL, (void*)ppcfbsd_supply_gregset
+};
void
ppcfbsd_fill_reg (char *regs, int regno)
@@ -144,6 +157,20 @@ ppcfbsd_supply_fpreg (char *fpregs, int
fpregs + FPREG_FPSCR_OFFSET);
}
+static void
+ppcfbsd_supply_fpregset (const struct regset *regset,
+ struct regcache * regcache,
+ int regnum, void *fpset, size_t size)
+{
+ ppcfbsd_supply_fpreg (fpset, -1);
+}
+
+
+static struct regset ppcfbsd_fpregset =
+{
+ NULL, (void*)ppcfbsd_supply_fpregset
+};
+
void
ppcfbsd_fill_fpreg (char *fpregs, int regno)
{
@@ -174,69 +201,285 @@ ppcfbsd_fill_fpreg (char *fpregs, int re
fpregs + FPREG_FPSCR_OFFSET);
}
-static void
-fetch_core_registers (char *core_reg_sect, unsigned core_reg_size, int which,
- CORE_ADDR ignore)
+/* Return the appropriate register set for the core section identified
+ by SECT_NAME and SECT_SIZE. */
+
+const struct regset *
+ppcfbsd_regset_from_core_section (struct gdbarch *gdbarch,
+ const char *sect_name, size_t sect_size)
{
- char *regs, *fpregs;
+ struct gdbarch_tdep *tdep = gdbarch_tdep (gdbarch);
+
+ if (strcmp (sect_name, ".reg") == 0 && sect_size >= SIZEOF_STRUCT_REG)
+ return &ppcfbsd_gregset;
+
+ if (strcmp (sect_name, ".reg2") == 0 && sect_size >= SIZEOF_STRUCT_FPREG)
+ return &ppcfbsd_fpregset;
- /* We get everything from one section. */
- if (which != 0)
- return;
+ return NULL;
+}
- regs = core_reg_sect;
- fpregs = core_reg_sect + SIZEOF_STRUCT_REG;
- /* Integer registers. */
- ppcfbsd_supply_reg (regs, -1);
+/* Macros for matching instructions. Note that, since all the
+ operands are masked off before they're or-ed into the instruction,
+ you can use -1 to make masks. */
+
+#define insn_d(opcd, rts, ra, d) \
+ ((((opcd) & 0x3f) << 26) \
+ | (((rts) & 0x1f) << 21) \
+ | (((ra) & 0x1f) << 16) \
+ | ((d) & 0xffff))
+
+#define insn_ds(opcd, rts, ra, d, xo) \
+ ((((opcd) & 0x3f) << 26) \
+ | (((rts) & 0x1f) << 21) \
+ | (((ra) & 0x1f) << 16) \
+ | ((d) & 0xfffc) \
+ | ((xo) & 0x3))
+
+#define insn_xfx(opcd, rts, spr, xo) \
+ ((((opcd) & 0x3f) << 26) \
+ | (((rts) & 0x1f) << 21) \
+ | (((spr) & 0x1f) << 16) \
+ | (((spr) & 0x3e0) << 6) \
+ | (((xo) & 0x3ff) << 1))
+
+/* Read a PPC instruction from memory. PPC instructions are always
+ big-endian, no matter what endianness the program is running in, so
+ we can't use read_memory_integer or one of its friends here. */
+static unsigned int
+read_insn (CORE_ADDR pc)
+{
+ unsigned char buf[4];
- /* Floating point registers. */
- ppcfbsd_supply_fpreg (fpregs, -1);
+ read_memory (pc, buf, 4);
+ return (buf[0] << 24) | (buf[1] << 16) | (buf[2] << 8) | buf[3];
}
-static void
-fetch_elfcore_registers (char *core_reg_sect, unsigned core_reg_size, int which,
- CORE_ADDR ignore)
+
+/* An instruction to match. */
+struct insn_pattern
{
- switch (which)
+ unsigned int mask; /* mask the insn with this... */
+ unsigned int data; /* ...and see if it matches this. */
+ int optional; /* If non-zero, this insn may be absent. */
+};
+
+/* Return non-zero if the instructions at PC match the series
+ described in PATTERN, or zero otherwise. PATTERN is an array of
+ 'struct insn_pattern' objects, terminated by an entry whose mask is
+ zero.
+
+ When the match is successful, fill INSN[i] with what PATTERN[i]
+ matched. If PATTERN[i] is optional, and the instruction wasn't
+ present, set INSN[i] to 0 (which is not a valid PPC instruction).
+ INSN should have as many elements as PATTERN. Note that, if
+ PATTERN contains optional instructions which aren't present in
+ memory, then INSN will have holes, so INSN[i] isn't necessarily the
+ i'th instruction in memory. */
+static int
+insns_match_pattern (CORE_ADDR pc,
+ struct insn_pattern *pattern,
+ unsigned int *insn)
+{
+ int i;
+
+ for (i = 0; pattern[i].mask; i++)
{
- case 0: /* Integer registers. */
- if (core_reg_size != SIZEOF_STRUCT_REG)
- warning (_("Wrong size register set in core file."));
+ insn[i] = read_insn (pc);
+ if ((insn[i] & pattern[i].mask) == pattern[i].data)
+ pc += 4;
+ else if (pattern[i].optional)
+ insn[i] = 0;
else
- ppcfbsd_supply_reg (core_reg_sect, -1);
- break;
+ return 0;
+ }
- case 2: /* Floating point registers. */
- if (core_reg_size != SIZEOF_STRUCT_FPREG)
- warning (_("Wrong size FP register set in core file."));
- else
- ppcfbsd_supply_fpreg (core_reg_sect, -1);
- break;
+ return 1;
+}
- default:
- /* Don't know what kind of register request this is; just ignore it. */
- break;
- }
+
+/* Return the 'd' field of the d-form instruction INSN, properly
+ sign-extended. */
+static CORE_ADDR
+insn_d_field (unsigned int insn)
+{
+ return ((((CORE_ADDR) insn & 0xffff) ^ 0x8000) - 0x8000);
}
-static struct core_fns ppcfbsd_core_fns =
+
+/* Return the 'ds' field of the ds-form instruction INSN, with the two
+ zero bits concatenated at the right, and properly
+ sign-extended. */
+static CORE_ADDR
+insn_ds_field (unsigned int insn)
{
- bfd_target_unknown_flavour, /* core_flavour */
- default_check_format, /* check_format */
- default_core_sniffer, /* core_sniffer */
- fetch_core_registers, /* core_read_registers */
- NULL /* next */
-};
+ return ((((CORE_ADDR) insn & 0xfffc) ^ 0x8000) - 0x8000);
+}
+
-static struct core_fns ppcfbsd_elfcore_fns =
+/* If DESC is the address of a 64-bit PowerPC FreeBSD function
+ descriptor, return the descriptor's entry point. */
+static CORE_ADDR
+ppc64_desc_entry_point (CORE_ADDR desc)
{
- bfd_target_elf_flavour, /* core_flavour */
- default_check_format, /* check_format */
- default_core_sniffer, /* core_sniffer */
- fetch_elfcore_registers, /* core_read_registers */
- NULL /* next */
-};
+ /* The first word of the descriptor is the entry point. */
+ return (CORE_ADDR) read_memory_unsigned_integer (desc, 8);
+}
+
+
+/* Pattern for the standard linkage function. These are built by
+ build_plt_stub in elf64-ppc.c, whose GLINK argument is always
+ zero. */
+static struct insn_pattern ppc64_standard_linkage[] =
+ {
+ /* addis r12, r2, <any> */
+ { insn_d (-1, -1, -1, 0), insn_d (15, 12, 2, 0), 0 },
+
+ /* std r2, 40(r1) */
+ { -1, insn_ds (62, 2, 1, 40, 0), 0 },
+
+ /* ld r11, <any>(r12) */
+ { insn_ds (-1, -1, -1, 0, -1), insn_ds (58, 11, 12, 0, 0), 0 },
+
+ /* addis r12, r12, 1 <optional> */
+ { insn_d (-1, -1, -1, -1), insn_d (15, 12, 2, 1), 1 },
+
+ /* ld r2, <any>(r12) */
+ { insn_ds (-1, -1, -1, 0, -1), insn_ds (58, 2, 12, 0, 0), 0 },
+
+ /* addis r12, r12, 1 <optional> */
+ { insn_d (-1, -1, -1, -1), insn_d (15, 12, 2, 1), 1 },
+
+ /* mtctr r11 */
+ { insn_xfx (-1, -1, -1, -1), insn_xfx (31, 11, 9, 467),
+ 0 },
+
+ /* ld r11, <any>(r12) */
+ { insn_ds (-1, -1, -1, 0, -1), insn_ds (58, 11, 12, 0, 0), 0 },
+
+ /* bctr */
+ { -1, 0x4e800420, 0 },
+
+ { 0, 0, 0 }
+ };
+#define PPC64_STANDARD_LINKAGE_LEN \
+ (sizeof (ppc64_standard_linkage) / sizeof (ppc64_standard_linkage[0]))
+
+/* When the dynamic linker is doing lazy symbol resolution, the first
+ call to a function in another object will go like this:
+
+ - The user's function calls the linkage function:
+
+ 100007c4: 4b ff fc d5 bl 10000498
+ 100007c8: e8 41 00 28 ld r2,40(r1)
+
+ - The linkage function loads the entry point (and other stuff) from
+ the function descriptor in the PLT, and jumps to it:
+
+ 10000498: 3d 82 00 00 addis r12,r2,0
+ 1000049c: f8 41 00 28 std r2,40(r1)
+ 100004a0: e9 6c 80 98 ld r11,-32616(r12)
+ 100004a4: e8 4c 80 a0 ld r2,-32608(r12)
+ 100004a8: 7d 69 03 a6 mtctr r11
+ 100004ac: e9 6c 80 a8 ld r11,-32600(r12)
+ 100004b0: 4e 80 04 20 bctr
+
+ - But since this is the first time that PLT entry has been used, it
+ sends control to its glink entry. That loads the number of the
+ PLT entry and jumps to the common glink0 code:
+
+ 10000c98: 38 00 00 00 li r0,0
+ 10000c9c: 4b ff ff dc b 10000c78
+
+ - The common glink0 code then transfers control to the dynamic
+ linker's fixup code:
+
+ 10000c78: e8 41 00 28 ld r2,40(r1)
+ 10000c7c: 3d 82 00 00 addis r12,r2,0
+ 10000c80: e9 6c 80 80 ld r11,-32640(r12)
+ 10000c84: e8 4c 80 88 ld r2,-32632(r12)
+ 10000c88: 7d 69 03 a6 mtctr r11
+ 10000c8c: e9 6c 80 90 ld r11,-32624(r12)
+ 10000c90: 4e 80 04 20 bctr
+
+ Eventually, this code will figure out how to skip all of this,
+ including the dynamic linker. At the moment, we just get through
+ the linkage function. */
+
+/* If the current thread is about to execute a series of instructions
+ at PC matching the ppc64_standard_linkage pattern, and INSN is the result
+ from that pattern match, return the code address to which the
+ standard linkage function will send them. (This doesn't deal with
+ dynamic linker lazy symbol resolution stubs.) */
+static CORE_ADDR
+ppc64_standard_linkage_target (CORE_ADDR pc, unsigned int *insn)
+{
+ struct gdbarch_tdep *tdep = gdbarch_tdep (current_gdbarch);
+
+ /* The address of the function descriptor this linkage function
+ references. */
+ CORE_ADDR desc
+ = ((CORE_ADDR) read_register (tdep->ppc_gp0_regnum + 2)
+ + (insn_d_field (insn[0]) << 16)
+ + insn_ds_field (insn[2]));
+
+ /* The first word of the descriptor is the entry point. Return that. */
+ return ppc64_desc_entry_point (desc);
+}
+
+
+/* Given that we've begun executing a call trampoline at PC, return
+ the entry point of the function the trampoline will go to. */
+static CORE_ADDR
+ppc64_skip_trampoline_code (CORE_ADDR pc)
+{
+ unsigned int ppc64_standard_linkage_insn[PPC64_STANDARD_LINKAGE_LEN];
+
+ if (insns_match_pattern (pc, ppc64_standard_linkage,
+ ppc64_standard_linkage_insn))
+ return ppc64_standard_linkage_target (pc, ppc64_standard_linkage_insn);
+ else
+ return 0;
+}
+
+
+/* Support for CONVERT_FROM_FUNC_PTR_ADDR (ARCH, ADDR, TARG) on PPC64
+ GNU/Linux and FreeBSD.
+
+ Usually a function pointer's representation is simply the address
+ of the function. On GNU/Linux on the 64-bit PowerPC however, a
+ function pointer is represented by a pointer to a TOC entry. This
+ TOC entry contains three words, the first word is the address of
+ the function, the second word is the TOC pointer (r2), and the
+ third word is the static chain value. Throughout GDB it is
+ currently assumed that a function pointer contains the address of
+ the function, which is not easy to fix. In addition, the
+ conversion of a function address to a function pointer would
+ require allocation of a TOC entry in the inferior's memory space,
+ with all its drawbacks. To be able to call C++ virtual methods in
+ the inferior (which are called via function pointers),
+ find_function_addr uses this function to get the function address
+ from a function pointer. */
+
+/* If ADDR points at what is clearly a function descriptor, transform
+ it into the address of the corresponding function. Be
+ conservative, otherwize GDB will do the transformation on any
+ random addresses such as occures when there is no symbol table. */
+
+static CORE_ADDR
+ppc64_fbsd_convert_from_func_ptr_addr (struct gdbarch *gdbarch,
+ CORE_ADDR addr,
+ struct target_ops *targ)
+{
+ struct section_table *s = target_section_by_addr (targ, addr);
+
+ /* Check if ADDR points to a function descriptor. */
+ if (s && strcmp (s->the_bfd_section->name, ".opd") == 0)
+ return get_target_memory_unsigned (targ, addr, 8);
+
+ return addr;
+}
static int
ppcfbsd_pc_in_sigtramp (CORE_ADDR pc, char *func_name)
@@ -270,27 +513,42 @@ static void
ppcfbsd_init_abi (struct gdbarch_info info,
struct gdbarch *gdbarch)
{
+ struct gdbarch_tdep *tdep = gdbarch_tdep (gdbarch);
+
+ /* FreeBSD doesn't support the 128-bit `long double' from the psABI. */
+ set_gdbarch_long_double_bit (gdbarch, 64);
+
set_gdbarch_pc_in_sigtramp (gdbarch, ppcfbsd_pc_in_sigtramp);
- /* For NetBSD, this is an on again, off again thing. Some systems
- do use the broken struct convention, and some don't. */
- set_gdbarch_return_value (gdbarch, ppcfbsd_return_value);
-#ifdef __powerpc64__
- set_solib_svr4_fetch_link_map_offsets (gdbarch,
- svr4_lp64_fetch_link_map_offsets);
-#else
- set_solib_svr4_fetch_link_map_offsets (gdbarch,
- svr4_ilp32_fetch_link_map_offsets);
-#endif
+
+ if (tdep->wordsize == 4)
+ {
+ set_gdbarch_return_value (gdbarch, ppcfbsd_return_value);
+ set_solib_svr4_fetch_link_map_offsets (gdbarch,
+ svr4_ilp32_fetch_link_map_offsets);
+ }
+
+ if (tdep->wordsize == 8)
+ {
+ set_gdbarch_convert_from_func_ptr_addr
+ (gdbarch, ppc64_fbsd_convert_from_func_ptr_addr);
+
+ set_gdbarch_skip_trampoline_code (gdbarch, ppc64_skip_trampoline_code);
+
+ set_solib_svr4_fetch_link_map_offsets (gdbarch,
+ svr4_lp64_fetch_link_map_offsets);
+ }
+
+ set_gdbarch_regset_from_core_section (gdbarch,
+ ppcfbsd_regset_from_core_section);
}
void
_initialize_ppcfbsd_tdep (void)
{
+ gdbarch_register_osabi (bfd_arch_powerpc, bfd_mach_ppc,
+ GDB_OSABI_FREEBSD_ELF, ppcfbsd_init_abi);
+ gdbarch_register_osabi (bfd_arch_powerpc, bfd_mach_ppc64,
+ GDB_OSABI_FREEBSD_ELF, ppcfbsd_init_abi);
gdbarch_register_osabi (bfd_arch_rs6000, 0, GDB_OSABI_FREEBSD_ELF,
ppcfbsd_init_abi);
- gdbarch_register_osabi (bfd_arch_powerpc, 0, GDB_OSABI_FREEBSD_ELF,
- ppcfbsd_init_abi);
-
- add_core_fns (&ppcfbsd_core_fns);
- add_core_fns (&ppcfbsd_elfcore_fns);
}
Modified: projects/largeSMP/contrib/pf/pfctl/pfctl.8
==============================================================================
--- projects/largeSMP/contrib/pf/pfctl/pfctl.8 Wed Jun 15 06:13:08 2011 (r223105)
+++ projects/largeSMP/contrib/pf/pfctl/pfctl.8 Wed Jun 15 07:20:22 2011 (r223106)
@@ -26,7 +26,7 @@
.\"
.\" $FreeBSD$
.\"
-.Dd November 20, 2002
+.Dd June 13, 2011
.Dt PFCTL 8
.Os
.Sh NAME
@@ -35,7 +35,7 @@
.Sh SYNOPSIS
.Nm pfctl
.Bk -words
-.Op Fl AdeghmNnOqRrvz
+.Op Fl AdeghmNnOPqRrvz
.Op Fl a Ar anchor
.Oo Fl D Ar macro Ns =
.Ar value Oc
@@ -350,6 +350,9 @@ without any options will enable
optimizations, and a second
.Fl o
will enable profiling.
+.It Fl P
+Do not perform service name lookup for port specific rules,
+instead display the ports numerically.
.It Fl p Ar device
Use the device file
.Ar device
@@ -670,6 +673,7 @@ Passive operating system fingerprint dat
.Xr pf.conf 5 ,
.Xr pf.os 5 ,
.Xr rc.conf 5 ,
+.Xr services 5 ,
.Xr sysctl.conf 5 ,
.Xr authpf 8 ,
.Xr ftp-proxy 8 ,
Modified: projects/largeSMP/contrib/pf/pfctl/pfctl.c
==============================================================================
--- projects/largeSMP/contrib/pf/pfctl/pfctl.c Wed Jun 15 06:13:08 2011 (r223105)
+++ projects/largeSMP/contrib/pf/pfctl/pfctl.c Wed Jun 15 07:20:22 2011 (r223106)
@@ -235,7 +235,7 @@ usage(void)
{
extern char *__progname;
- fprintf(stderr, "usage: %s [-AdeghmNnOqRrvz] ", __progname);
+ fprintf(stderr, "usage: %s [-AdeghmNnOPqRrvz] ", __progname);
fprintf(stderr, "[-a anchor] [-D macro=value] [-F modifier]\n");
fprintf(stderr, "\t[-f file] [-i interface] [-K host | network] ");
fprintf(stderr, "[-k host | network ]\n");
@@ -770,6 +770,7 @@ pfctl_show_rules(int dev, char *path, in
struct pfioc_rule pr;
u_int32_t nr, mnr, header = 0;
int rule_numbers = opts & (PF_OPT_VERBOSE2 | PF_OPT_DEBUG);
+ int numeric = opts & PF_OPT_NUMERIC;
int len = strlen(path);
int brace;
char *p;
@@ -834,7 +835,7 @@ pfctl_show_rules(int dev, char *path, in
case PFCTL_SHOW_RULES:
if (pr.rule.label[0] && (opts & PF_OPT_SHOWALL))
labels = 1;
- print_rule(&pr.rule, pr.anchor_call, rule_numbers);
+ print_rule(&pr.rule, pr.anchor_call, rule_numbers, numeric);
printf("\n");
pfctl_print_rule_counters(&pr.rule, opts);
break;
@@ -894,7 +895,7 @@ pfctl_show_rules(int dev, char *path, in
} else
p = &pr.anchor_call[0];
- print_rule(&pr.rule, p, rule_numbers);
+ print_rule(&pr.rule, p, rule_numbers, numeric);
if (brace)
printf(" {\n");
else
@@ -951,7 +952,7 @@ pfctl_show_nat(int dev, int opts, char *
dotitle = 0;
}
print_rule(&pr.rule, pr.anchor_call,
- opts & PF_OPT_VERBOSE2);
+ opts & PF_OPT_VERBOSE2, opts & PF_OPT_NUMERIC);
printf("\n");
pfctl_print_rule_counters(&pr.rule, opts);
pfctl_clear_pool(&pr.rule.rpool);
@@ -1318,7 +1319,8 @@ pfctl_load_rule(struct pfctl *pf, char *
if (pf->opts & PF_OPT_VERBOSE) {
INDENT(depth, !(pf->opts & PF_OPT_VERBOSE2));
print_rule(r, r->anchor ? r->anchor->name : "",
- pf->opts & PF_OPT_VERBOSE2);
+ pf->opts & PF_OPT_VERBOSE2,
+ pf->opts & PF_OPT_NUMERIC);
}
path[len] = '\0';
pfctl_clear_pool(&r->rpool);
@@ -1978,7 +1980,7 @@ main(int argc, char *argv[])
usage();
while ((ch = getopt(argc, argv,
- "a:AdD:eqf:F:ghi:k:K:mnNOo::p:rRs:t:T:vx:z")) != -1) {
+ "a:AdD:eqf:F:ghi:k:K:mnNOo::Pp:rRs:t:T:vx:z")) != -1) {
switch (ch) {
case 'a':
anchoropt = optarg;
@@ -2080,6 +2082,9 @@ main(int argc, char *argv[])
case 'p':
pf_device = optarg;
break;
+ case 'P':
+ opts |= PF_OPT_NUMERIC;
+ break;
case 's':
showopt = pfctl_lookup_option(optarg, showopt_list);
if (showopt == NULL) {
Modified: projects/largeSMP/contrib/pf/pfctl/pfctl_optimize.c
==============================================================================
--- projects/largeSMP/contrib/pf/pfctl/pfctl_optimize.c Wed Jun 15 06:13:08 2011 (r223105)
+++ projects/largeSMP/contrib/pf/pfctl/pfctl_optimize.c Wed Jun 15 07:20:22 2011 (r223106)
@@ -407,7 +407,7 @@ optimize_superblock(struct pfctl *pf, st
TAILQ_FOREACH(por, &block->sb_rules, por_entry) {
printf(" ");
print_rule(&por->por_rule, por->por_rule.anchor ?
- por->por_rule.anchor->name : "", 1);
+ por->por_rule.anchor->name : "", 1, 0);
}
#endif /* OPT_DEBUG */
Modified: projects/largeSMP/contrib/pf/pfctl/pfctl_parser.c
==============================================================================
--- projects/largeSMP/contrib/pf/pfctl/pfctl_parser.c Wed Jun 15 06:13:08 2011 (r223105)
+++ projects/largeSMP/contrib/pf/pfctl/pfctl_parser.c Wed Jun 15 07:20:22 2011 (r223106)
@@ -64,11 +64,11 @@ __FBSDID("$FreeBSD$");
#include "pfctl.h"
void print_op (u_int8_t, const char *, const char *);
-void print_port (u_int8_t, u_int16_t, u_int16_t, const char *);
+void print_port (u_int8_t, u_int16_t, u_int16_t, const char *, int);
void print_ugid (u_int8_t, unsigned, unsigned, const char *, unsigned);
void print_flags (u_int8_t);
void print_fromto(struct pf_rule_addr *, pf_osfp_t,
- struct pf_rule_addr *, u_int8_t, u_int8_t, int);
+ struct pf_rule_addr *, u_int8_t, u_int8_t, int, int);
int ifa_skip_if(const char *filter, struct node_host *p);
struct node_host *ifa_grouplookup(const char *, int);
@@ -320,12 +320,15 @@ print_op(u_int8_t op, const char *a1, co
}
void
-print_port(u_int8_t op, u_int16_t p1, u_int16_t p2, const char *proto)
+print_port(u_int8_t op, u_int16_t p1, u_int16_t p2, const char *proto, int numeric)
{
char a1[6], a2[6];
struct servent *s;
- s = getservbyport(p1, proto);
+ if (!numeric)
+ s = getservbyport(p1, proto);
+ else
+ s = NULL;
p1 = ntohs(p1);
p2 = ntohs(p2);
snprintf(a1, sizeof(a1), "%u", p1);
@@ -363,7 +366,7 @@ print_flags(u_int8_t f)
void
print_fromto(struct pf_rule_addr *src, pf_osfp_t osfp, struct pf_rule_addr *dst,
- sa_family_t af, u_int8_t proto, int verbose)
+ sa_family_t af, u_int8_t proto, int verbose, int numeric)
{
char buf[PF_OSFP_LEN*3];
if (src->addr.type == PF_ADDR_ADDRMASK &&
@@ -384,7 +387,8 @@ print_fromto(struct pf_rule_addr *src, p
if (src->port_op)
print_port(src->port_op, src->port[0],
src->port[1],
- proto == IPPROTO_TCP ? "tcp" : "udp");
+ proto == IPPROTO_TCP ? "tcp" : "udp",
+ numeric);
if (osfp != PF_OSFP_ANY)
printf(" os \"%s\"", pfctl_lookup_fingerprint(osfp, buf,
sizeof(buf)));
@@ -396,7 +400,8 @@ print_fromto(struct pf_rule_addr *src, p
if (dst->port_op)
print_port(dst->port_op, dst->port[0],
dst->port[1],
- proto == IPPROTO_TCP ? "tcp" : "udp");
+ proto == IPPROTO_TCP ? "tcp" : "udp",
+ numeric);
}
}
@@ -673,7 +678,7 @@ print_src_node(struct pf_src_node *sn, i
}
void
-print_rule(struct pf_rule *r, const char *anchor_call, int verbose)
+print_rule(struct pf_rule *r, const char *anchor_call, int verbose, int numeric)
*** DIFF OUTPUT TRUNCATED AT 1000 LINES ***
More information about the svn-src-projects
mailing list