svn commit: r226141 - head/usr.bin/calendar
Author: ed Date: Sat Oct 8 07:20:12 2011 New Revision: 226141 URL: http://svn.freebsd.org/changeset/base/226141 Log: Remove extraneous WARNS=7. WARNS above 6 has no use. Also, all of usr.bin is also built with WARNS=6 by default. Discussed with: edwin Modified: head/usr.bin/calendar/Makefile Modified: head/usr.bin/calendar/Makefile == --- head/usr.bin/calendar/Makefile Sat Oct 8 05:50:39 2011 (r226140) +++ head/usr.bin/calendar/Makefile Sat Oct 8 07:20:12 2011 (r226141) @@ -12,8 +12,6 @@ DE_LINKS= de_DE.ISO8859-15 FR_LINKS= fr_FR.ISO8859-15 TEXTMODE?= 444 -WARNS?=7 - beforeinstall: ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m ${TEXTMODE} \ ${.CURDIR}/calendars/calendar.* ${DESTDIR}${SHAREDIR}/calendar ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
Re: svn commit: r226122 - head/share/mk
Hi, * Stanislav Sedov , 20111008 01:43: > - ${WRKSRC} might be missing when the autotools fixup is running. > Account for this. Maybe we should simplify this a bit? Index: bsd.port.mk === --- bsd.port.mk (revision 226141) +++ bsd.port.mk (working copy) @@ -18,14 +18,14 @@ .if !defined(BEFOREPORTMK) && !defined(INOPTIONSMK) # Work around an issue where FreeBSD 10.0 is detected as FreeBSD 1.x. run-autotools-fixup: - test -d ${WRKSRC} && find ${WRKSRC} -type f \( -name config.libpath -o \ + -find ${WRKSRC} -type f \( -name config.libpath -o \ -name config.rpath -o -name configure -o -name libtool.m4 \) \ -exec sed -i '' -e 's|freebsd1\*)|freebsd1.\*)|g' \ -e 's|freebsd\[12\]\*)|freebsd[12].*)|g' \ -e 's|freebsd\[123\]\*)|freebsd[123].*)|g' \ -e 's|freebsd\[\[12\]\]\*)|freebsd[[12]].*)|g' \ -e 's|freebsd\[\[123\]\]\*)|freebsd[[123]].*)|g' \ - {} + || /usr/bin/true + {} + .ORDER: run-autotools run-autotools-fixup do-configure do-configure: run-autotools-fixup -- Ed Schouten WWW: http://80386.nl/ pgphY7Yz6uF7f.pgp Description: PGP signature
Re: svn commit: r226141 - head/usr.bin/calendar
Ed Schouten writes: > Log: > Remove extraneous WARNS=7. > > WARNS above 6 has no use. Also, all of usr.bin is also built with > WARNS=6 by default. This one goes to seven. DES -- Dag-Erling Smørgrav - d...@des.no ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r226143 - head/sys/security/mac_mls
Author: brueffer Date: Sat Oct 8 09:14:18 2011 New Revision: 226143 URL: http://svn.freebsd.org/changeset/base/226143 Log: Remove two dublicated assignments. CID: 9870 Found with: Coverity Prevent(tm) Confirmed by: rwatson MFC after:1 week Modified: head/sys/security/mac_mls/mac_mls.c Modified: head/sys/security/mac_mls/mac_mls.c == --- head/sys/security/mac_mls/mac_mls.c Sat Oct 8 09:06:43 2011 (r226142) +++ head/sys/security/mac_mls/mac_mls.c Sat Oct 8 09:14:18 2011 (r226143) @@ -1636,9 +1636,6 @@ mls_posixshm_check_open(struct ucred *cr subj = SLOT(cred->cr_label); obj = SLOT(shmlabel); - subj = SLOT(cred->cr_label); - obj = SLOT(shmlabel); - if (accmode & (VREAD | VEXEC | VSTAT_PERMS)) { if (!mls_dominate_effective(subj, obj)) return (EACCES); ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r226145 - head/usr.bin/kdump
Author: des Date: Sat Oct 8 09:57:29 2011 New Revision: 226145 URL: http://svn.freebsd.org/changeset/base/226145 Log: 1) Some of the #defines or enums for which we auto-generate naming functions may be wider than int, so use intmax_t throughout. Also add missing casts in printf() calls. 2) Clean up some of the auto-generated code to improve readability. 3) Auto-generate kdump_subr.h. Note that this requires a semi-ugly hack in the Makefile to make sure it is generated before make(1) tries to build kdump.c, or preprocess it for 'make depend'. MFC after:3 weeks Deleted: head/usr.bin/kdump/kdump_subr.h Modified: head/usr.bin/kdump/Makefile head/usr.bin/kdump/kdump.c head/usr.bin/kdump/mksubr Modified: head/usr.bin/kdump/Makefile == --- head/usr.bin/kdump/Makefile Sat Oct 8 09:15:04 2011(r226144) +++ head/usr.bin/kdump/Makefile Sat Oct 8 09:57:29 2011(r226145) @@ -9,7 +9,7 @@ SFX=32 PROG= kdump SRCS= kdump.c ioctl.c kdump_subr.c subr.c -CFLAGS+= -I${.CURDIR}/../ktrace -I${.CURDIR} -I${.CURDIR}/../.. +CFLAGS+= -I${.CURDIR}/../ktrace -I${.CURDIR} -I${.CURDIR}/../.. -I. .if ${MACHINE_ARCH} == "amd64" || ${MACHINE_ARCH} == "i386" SRCS+= linux_syscalls.c @@ -22,8 +22,17 @@ CLEANFILES= ioctl.c kdump_subr.c linux_s ioctl.c: mkioctls sh ${.CURDIR}/mkioctls ${DESTDIR}/usr/include > ${.TARGET} -kdump_subr.c: mksubr - sh ${.CURDIR}/mksubr ${DESTDIR}/usr/include > ${.TARGET} +kdump_subr.h: mksubr + sh ${.CURDIR}/mksubr ${DESTDIR}/usr/include | \ + sed -n 's/^\([a-z].*)\)$$/void \1;/p' >${.TARGET} + +kdump_subr.c: mksubr kdump_subr.h + sh ${.CURDIR}/mksubr ${DESTDIR}/usr/include >${.TARGET} + +# kdump.c includes kdump_subr.h, which is auto-generated. Add a +# manual dependency to make sure kdump_subr.h is generated before we +# try to either compile or preprocess kdump.c. +${.CURDIR}/kdump.c: kdump_subr.h linux_syscalls.c: /bin/sh ${.CURDIR}/../../sys/kern/makesyscalls.sh \ Modified: head/usr.bin/kdump/kdump.c == --- head/usr.bin/kdump/kdump.c Sat Oct 8 09:15:04 2011(r226144) +++ head/usr.bin/kdump/kdump.c Sat Oct 8 09:57:29 2011(r226145) @@ -100,7 +100,6 @@ void ktrsockaddr(struct sockaddr *); void ktrstat(struct stat *); void ktrstruct(char *, size_t); void usage(void); -void sockfamilyname(int); const char *ioctlname(u_long); int timestamp, decimal, fancy = 1, suppressdata, tail, threads, maxdata, Modified: head/usr.bin/kdump/mksubr == --- head/usr.bin/kdump/mksubr Sat Oct 8 09:15:04 2011(r226144) +++ head/usr.bin/kdump/mksubr Sat Oct 8 09:57:29 2011(r226145) @@ -69,10 +69,10 @@ auto_or_type () { cat <<_EOF_ /* AUTO */ void -$name (int arg) +$name(intmax_t arg) { - int or = 0; - printf("%#x<", arg); + int or = 0; + printf("%#jx<", (uintmax_t)arg); _EOF_ egrep "^#[[:space:]]*define[[:space:]]+"${grep}"[[:space:]]*" \ $include_dir/$file | \ @@ -80,11 +80,11 @@ _EOF_ if ($i ~ /define/) \ break; \ ++i; \ - printf "\tif(!((arg>0)^((%s)>0)))\n\t\tif_print_or(arg, %s, or);\n", $i, $i }' + printf "\tif (!((arg > 0) ^ ((%s) > 0)))\n\t\tif_print_or(arg, %s, or);\n", $i, $i }' cat <<_EOF_ printf(">"); if (or == 0) - (void)printf("%ld", (long)arg); + (void)printf("%jd", arg); } _EOF_ @@ -103,7 +103,7 @@ auto_switch_type () { cat <<_EOF_ /* AUTO */ void -$name (int arg) +$name(intmax_t arg) { switch (arg) { _EOF_ @@ -116,7 +116,7 @@ _EOF_ printf "\tcase %s:\n\t\t(void)printf(\"%s\");\n\t\tbreak;\n", $i, $i }' cat <<_EOF_ default: /* Should not reach */ - (void)printf("", (long)arg); + (void)printf("", arg); } } @@ -136,7 +136,7 @@ auto_if_type () { cat <<_EOF_ /* AUTO */ void -$name (int arg) +$name(intmax_t arg) { _EOF_ egrep "^#[[:space:]]*define[[:space:]]+"${grep}"[[:space:]]*" \ @@ -147,7 +147,7 @@ _EOF_ printf "if (arg == %s) \n\t\tprintf(\"%s\");\n", $2, $2 }' cat <<_EOF_ else /* Should not reach */ - (void)printf("", (long)arg); + (void)printf("", arg); } _EOF_ @@ -156,6 +156,7 @@ _EOF_ # C start cat <<_EOF_ +#include #include #include #include @@ -207,7 +208,7 @@ cat <<_EOF_ /* MANUAL */ extern char *signames[]; /* from kdump.c */ void -signame (int sig) +signame(int sig) { if (sig > 0 && sig < NSIG) (void)printf("SIG%s",signames[sig]); @@ -217,7 +218,7 @@ signame (int sig) /
svn commit: r226146 - head/sys/dev/bwn
Author: brueffer Date: Sat Oct 8 10:50:48 2011 New Revision: 226146 URL: http://svn.freebsd.org/changeset/base/226146 Log: Remove dead code, "error" doesn't change between this check and the previous one. CID: 3254 Found with: Coverity Prevent(tm) MFC after:1 week Modified: head/sys/dev/bwn/if_bwn.c Modified: head/sys/dev/bwn/if_bwn.c == --- head/sys/dev/bwn/if_bwn.c Sat Oct 8 09:57:29 2011(r226145) +++ head/sys/dev/bwn/if_bwn.c Sat Oct 8 10:50:48 2011(r226146) @@ -3213,8 +3213,6 @@ bwn_core_init(struct bwn_mac *mac) bwn_pio_init(mac); else bwn_dma_init(mac); - if (error) - goto fail1; bwn_wme_init(mac); bwn_spu_setdelay(mac, 1); bwn_bt_enable(mac); @@ -3230,8 +3228,6 @@ bwn_core_init(struct bwn_mac *mac) return (error); -fail1: - bwn_chip_exit(mac); fail0: siba_powerdown(sc->sc_dev); KASSERT(mac->mac_status == BWN_MAC_STATUS_UNINIT, ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r226147 - head/usr.bin/kdump
Author: des Date: Sat Oct 8 11:39:00 2011 New Revision: 226147 URL: http://svn.freebsd.org/changeset/base/226147 Log: Sort and line up. Modified: head/usr.bin/kdump/mksubr Modified: head/usr.bin/kdump/mksubr == --- head/usr.bin/kdump/mksubr Sat Oct 8 10:50:48 2011(r226146) +++ head/usr.bin/kdump/mksubr Sat Oct 8 11:39:00 2011(r226147) @@ -335,44 +335,43 @@ sockoptlevelname(int level, int decimal) _EOF_ -auto_or_type "modename" "S_[A-Z]+[[:space:]]+[0-6]{7}" "sys/stat.h" -auto_or_type "flagsname" "O_[A-Z]+[[:space:]]+0x[0-9A-Fa-f]+" "sys/fcntl.h" -auto_or_type "accessmodename" "[A-Z]_OK[[:space:]]+0?x?[0-9A-Fa-f]+" "sys/unistd.h" -auto_or_type "mmapprotname" "PROT_[A-Z]+[[:space:]]+0x[0-9A-Fa-f]+" "sys/mman.h" -auto_or_type "mmapflagsname" "MAP_[A-Z]+[[:space:]]+0x[0-9A-Fa-f]+" "sys/mman.h" -auto_or_type "wait4optname" "W[A-Z]+[[:space:]]+[0-9]+" "sys/wait.h" -auto_or_type "getfsstatflagsname" "MNT_[A-Z]+[[:space:]]+[1-9][0-9]*" "sys/mount.h" -auto_or_type "mountflagsname" "MNT_[A-Z]+[[:space:]]+0x[0-9]+" "sys/mount.h" -auto_or_type "rebootoptname" "RB_[A-Z]+[[:space:]]+0x[0-9]+" "sys/reboot.h" -auto_or_type "flockname" "LOCK_[A-Z]+[[:space:]]+0x[0-9]+" "sys/fcntl.h" -auto_or_type "thrcreateflagsname" "THR_[A-Z]+[[:space:]]+0x[0-9]+" "sys/thr.h" -auto_or_type "mlockallname" "MCL_[A-Z]+[[:space:]]+0x[0-9]+" "sys/mman.h" -auto_or_type "shmatname" "SHM_[A-Z]+[[:space:]]+[0-9]{6}+" "sys/shm.h" -auto_or_type "rforkname" "RF[A-Z]+[[:space:]]+\([0-9]+<<[0-9]+\)" "sys/unistd.h" -auto_or_type "nfssvcname" "NFSSVC_[A-Z]+[[:space:]]+0x[0-9]+" "nfsserver/nfs.h" - -auto_switch_type "whencename" "SEEK_[A-Z]+[[:space:]]+[0-9]+" "sys/unistd.h" -auto_switch_type "rlimitname" "RLIMIT_[A-Z]+[[:space:]]+[0-9]+" "sys/resource.h" -auto_switch_type "shutdownhowname" "SHUT_[A-Z]+[[:space:]]+[0-9]+" "sys/socket.h" -auto_switch_type "prioname" "PRIO_[A-Z]+[[:space:]]+[0-9]" "sys/resource.h" -auto_switch_type "madvisebehavname" "_?MADV_[A-Z]+[[:space:]]+[0-9]+" "sys/mman.h" -auto_switch_type "msyncflagsname" "MS_[A-Z]+[[:space:]]+0x[0-9]+" "sys/mman.h" -auto_switch_type "schedpolicyname" "SCHED_[A-Z]+[[:space:]]+[0-9]+" "sched.h" -auto_switch_type "kldunloadfflagsname" "LINKER_UNLOAD_[A-Z]+[[:space:]]+[0-9]+" "sys/linker.h" -auto_switch_type "extattrctlname" "EXTATTR_NAMESPACE_[A-Z]+[[:space:]]+0x[0-9]+" "sys/extattr.h" -auto_switch_type "kldsymcmdname" "KLDSYM_[A-Z]+[[:space:]]+[0-9]+" "sys/linker.h" -auto_switch_type "sendfileflagsname" "SF_[A-Z]+[[:space:]]+[0-9]+" "sys/socket.h" -auto_switch_type "acltypename" "ACL_TYPE_[A-Z4_]+[[:space:]]+0x[0-9]+" "sys/acl.h" -auto_switch_type "sigprocmaskhowname" "SIG_[A-Z]+[[:space:]]+[0-9]+" "sys/signal.h" -auto_switch_type "lio_listioname" "LIO_(NO)?WAIT[[:space:]]+[0-9]+" "aio.h" -auto_switch_type "minheritname" "INHERIT_[A-Z]+[[:space:]]+[0-9]+" "sys/mman.h" -auto_switch_type "quotactlname" "Q_[A-Z]+[[:space:]]+0x[0-9]+" "ufs/ufs/quota.h" -auto_if_type "sockdomainname" "PF_[[:alnum:]]+[[:space:]]+" "sys/socket.h" -auto_if_type "sockfamilyname" "AF_[[:alnum:]]+[[:space:]]+" "sys/socket.h" -auto_if_type "sockipprotoname" "IPPROTO_[[:alnum:]]+[[:space:]]+" "netinet/in.h" -auto_switch_type "sockoptname" "SO_[A-Z]+[[:space:]]+0x[0-9]+" "sys/socket.h" -auto_switch_type "socktypename" "SOCK_[A-Z]+[[:space:]]+[1-9]+[0-9]*" "sys/socket.h" -auto_switch_type "ptraceopname" "PT_[[:alnum:]_]+[[:space:]]+[0-9]+" "sys/ptrace.h" +auto_or_type "accessmodename" "[A-Z]_OK[[:space:]]+0?x?[0-9A-Fa-f]+" "sys/unistd.h" +auto_switch_type "acltypename" "ACL_TYPE_[A-Z4_]+[[:space:]]+0x[0-9]+" "sys/acl.h" +auto_switch_type "extattrctlname" "EXTATTR_NAMESPACE_[A-Z]+[[:space:]]+0x[0-9]+" "sys/extattr.h" +auto_or_type "flagsname" "O_[A-Z]+[[:space:]]+0x[0-9A-Fa-f]+" "sys/fcntl.h" +auto_or_type "flockname" "LOCK_[A-Z]+[[:space:]]+0x[0-9]+" "sys/fcntl.h" +auto_or_type "getfsstatflagsname" "MNT_[A-Z]+[[:space:]]+[1-9][0-9]*" "sys/mount.h" +auto_switch_type "kldsymcmdname" "KLDSYM_[A-Z]+[[:space:]]+[0-9]+" "sys/linker.h" +auto_switch_type "kldunloadfflagsname" "LINKER_UNLOAD_[A-Z]+[[:space:]]+[0-9]+" "sys/linker.h" +auto_switch_type "lio_listioname" "LIO_(NO)?WAIT[[:space:]]+[0-9]+" "aio.h" +auto_switch_type "madvisebehavname""_?MADV_[A-Z]+[[:space:]]+[0-9]+" "sys/mman.h" +auto_switch_type "minheritname""INHERIT_[A-Z]+[[:space:]]+[0-9]+" "sys/mman.h" +auto_or_type "mlockallname""MCL_[A-Z]+[[:space:]]+0x[0-9]+" "sys/mman.h" +auto_or_type "mmapflagsname" "MAP_[A-Z]+[[:space:]]+0x[0-9A-Fa-f]+" "sys/mman.h" +auto_or_type "mmapprotname""PROT_[A-Z]+[[:space:]]+0x[0-9A-Fa-f]+" "sys/mman.h" +auto_or_type "modename""S_[A-Z]+[[:space
svn commit: r226148 - head/usr.bin/kdump
Author: des Date: Sat Oct 8 11:51:48 2011 New Revision: 226148 URL: http://svn.freebsd.org/changeset/base/226148 Log: C has had swicth statements for 40 years or so. It's about time we started using them. Modified: head/usr.bin/kdump/kdump.c Modified: head/usr.bin/kdump/kdump.c == --- head/usr.bin/kdump/kdump.c Sat Oct 8 11:39:00 2011(r226147) +++ head/usr.bin/kdump/kdump.c Sat Oct 8 11:51:48 2011(r226148) @@ -499,7 +499,8 @@ ktrsyscall(struct ktr_syscall *ktr, u_in char c = '('; if (fancy && (flags == 0 || (flags & SV_ABI_MASK) == SV_ABI_FREEBSD)) { - if (ktr->ktr_code == SYS_ioctl) { + switch (ktr->ktr_code) { + case SYS_ioctl: { const char *cp; print_number(ip,narg,c); if ((cp = ioctlname(*ip)) != NULL) @@ -513,80 +514,88 @@ ktrsyscall(struct ktr_syscall *ktr, u_in c = ','; ip++; narg--; - } else if (ktr->ktr_code == SYS_ptrace) { + break; + } + case SYS_ptrace: (void)putchar('('); ptraceopname ((int)*ip); c = ','; ip++; narg--; - } else if (ktr->ktr_code == SYS_access || - ktr->ktr_code == SYS_eaccess) { + break; + case SYS_access: + case SYS_eaccess: print_number(ip,narg,c); (void)putchar(','); accessmodename ((int)*ip); ip++; narg--; - } else if (ktr->ktr_code == SYS_open) { - int flags; - int mode; + break; + case SYS_open: print_number(ip,narg,c); - flags = *ip; - mode = *++ip; (void)putchar(','); - flagsandmodename (flags, mode, decimal); - ip++; - narg-=2; - } else if (ktr->ktr_code == SYS_wait4) { + flagsandmodename(ip[0], ip[1], decimal); + ip += 2; + narg -= 2; + break; + case SYS_wait4: print_number(ip,narg,c); print_number(ip,narg,c); (void)putchar(','); wait4optname ((int)*ip); ip++; narg--; - } else if (ktr->ktr_code == SYS_chmod || - ktr->ktr_code == SYS_fchmod || - ktr->ktr_code == SYS_lchmod) { + break; + case SYS_chmod: + case SYS_fchmod: + case SYS_lchmod: print_number(ip,narg,c); (void)putchar(','); modename ((int)*ip); ip++; narg--; - } else if (ktr->ktr_code == SYS_mknod) { + break; + case SYS_mknod: print_number(ip,narg,c); (void)putchar(','); modename ((int)*ip); ip++; narg--; - } else if (ktr->ktr_code == SYS_getfsstat) { + break; + case SYS_getfsstat: print_number(ip,narg,c); print_number(ip,narg,c); (void)putchar(','); getfsstatflagsname ((int)*ip); ip++; narg--; - } else if (ktr->ktr_code == SYS_mount) { + break; + case SYS_mount: print_number(ip,narg,c); print_number(ip,
svn commit: r226149 - head/sys/dev/siba
Author: brueffer Date: Sat Oct 8 12:09:57 2011 New Revision: 226149 URL: http://svn.freebsd.org/changeset/base/226149 Log: Fix an infinite loop in siba_bwn_suspend(). CID: 3536 Found with: Coverity Prevent(tm) MFC after:1 week Modified: head/sys/dev/siba/siba_bwn.c Modified: head/sys/dev/siba/siba_bwn.c == --- head/sys/dev/siba/siba_bwn.cSat Oct 8 11:51:48 2011 (r226148) +++ head/sys/dev/siba/siba_bwn.cSat Oct 8 12:09:57 2011 (r226149) @@ -206,7 +206,7 @@ siba_bwn_suspend(device_t dev) for (i = 0 ; i < devcnt ; i++) { error = DEVICE_SUSPEND(devlistp[i]); if (error) { - for (j = 0; j < i; i++) + for (j = 0; j < i; j++) DEVICE_RESUME(devlistp[j]); return (error); } ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r226150 - head/usr.bin/kdump
Author: des Date: Sat Oct 8 12:10:16 2011 New Revision: 226150 URL: http://svn.freebsd.org/changeset/base/226150 Log: Whitespace. Modified: head/usr.bin/kdump/kdump.c Modified: head/usr.bin/kdump/kdump.c == --- head/usr.bin/kdump/kdump.c Sat Oct 8 12:09:57 2011(r226149) +++ head/usr.bin/kdump/kdump.c Sat Oct 8 12:10:16 2011(r226150) @@ -502,7 +502,7 @@ ktrsyscall(struct ktr_syscall *ktr, u_in switch (ktr->ktr_code) { case SYS_ioctl: { const char *cp; - print_number(ip,narg,c); + print_number(ip, narg, c); if ((cp = ioctlname(*ip)) != NULL) (void)printf(",%s", cp); else { @@ -518,103 +518,103 @@ ktrsyscall(struct ktr_syscall *ktr, u_in } case SYS_ptrace: (void)putchar('('); - ptraceopname ((int)*ip); + ptraceopname((int)*ip); c = ','; ip++; narg--; break; case SYS_access: case SYS_eaccess: - print_number(ip,narg,c); + print_number(ip, narg, c); (void)putchar(','); - accessmodename ((int)*ip); + accessmodename((int)*ip); ip++; narg--; break; case SYS_open: - print_number(ip,narg,c); + print_number(ip, narg, c); (void)putchar(','); flagsandmodename(ip[0], ip[1], decimal); ip += 2; narg -= 2; break; case SYS_wait4: - print_number(ip,narg,c); - print_number(ip,narg,c); + print_number(ip, narg, c); + print_number(ip, narg, c); (void)putchar(','); - wait4optname ((int)*ip); + wait4optname((int)*ip); ip++; narg--; break; case SYS_chmod: case SYS_fchmod: case SYS_lchmod: - print_number(ip,narg,c); + print_number(ip, narg, c); (void)putchar(','); - modename ((int)*ip); + modename((int)*ip); ip++; narg--; break; case SYS_mknod: - print_number(ip,narg,c); + print_number(ip, narg, c); (void)putchar(','); - modename ((int)*ip); + modename((int)*ip); ip++; narg--; break; case SYS_getfsstat: - print_number(ip,narg,c); - print_number(ip,narg,c); + print_number(ip, narg, c); + print_number(ip, narg, c); (void)putchar(','); - getfsstatflagsname ((int)*ip); + getfsstatflagsname((int)*ip); ip++; narg--; break; case SYS_mount: - print_number(ip,narg,c); - print_number(ip,narg,c); + print_number(ip, narg, c); + print_number(ip, narg, c); (void)putchar(','); - mountflagsname ((int)*ip); + mountflagsname((int)*ip); ip++; narg--; break; case SYS_unmount: - print_number(ip,narg,c); +
svn commit: r226151 - head/usr.bin/kdump
Author: des Date: Sat Oct 8 12:21:51 2011 New Revision: 226151 URL: http://svn.freebsd.org/changeset/base/226151 Log: Fix casting. Modified: head/usr.bin/kdump/kdump.c head/usr.bin/kdump/mksubr Modified: head/usr.bin/kdump/kdump.c == --- head/usr.bin/kdump/kdump.c Sat Oct 8 12:10:16 2011(r226150) +++ head/usr.bin/kdump/kdump.c Sat Oct 8 12:21:51 2011(r226151) @@ -110,15 +110,16 @@ struct ktr_header ktr_header; #define TIME_FORMAT"%b %e %T %Y" #define eqs(s1, s2)(strcmp((s1), (s2)) == 0) -#define print_number(i,n,c) do { \ - if (decimal)\ - printf("%c%ld", c, (long)*i); \ - else\ - printf("%c%#lx", c, (long)*i); \ - i++;\ - n--;\ - c = ',';\ - } while (0); +#define print_number(i,n,c)\ + do {\ + if (decimal)\ + printf("%c%jd", c, (intmax_t)*i); \ + else\ + printf("%c%#jx", c, (intmax_t)*i); \ + i++;\ + n--;\ + c = ',';\ + } while (0) #if defined(__amd64__) || defined(__i386__) @@ -507,9 +508,9 @@ ktrsyscall(struct ktr_syscall *ktr, u_in (void)printf(",%s", cp); else { if (decimal) - (void)printf(",%ld", (long)*ip); + (void)printf(",%jd", (intmax_t)*ip); else - (void)printf(",%#lx ", (long)*ip); + (void)printf(",%#jx ", (intmax_t)*ip); } c = ','; ip++; @@ -518,7 +519,7 @@ ktrsyscall(struct ktr_syscall *ktr, u_in } case SYS_ptrace: (void)putchar('('); - ptraceopname((int)*ip); + ptraceopname((intmax_t)*ip); c = ','; ip++; narg--; @@ -527,14 +528,14 @@ ktrsyscall(struct ktr_syscall *ktr, u_in case SYS_eaccess: print_number(ip, narg, c); (void)putchar(','); - accessmodename((int)*ip); + accessmodename((intmax_t)*ip); ip++; narg--; break; case SYS_open: print_number(ip, narg, c); (void)putchar(','); - flagsandmodename(ip[0], ip[1], decimal); + flagsandmodename((int)ip[0], (int)ip[1], decimal); ip += 2; narg -= 2; break; @@ -542,7 +543,7 @@ ktrsyscall(struct ktr_syscall *ktr, u_in print_number(ip, narg, c); print_number(ip, narg, c); (void)putchar(','); - wait4optname((int)*ip); + wait4optname((intmax_t)*ip); ip++; narg--; break; @@ -551,14 +552,14 @@ ktrsyscall(struct ktr_syscall *ktr, u_in case SYS_lchmod: print_number(ip, narg, c); (void)putchar(','); - modename((int)*ip); + modename((intmax_t)*ip); ip++; narg--; break; case SYS_mknod: print_number(ip, narg, c); (void)putchar(','); - modename((int)*ip); + modename((intmax_t)*ip); ip++; narg--; break; @@ -566
svn commit: r226153 - head/usr.bin/kdump
Author: des Date: Sat Oct 8 12:28:06 2011 New Revision: 226153 URL: http://svn.freebsd.org/changeset/base/226153 Log: I appreciate the logic behind using a (void) cast to indicate that the return value is intentionally ignored, but frankly, all it does is get in the way of the code. Also fix a few other incorrect casts, such as (void *)malloc(foo) and passing signed values to %x. Modified: head/usr.bin/kdump/kdump.c head/usr.bin/kdump/mksubr Modified: head/usr.bin/kdump/kdump.c == --- head/usr.bin/kdump/kdump.c Sat Oct 8 12:27:12 2011(r226152) +++ head/usr.bin/kdump/kdump.c Sat Oct 8 12:28:06 2011(r226153) @@ -165,10 +165,10 @@ main(int argc, char *argv[]) pid_t pid = 0; u_int sv_flags; - (void) setlocale(LC_CTYPE, ""); + setlocale(LC_CTYPE, ""); while ((ch = getopt(argc,argv,"f:dElm:np:AHRrsTt:")) != -1) - switch((char)ch) { + switch (ch) { case 'A': abiflag = 1; break; @@ -220,7 +220,7 @@ main(int argc, char *argv[]) if (argc > optind) usage(); - m = (void *)malloc(size = 1025); + m = malloc(size = 1025); if (m == NULL) errx(1, "%s", strerror(ENOMEM)); if (!freopen(tracefile, "r", stdin)) @@ -231,7 +231,7 @@ main(int argc, char *argv[]) if (ktr_header.ktr_type & KTR_DROP) { ktr_header.ktr_type &= ~KTR_DROP; if (!drop_logged && threads) { - (void)printf( + printf( "%6jd %6jd %-8.*s Events dropped.\n", (intmax_t)ktr_header.ktr_pid, ktr_header.ktr_tid > 0 ? @@ -239,7 +239,7 @@ main(int argc, char *argv[]) MAXCOMLEN, ktr_header.ktr_comm); drop_logged = 1; } else if (!drop_logged) { - (void)printf("%6jd %-8.*s Events dropped.\n", + printf("%6jd %-8.*s Events dropped.\n", (intmax_t)ktr_header.ktr_pid, MAXCOMLEN, ktr_header.ktr_comm); drop_logged = 1; @@ -251,7 +251,7 @@ main(int argc, char *argv[]) if ((ktrlen = ktr_header.ktr_len) < 0) errx(1, "bogus length 0x%x", ktrlen); if (ktrlen > size) { - m = (void *)realloc(m, ktrlen+1); + m = realloc(m, ktrlen+1); if (m == NULL) errx(1, "%s", strerror(ENOMEM)); size = ktrlen; @@ -307,7 +307,7 @@ main(int argc, char *argv[]) break; } if (tail) - (void)fflush(stdout); + fflush(stdout); } return 0; } @@ -318,7 +318,7 @@ fread_tail(void *buf, int size, int num) int i; while ((i = fread(buf, size, num, stdin)) == 0 && tail) { - (void)sleep(1); + sleep(1); clearerr(stdin); } return (i); @@ -442,7 +442,7 @@ dumpheader(struct ktr_header *kth) case KTR_PROCDTOR: return; default: - (void)sprintf(unknown, "UNKNOWN(%d)", kth->ktr_type); + sprintf(unknown, "UNKNOWN(%d)", kth->ktr_type); type = unknown; } @@ -455,11 +455,11 @@ dumpheader(struct ktr_header *kth) * negative tid's as 0. */ if (threads) - (void)printf("%6jd %6jd %-8.*s ", (intmax_t)kth->ktr_pid, + printf("%6jd %6jd %-8.*s ", (intmax_t)kth->ktr_pid, kth->ktr_tid > 0 ? (intmax_t)kth->ktr_tid : 0, MAXCOMLEN, kth->ktr_comm); else - (void)printf("%6jd %-8.*s ", (intmax_t)kth->ktr_pid, MAXCOMLEN, + printf("%6jd %-8.*s ", (intmax_t)kth->ktr_pid, MAXCOMLEN, kth->ktr_comm); if (timestamp) { if (timestamp == 3) { @@ -472,10 +472,10 @@ dumpheader(struct ktr_header *kth) timevalsub(&kth->ktr_time, &prevtime); prevtime = temp; } - (void)printf("%jd.%06ld ", (intmax_t)kth->ktr_time.tv_sec, + printf("%jd.%06ld ", (intmax_t)kth->ktr_time.tv_sec, kth->ktr_time.tv_usec); } - (void)printf("%s ", type); + printf("%s ", type); } #include @@ -492,9 +492,9 @@ ktrsyscall(struct ktr_syscall *ktr, u_in if ((flags != 0 && ((flags & SV_ABI_MASK) != SV_ABI_FREEBSD)) || (ktr-
svn commit: r226154 - in head/sys: conf dev/fxp dev/mii dev/usb/net dev/xl modules/fxp modules/mii modules/usb/rue modules/xl
Author: marius Date: Sat Oct 8 12:33:10 2011 New Revision: 226154 URL: http://svn.freebsd.org/changeset/base/226154 Log: - Follow the lead of dcphy(4) and pnphy(4) and move the reminder of the PHY drivers that only ever attach to a particular MAC driver, i.e. inphy(4), ruephy(4) and xlphy(4), to the directory where the respective MAC driver lives and only compile it into the kernel when the latter is also there, also removing it from miibus.ko and moving it into the module of the respective MAC driver. - While at it, rename exphy.c, which comes from NetBSD where the MAC driver it corresponds to also is named ex(4) instead of xl(4) but that in FreeBSD actually identifies itself as xlphy(4), and its function names accordingly for consistency. - Additionally while at it, fix some minor style issues like whitespace in the register headers and add multi-inclusion protection to inphyreg.h. Added: head/sys/dev/fxp/inphy.c - copied, changed from r226118, head/sys/dev/mii/inphy.c head/sys/dev/fxp/inphyreg.h - copied, changed from r226118, head/sys/dev/mii/inphyreg.h head/sys/dev/usb/net/ruephy.c - copied, changed from r226118, head/sys/dev/mii/ruephy.c head/sys/dev/usb/net/ruephyreg.h - copied, changed from r226118, head/sys/dev/mii/ruephyreg.h head/sys/dev/xl/xlphy.c - copied, changed from r226118, head/sys/dev/mii/exphy.c Deleted: head/sys/dev/mii/exphy.c head/sys/dev/mii/inphy.c head/sys/dev/mii/inphyreg.h head/sys/dev/mii/ruephy.c head/sys/dev/mii/ruephyreg.h Modified: head/sys/conf/files head/sys/modules/fxp/Makefile head/sys/modules/mii/Makefile head/sys/modules/usb/rue/Makefile head/sys/modules/xl/Makefile Modified: head/sys/conf/files == --- head/sys/conf/files Sat Oct 8 12:28:06 2011(r226153) +++ head/sys/conf/files Sat Oct 8 12:33:10 2011(r226154) @@ -1092,6 +1092,7 @@ dev/firewire/sbp_targ.c optional sbp_ta dev/flash/at45d.c optional at45d dev/flash/mx25l.c optional mx25l dev/fxp/if_fxp.c optional fxp +dev/fxp/inphy.coptional fxp dev/gem/if_gem.c optional gem dev/gem/if_gem_pci.c optional gem pci dev/gem/if_gem_sbus.c optional gem sbus @@ -1418,12 +1419,8 @@ dev/mii/bmtphy.c optional miibus | bmtp dev/mii/brgphy.c optional miibus | brgphy dev/mii/ciphy.coptional miibus | ciphy dev/mii/e1000phy.c optional miibus | e1000phy -# XXX only xl cards? -dev/mii/exphy.coptional miibus | exphy dev/mii/gentbi.c optional miibus | gentbi dev/mii/icsphy.c optional miibus | icsphy -# XXX only fxp cards? -dev/mii/inphy.coptional miibus | inphy dev/mii/ip1000phy.coptional miibus | ip1000phy dev/mii/jmphy.coptional miibus | jmphy dev/mii/lxtphy.c optional miibus | lxtphy @@ -1440,8 +1437,6 @@ dev/mii/rdcphy.c optional miibus | rdcp dev/mii/rgephy.c optional miibus | rgephy dev/mii/rlphy.coptional miibus | rlphy dev/mii/rlswitch.c optional rlswitch -# XXX rue only? -dev/mii/ruephy.c optional miibus | ruephy dev/mii/smcphy.c optional miibus | smcphy dev/mii/tdkphy.c optional miibus | tdkphy dev/mii/tlphy.coptional miibus | tlphy @@ -1924,6 +1919,7 @@ dev/usb/net/if_mos.c optional mos dev/usb/net/if_rue.c optional rue dev/usb/net/if_udav.c optional udav dev/usb/net/if_usie.c optional usie +dev/usb/net/ruephy.c optional rue dev/usb/net/usb_ethernet.c optional aue | axe | cdce | cue | kue | mos | \ rue | udav dev/usb/net/uhso.c optional uhso @@ -2062,6 +2058,7 @@ wpi.fwoptional wpifw \ dev/xe/if_xe.c optional xe dev/xe/if_xe_pccard.c optional xe pccard dev/xl/if_xl.c optional xl pci +dev/xl/xlphy.c optional xl pci fs/coda/coda_fbsd.coptional vcoda fs/coda/coda_psdev.c optional vcoda fs/coda/coda_subr.coptional vcoda Copied and modified: head/sys/dev/fxp/inphy.c (from r226118, head/sys/dev/mii/inphy.c) == --- head/sys/dev/mii/inphy.cFri Oct 7 21:23:42 2011(r226118, copy source) +++ head/sys/dev/fxp/inphy.cSat Oct 8 12:33:10 2011(r226154) @@ -49,7 +49,7 @@ __FBSDID("$FreeBSD$"); #include #include "miidevs.h" -#include +#include #include "miibus_if.h" Copied and modified: head/sys/dev/fxp/inphyreg.h (from r226118, head/sys/dev/mii/inphy
svn commit: r226155 - head/libexec/rtld-elf
Author: kib Date: Sat Oct 8 12:39:47 2011 New Revision: 226155 URL: http://svn.freebsd.org/changeset/base/226155 Log: Setting up TLS block for the main thread must be done after the relocations are processed, since tls initialization section might be itself subject for relocations. Only set up of the block is postponed, the tls block offsets are allocated before relocation processing, since TLS-related relocations may need offsets ready. Reported by: ale PR: threads/161344 Reviewed by: kan MFC after:1 week Modified: head/libexec/rtld-elf/rtld.c Modified: head/libexec/rtld-elf/rtld.c == --- head/libexec/rtld-elf/rtld.cSat Oct 8 12:33:10 2011 (r226154) +++ head/libexec/rtld-elf/rtld.cSat Oct 8 12:39:47 2011 (r226155) @@ -495,8 +495,12 @@ _rtld(Elf_Addr *sp, func_ptr_type *exit_ exit (0); } -/* setup TLS for main thread */ -dbg("initializing initial thread local storage"); +/* + * Processing tls relocations requires having the tls offsets + * initialized. Prepare offsets before starting initial + * relocation processing. + */ +dbg("initializing initial thread local storage offsets"); STAILQ_FOREACH(entry, &list_main, link) { /* * Allocate all the initial objects out of the static TLS @@ -504,7 +508,6 @@ _rtld(Elf_Addr *sp, func_ptr_type *exit_ */ allocate_tls_offset(entry->obj); } -allocate_initial_tls(obj_list); if (relocate_objects(obj_main, ld_bind_now != NULL && *ld_bind_now != '\0', &obj_rtld, NULL) == -1) @@ -519,6 +522,14 @@ _rtld(Elf_Addr *sp, func_ptr_type *exit_ exit (0); } +/* + * Setup TLS for main thread. This must be done after the + * relocations are processed, since tls initialization section + * might be the subject for relocations. + */ +dbg("initializing initial thread local storage"); +allocate_initial_tls(obj_list); + dbg("initializing key program variables"); set_program_var("__progname", argv[0] != NULL ? basename(argv[0]) : ""); set_program_var("environ", env); ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r226156 - head/libexec/rtld-elf/i386
Author: kib Date: Sat Oct 8 12:42:19 2011 New Revision: 226156 URL: http://svn.freebsd.org/changeset/base/226156 Log: Handle the R_386_TLS_TPOFF32 relocation, which is similar to R_386_TLS_TPOFF, but with negative relocation value. Found by: mpfr test suite, pointed to by ale Reviewed by: kan MFC after:1 week Modified: head/libexec/rtld-elf/i386/reloc.c Modified: head/libexec/rtld-elf/i386/reloc.c == --- head/libexec/rtld-elf/i386/reloc.c Sat Oct 8 12:39:47 2011 (r226155) +++ head/libexec/rtld-elf/i386/reloc.c Sat Oct 8 12:42:19 2011 (r226156) @@ -213,9 +213,11 @@ reloc_non_plt(Obj_Entry *obj, Obj_Entry break; case R_386_TLS_TPOFF: + case R_386_TLS_TPOFF32: { const Elf_Sym *def; const Obj_Entry *defobj; + Elf_Addr add; def = find_symdef(ELF_R_SYM(rel->r_info), obj, &defobj, false, cache, lockstate); @@ -237,8 +239,11 @@ reloc_non_plt(Obj_Entry *obj, Obj_Entry goto done; } } - - *where += (Elf_Addr) (def->st_value - defobj->tlsoffset); + add = (Elf_Addr) (def->st_value - defobj->tlsoffset); + if (ELF_R_TYPE(rel->r_info) == R_386_TLS_TPOFF) + *where += add; + else + *where -= add; } break; ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r226157 - head/usr.bin/kdump
Author: des Date: Sat Oct 8 12:47:00 2011 New Revision: 226157 URL: http://svn.freebsd.org/changeset/base/226157 Log: Bring ioctlname() in line with all the other *name() functions, which actually print the name (or the numeric value, if they can't figure out the correct name) instead of just returning a pointer to it. Also, since ioctl numbers are not and probably never will be unique, drop support for using a switch statement instead of an if/else chain. Modified: head/usr.bin/kdump/kdump.c head/usr.bin/kdump/mkioctls Modified: head/usr.bin/kdump/kdump.c == --- head/usr.bin/kdump/kdump.c Sat Oct 8 12:42:19 2011(r226156) +++ head/usr.bin/kdump/kdump.c Sat Oct 8 12:47:00 2011(r226157) @@ -100,7 +100,7 @@ void ktrsockaddr(struct sockaddr *); void ktrstat(struct stat *); void ktrstruct(char *, size_t); void usage(void); -const char *ioctlname(u_long); +void ioctlname(unsigned long, int); int timestamp, decimal, fancy = 1, suppressdata, tail, threads, maxdata, resolv = 0, abiflag = 0; @@ -504,14 +504,8 @@ ktrsyscall(struct ktr_syscall *ktr, u_in case SYS_ioctl: { const char *cp; print_number(ip, narg, c); - if ((cp = ioctlname(*ip)) != NULL) - printf(",%s", cp); - else { - if (decimal) - printf(",%jd", (intmax_t)*ip); - else - printf(",%#jx ", (intmax_t)*ip); - } + putchar(c); + ioctlname(*ip, decimal); c = ','; ip++; narg--; Modified: head/usr.bin/kdump/mkioctls == --- head/usr.bin/kdump/mkioctls Sat Oct 8 12:42:19 2011(r226156) +++ head/usr.bin/kdump/mkioctls Sat Oct 8 12:47:00 2011(r226157) @@ -4,15 +4,8 @@ set -e -if [ "x$1" = "x-s" ]; then - use_switch=1 - shift -else - use_switch=0 -fi - if [ -z "$1" ]; then - echo "usage: sh $0 [-s] include-dir" + echo "usage: sh $0 include-dir" exit 1 fi @@ -30,7 +23,7 @@ ioctl_includes=` awk -v x="$ioctl_includes" 'BEGIN {print x}' | gcc -E -I$1 -dM -DCOMPAT_43TTY - | - awk -v ioctl_includes="$ioctl_includes" -v use_switch="$use_switch" ' + awk -v ioctl_includes="$ioctl_includes" ' BEGIN { print "/* XXX obnoxious prerequisites. */" print "#define COMPAT_43" @@ -55,16 +48,15 @@ BEGIN { print "#include " print "#include " print "" - print "const char *ioctlname(u_long val);" + print "void ioctlname(unsigned long val, int decimal);" print "" print ioctl_includes print "" - print "const char *" - print "ioctlname(u_long val)" + print "void" + print "ioctlname(unsigned long val, int decimal)" print "{" + print "\tconst char *str = NULL;" print "" - if (use_switch) - print "\tswitch(val) {" } /^#[ ]*define[ ]+[A-Za-z_][A-Za-z0-9_]*[ ]+_IO/ { @@ -75,16 +67,20 @@ BEGIN { break; ++i; # - if (use_switch) - printf("\tcase %s:\n\t\treturn(\"%s\");\n", $i, $i); - else - printf("\tif (val == %s)\n\t\treturn(\"%s\");\n", $i, $i); - + print("\t"); + if (n++ > 0) + print("else "); + printf("if (val == %s)\n", $i); + printf("\t\tstr = \"%s\";\n", $i); } END { - if (use_switch) - print "\t}" - print "\n\treturn(NULL);" + print "\n" + print "\tif (str != NULL)\n" + print "\t\tprintf(\"%s\", str);\n" + print "\telse if (decimal)\n" + print "\t\tprintf(\"%lu\", val);\n" + print "\telse\n" + print "\t\tprintf(\"%#lx\", val);\n" print "}" } ' ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r226158 - head/usr.bin/kdump
Author: des Date: Sat Oct 8 12:59:41 2011 New Revision: 226158 URL: http://svn.freebsd.org/changeset/base/226158 Log: Fix the dependency issue properly by a) moving kdump_subr.c to the front of the SRCS list and b) listing kdump_subr.h in DPSRCS. Modified: head/usr.bin/kdump/Makefile Modified: head/usr.bin/kdump/Makefile == --- head/usr.bin/kdump/Makefile Sat Oct 8 12:47:00 2011(r226157) +++ head/usr.bin/kdump/Makefile Sat Oct 8 12:59:41 2011(r226158) @@ -8,7 +8,8 @@ SFX=32 .PATH: ${.CURDIR}/../ktrace PROG= kdump -SRCS= kdump.c ioctl.c kdump_subr.c subr.c +SRCS= kdump_subr.c kdump.c ioctl.c subr.c +DPSRCS=kdump_subr.h CFLAGS+= -I${.CURDIR}/../ktrace -I${.CURDIR} -I${.CURDIR}/../.. -I. .if ${MACHINE_ARCH} == "amd64" || ${MACHINE_ARCH} == "i386" @@ -29,11 +30,6 @@ kdump_subr.h: mksubr kdump_subr.c: mksubr kdump_subr.h sh ${.CURDIR}/mksubr ${DESTDIR}/usr/include >${.TARGET} -# kdump.c includes kdump_subr.h, which is auto-generated. Add a -# manual dependency to make sure kdump_subr.h is generated before we -# try to either compile or preprocess kdump.c. -${.CURDIR}/kdump.c: kdump_subr.h - linux_syscalls.c: /bin/sh ${.CURDIR}/../../sys/kern/makesyscalls.sh \ ${.CURDIR}/../../sys/${MACHINE_ARCH}/linux${SFX}/syscalls.master ${.CURDIR}/linux_syscalls.conf ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r226159 - head/usr.bin/kdump
Author: des Date: Sat Oct 8 13:01:38 2011 New Revision: 226159 URL: http://svn.freebsd.org/changeset/base/226159 Log: Teach kdump(1) to decode capability bitmasks. MFC after:3 weeks Modified: head/usr.bin/kdump/kdump.c head/usr.bin/kdump/mksubr Modified: head/usr.bin/kdump/kdump.c == --- head/usr.bin/kdump/kdump.c Sat Oct 8 12:59:41 2011(r226158) +++ head/usr.bin/kdump/kdump.c Sat Oct 8 13:01:38 2011(r226159) @@ -979,6 +979,13 @@ ktrsyscall(struct ktr_syscall *ktr, u_in ip++; narg--; break; +case SYS_cap_new: +print_number(ip, narg, c); +putchar(','); +capname((intmax_t)*ip); +ip++; +narg--; + break; } } while (narg > 0) { Modified: head/usr.bin/kdump/mksubr == --- head/usr.bin/kdump/mksubr Sat Oct 8 12:59:41 2011(r226158) +++ head/usr.bin/kdump/mksubr Sat Oct 8 13:01:38 2011(r226159) @@ -186,6 +186,7 @@ cat <<_EOF_ #include #include #include +#include #include "kdump_subr.h" @@ -337,6 +338,7 @@ _EOF_ auto_or_type "accessmodename" "[A-Z]_OK[[:space:]]+0?x?[0-9A-Fa-f]+" "sys/unistd.h" auto_switch_type "acltypename" "ACL_TYPE_[A-Z4_]+[[:space:]]+0x[0-9]+" "sys/acl.h" +auto_or_type "capname" "CAP_[A-Z]+[[:space:]]+0x[01248]{16}ULL" "sys/capability.h" auto_switch_type "extattrctlname" "EXTATTR_NAMESPACE_[A-Z]+[[:space:]]+0x[0-9]+" "sys/extattr.h" auto_or_type "flagsname" "O_[A-Z]+[[:space:]]+0x[0-9A-Fa-f]+" "sys/fcntl.h" auto_or_type "flockname" "LOCK_[A-Z]+[[:space:]]+0x[0-9]+" "sys/fcntl.h" ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
Re: svn commit: r226089 - in head: share/man/man7 sys/kern
On Fri, Oct 07, 2011 at 02:14:08PM +0300, Andriy Gapon wrote: > > Log: > > Disallow various debug.kdb sysctl's when securelevel is raised. .. > Maybe the same would also be a good idea for sysctls defined at the top of > sys/kern/kern_shutdown.c? Thanks for pointing those out. I'll take a look. -- -- David (obr...@freebsd.org) ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r226160 - head/usr.sbin/bsdinstall/partedit
Author: nwhitehorn Date: Sat Oct 8 14:59:12 2011 New Revision: 226160 URL: http://svn.freebsd.org/changeset/base/226160 Log: Usability enhancements: do not allow setting a mountpoint on bsdlabel container partitions, which didn't do anything anyway, and check for an existing freebsd-boot partition before bothering the user to make one. PR: bin/160931 MFC after:3 days Modified: head/usr.sbin/bsdinstall/partedit/gpart_ops.c Modified: head/usr.sbin/bsdinstall/partedit/gpart_ops.c == --- head/usr.sbin/bsdinstall/partedit/gpart_ops.c Sat Oct 8 13:01:38 2011(r226159) +++ head/usr.sbin/bsdinstall/partedit/gpart_ops.c Sat Oct 8 14:59:12 2011(r226160) @@ -892,6 +892,19 @@ addpartform: goto addpartform; } + /* +* Error if this scheme needs nested partitions, this is one, and +* a mountpoint was set. +*/ + if (strcmp(items[0].text, "freebsd") == 0 && + strlen(items[2].text) > 0) { + dialog_msgbox("Error", "Partitions of type \"freebsd\" are " + "nested BSD-type partition schemes and cannot have " + "mountpoints. After creating one, select it and press " + "Create again to add the actual file systems.", 0, 0, TRUE); + goto addpartform; + } + /* If this is the root partition, check that this scheme is bootable */ if (strcmp(items[2].text, "/") == 0 && !is_scheme_bootable(scheme)) { char message[512]; @@ -909,7 +922,23 @@ addpartform: * If this is the root partition, and we need a boot partition, ask * the user to add one. */ - if (strcmp(items[2].text, "/") == 0 && bootpart_size(scheme) > 0) { + + /* Check for existing freebsd-boot partition */ + LIST_FOREACH(pp, &geom->lg_provider, lg_provider) { + struct partition_metadata *md; + md = get_part_metadata(pp->lg_name, 0); + if (md == NULL || !md->bootcode) + continue; + LIST_FOREACH(gc, &pp->lg_config, lg_config) + if (strcmp(gc->lg_name, "type") == 0) + break; + if (gc != NULL && strcmp(gc->lg_val, "freebsd-boot") == 0) + break; + } + + /* If there isn't one, and we need one, ask */ + if (strcmp(items[2].text, "/") == 0 && bootpart_size(scheme) > 0 && + pp == NULL) { if (interactive) choice = dialog_yesno("Boot Partition", "This partition scheme requires a boot partition " ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
Re: svn commit: r226090 - head/sys/sys
On Fri, Oct 07, 2011 at 02:14:46PM +0300, Andriy Gapon wrote: > > Increase MSGBUF_SIZE. > > The previous size lead to truncated /var/run/dmesg.boot when booted with > > "-v". ... > Heck, I am going to five! :-) Do you know of a machine that needs "* 5"? I went with the miniumum increase that gave a full /var/run/dmesg.boog on a particlar machine. But I know this machine more probably isn't the one that produces the largest output during boot. Bump it higher than "* 3"? -- -- David (obr...@freebsd.org) ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
Re: svn commit: r226122 - head/share/mk
On Oct 8, 2011, at 12:33 AM, Ed Schouten wrote: > Hi, > > * Stanislav Sedov , 20111008 01:43: >> - ${WRKSRC} might be missing when the autotools fixup is running. >>Account for this. > > Maybe we should simplify this a bit? Sounds good! I didn't think about that way of ignoring the error code. -- ST4096-RIPE ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
Re: svn commit: r226122 - head/share/mk
On Sat, Oct 08, 2011 at 08:02:43AM -0700, Stanislav Sedov wrote: > On Oct 8, 2011, at 12:33 AM, Ed Schouten wrote: > > > Hi, > > > > * Stanislav Sedov , 20111008 01:43: > >> - ${WRKSRC} might be missing when the autotools fixup is running. > >>Account for this. > > > > Maybe we should simplify this a bit? > > Sounds good! > I didn't think about that way of ignoring the error code. Can you, please, also add a check for uname -r being indeed 10.0-CURRENT, before applying the hack ? Also, the hack does not fix perl, I have to use the following patch. diff --git a/hints/freebsd.sh b/hints/freebsd.sh index c661fe8..caf93eb 100644 --- a/hints/freebsd.sh +++ b/hints/freebsd.sh @@ -110,11 +110,11 @@ esac case "$osvers" in 0.*|1.0*) ;; -1*|2*) cccdlflags='-DPIC -fpic' +1.*|2.*) cccdlflags='-DPIC -fpic' lddlflags="-Bshareable $lddlflags" ;; -3*|4*|5*|6*) +3.*|4.*|5.*|6.*) objformat=`/usr/bin/objformat` if [ x$objformat = xaout ]; then if [ -e /usr/lib/aout ]; then @@ -140,7 +140,7 @@ case "$osvers" in esac case "$osvers" in -0*|1*|2*|3*) ;; +0*|1.*|2.*|3.*) ;; *) ccflags="${ccflags} -DHAS_FPSETMASK -DHAS_FLOATINGPOINT_H" @@ -261,7 +261,7 @@ EOM esac case "$osvers" in -[1-4]*) +[1-4].*) set `echo X "$libswanted "| sed -e 's/ c / c_r /'` shift libswanted="$*" pgpLfIpHOo715.pgp Description: PGP signature
Re: svn commit: r226153 - head/usr.bin/kdump
On Sat, 8 Oct 2011, Dag-Erling Smorgrav wrote: Log: I appreciate the logic behind using a (void) cast to indicate that the return value is intentionally ignored, but frankly, all it does is get in the way of the code. It would be more useful if used precisely when ignoring the return value is correct (and unusual -- never use it for printf()). For example, when printf() is voided, there must be an fflush() and error checking of that at least once in the program (much more often for interactive programs), but most programs that void printf() don't bother with that. kdump was one. It has a single fflush() at the end of main() (which is a reasonable place to put it for simple programs), but only for the -l case, and with null error checking: Modified: head/usr.bin/kdump/kdump.c == --- head/usr.bin/kdump/kdump.c Sat Oct 8 12:27:12 2011(r226152) +++ head/usr.bin/kdump/kdump.c Sat Oct 8 12:28:06 2011(r226153) @@ -307,7 +307,7 @@ main(int argc, char *argv[]) break; } if (tail) - (void)fflush(stdout); + fflush(stdout); } return 0; } Voiding the result of fflush() is just a bug, unless there is an ferror() check, which there isn't. Now this code correctly doesn't claim that ignoring the result is correct. Bruce ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r226161 - head/usr.sbin/bsdinstall/partedit
Author: nwhitehorn Date: Sat Oct 8 16:45:03 2011 New Revision: 226161 URL: http://svn.freebsd.org/changeset/base/226161 Log: Avoid magicking into existence sub-partitions due to leftover blocks when creating new ones by destroying any geom that may have come into existence immediately after adding a partition. The EBR partition scheme is particularly enthusiastic about false positives in this case. MFC after:3 days Modified: head/usr.sbin/bsdinstall/partedit/gpart_ops.c Modified: head/usr.sbin/bsdinstall/partedit/gpart_ops.c == --- head/usr.sbin/bsdinstall/partedit/gpart_ops.c Sat Oct 8 14:59:12 2011(r226160) +++ head/usr.sbin/bsdinstall/partedit/gpart_ops.c Sat Oct 8 16:45:03 2011(r226161) @@ -730,7 +730,7 @@ gpart_create(struct gprovider *pp, char struct gconsumer *cp; struct ggeom *geom; const char *errstr, *scheme; - char sizestr[32], startstr[32], output[64]; + char sizestr[32], startstr[32], output[64], *newpartname; char newfs[64], options_fstype[64]; intmax_t maxsize, size, sector, firstfree, stripe; uint64_t bytes; @@ -990,29 +990,43 @@ addpartform: if (items[3].text[0] != '\0') gctl_ro_param(r, "label", -1, items[3].text); gctl_rw_param(r, "output", sizeof(output), output); - errstr = gctl_issue(r); if (errstr != NULL && errstr[0] != '\0') { gpart_show_error("Error", NULL, errstr); gctl_free(r); goto addpartform; } + newpartname = strtok(output, " "); + gctl_free(r); + + /* +* Try to destroy any geom that gpart picked up already here from +* dirty blocks. +*/ + r = gctl_get_handle(); + gctl_ro_param(r, "class", -1, "PART"); + gctl_ro_param(r, "arg0", -1, newpartname); + gctl_ro_param(r, "flags", -1, GPART_FLAGS); + junk = 1; + gctl_ro_param(r, "force", sizeof(junk), &junk); + gctl_ro_param(r, "verb", -1, "destroy"); + gctl_issue(r); /* Error usually expected and non-fatal */ + gctl_free(r); if (strcmp(items[0].text, "freebsd-boot") == 0) - get_part_metadata(strtok(output, " "), 1)->bootcode = 1; + get_part_metadata(newpartname, 1)->bootcode = 1; else if (strcmp(items[0].text, "freebsd") == 0) - gpart_partition(strtok(output, " "), "BSD"); + gpart_partition(newpartname, "BSD"); else - set_default_part_metadata(strtok(output, " "), scheme, + set_default_part_metadata(newpartname, scheme, items[0].text, items[2].text, newfs); for (i = 0; i < (sizeof(items) / sizeof(items[0])); i++) if (items[i].text_free) free(items[i].text); - gctl_free(r); if (partname != NULL) - *partname = strdup(strtok(output, " ")); + *partname = strdup(newpartname); } void @@ -1097,7 +,6 @@ gpart_revert_all(struct gmesh *mesh) struct gconfig *gc; struct ggeom *gp; struct gctl_req *r; - const char *errstr; const char *modified; LIST_FOREACH(classp, &mesh->lg_class, lg_class) { @@ -1128,9 +1141,7 @@ gpart_revert_all(struct gmesh *mesh) gctl_ro_param(r, "arg0", -1, gp->lg_name); gctl_ro_param(r, "verb", -1, "undo"); - errstr = gctl_issue(r); - if (errstr != NULL && errstr[0] != '\0') - gpart_show_error("Error", NULL, errstr); + gctl_issue(r); gctl_free(r); } } ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
Re: svn commit: r226122 - head/share/mk
On Saturday 08 October 2011 17:23:20 Kostik Belousov wrote: > Also, the hack does not fix perl, I have to use the following patch. let's apply this to perl? -- Alberto Villa, FreeBSD committer http://people.FreeBSD.org/~avilla If you think the problem is bad now, just wait until we've solved it. -- Arthur Kasspe signature.asc Description: This is a digitally signed message part.
svn commit: r226162 - head/share/mk
Author: crees (ports committer) Date: Sat Oct 8 18:25:01 2011 New Revision: 226162 URL: http://svn.freebsd.org/changeset/base/226162 Log: Revert unapproved commit to bsd.port.mk. This would have had more discussion, but it was explicitly rejected at submission by portmgr: http://lists.freebsd.org/pipermail/freebsd-ports/2011-September/070591.html Modified: head/share/mk/bsd.port.mk Modified: head/share/mk/bsd.port.mk == --- head/share/mk/bsd.port.mk Sat Oct 8 16:45:03 2011(r226161) +++ head/share/mk/bsd.port.mk Sat Oct 8 18:25:01 2011(r226162) @@ -14,19 +14,3 @@ _WITHOUT_SRCCONF= .include .include "${BSDPORTMK}" - -.if !defined(BEFOREPORTMK) && !defined(INOPTIONSMK) -# Work around an issue where FreeBSD 10.0 is detected as FreeBSD 1.x. -run-autotools-fixup: - test -d ${WRKSRC} && find ${WRKSRC} -type f \( -name config.libpath -o \ - -name config.rpath -o -name configure -o -name libtool.m4 \) \ - -exec sed -i '' -e 's|freebsd1\*)|freebsd1.\*)|g' \ - -e 's|freebsd\[12\]\*)|freebsd[12].*)|g' \ - -e 's|freebsd\[123\]\*)|freebsd[123].*)|g' \ - -e 's|freebsd\[\[12\]\]\*)|freebsd[[12]].*)|g' \ - -e 's|freebsd\[\[123\]\]\*)|freebsd[[123]].*)|g' \ - {} + || /usr/bin/true - -.ORDER: run-autotools run-autotools-fixup do-configure -do-configure: run-autotools-fixup -.endif ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r226163 - head/sys/kern
Author: alc Date: Sat Oct 8 18:29:30 2011 New Revision: 226163 URL: http://svn.freebsd.org/changeset/base/226163 Log: Fix the handling of an empty kmem map by sysctl_kmem_map_free(). In the unlikely event that sysctl_kmem_map_free() was performed on an empty kmem map, it would incorrectly report the free space as zero. Discussed with: avg MFC after:1 week Modified: head/sys/kern/kern_malloc.c Modified: head/sys/kern/kern_malloc.c == --- head/sys/kern/kern_malloc.c Sat Oct 8 18:25:01 2011(r226162) +++ head/sys/kern/kern_malloc.c Sat Oct 8 18:29:30 2011(r226163) @@ -265,8 +265,8 @@ sysctl_kmem_map_free(SYSCTL_HANDLER_ARGS u_long size; vm_map_lock_read(kmem_map); - size = kmem_map->root != NULL ? - kmem_map->root->max_free : kmem_map->size; + size = kmem_map->root != NULL ? kmem_map->root->max_free : + kmem_map->max_offset - kmem_map->min_offset; vm_map_unlock_read(kmem_map); return (sysctl_handle_long(oidp, &size, 0, req)); } ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
Re: svn commit: r226122 - head/share/mk
On 10/08/2011 08:23, Kostik Belousov wrote: > On Sat, Oct 08, 2011 at 08:02:43AM -0700, Stanislav Sedov wrote: >> On Oct 8, 2011, at 12:33 AM, Ed Schouten wrote: >> >>> Hi, >>> >>> * Stanislav Sedov , 20111008 01:43: >>>> - ${WRKSRC} might be missing when the autotools fixup is running. >>>>Account for this. >>> >>> Maybe we should simplify this a bit? >> >> Sounds good! >> I didn't think about that way of ignoring the error code. > > Can you, please, also add a check for uname -r being indeed 10.0-CURRENT, > before applying the hack ? The change is only in HEAD, why would that be necessary? > Also, the hack does not fix perl, I have to use the following patch. That's useful, thanks! -- Nothin' ever doesn't change, but nothin' changes much. -- OK Go Breadth of IT experience, and depth of knowledge in the DNS. Yours for the right price. :) http://SupersetSolutions.com/ ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
Re: svn commit: r226122 - head/share/mk
On Sat, Oct 08, 2011 at 12:25:16PM -0700, Doug Barton wrote: > On 10/08/2011 08:23, Kostik Belousov wrote: > > On Sat, Oct 08, 2011 at 08:02:43AM -0700, Stanislav Sedov wrote: > >> On Oct 8, 2011, at 12:33 AM, Ed Schouten wrote: > >> > >>> Hi, > >>> > >>> * Stanislav Sedov , 20111008 01:43: > >>>> - ${WRKSRC} might be missing when the autotools fixup is running. > >>>>Account for this. > >>> > >>> Maybe we should simplify this a bit? > >> > >> Sounds good! > >> I didn't think about that way of ignoring the error code. > > > > Can you, please, also add a check for uname -r being indeed 10.0-CURRENT, > > before applying the hack ? > > The change is only in HEAD, why would that be necessary? UNAME_r is better, i.e. the hack broke some port for me (I do not remember which, right now). Anyway, it is reverted. pgpVy0wwI6ejx.pgp Description: PGP signature
Re: svn commit: r226162 - head/share/mk
On 10/08/2011 11:25, Chris Rees wrote: > Author: crees (ports committer) > Date: Sat Oct 8 18:25:01 2011 > New Revision: 226162 > URL: http://svn.freebsd.org/changeset/base/226162 > > Log: > Revert unapproved commit to bsd.port.mk. This is completely unacceptable. We don't do "commit wars" in FreeBSD. IF it's accurate that portmgr has custody on this file (as opposed to ports/Mk/bsd.port.mk where they unquestionably do), and IF portmgr had a problem with this commit, it's up to them to deal with it. The fact that you don't think it's a good idea (for whatever reason) frankly isn't relevant. > This would have had more discussion, but it was explicitly rejected at > submission by portmgr: > > http://lists.freebsd.org/pipermail/freebsd-ports/2011-September/070591.html I read that message as rejecting the idea of applying it to ports/Mk/bsd.port.mk, and I think Jilles and Ed applied a very creative solution to keeping things moving on HEAD without impacting the ports tree itself. Doug > Modified: > head/share/mk/bsd.port.mk > > Modified: head/share/mk/bsd.port.mk > == > --- head/share/mk/bsd.port.mk Sat Oct 8 16:45:03 2011(r226161) > +++ head/share/mk/bsd.port.mk Sat Oct 8 18:25:01 2011(r226162) > @@ -14,19 +14,3 @@ _WITHOUT_SRCCONF= > > .include > .include "${BSDPORTMK}" > - > -.if !defined(BEFOREPORTMK) && !defined(INOPTIONSMK) > -# Work around an issue where FreeBSD 10.0 is detected as FreeBSD 1.x. > -run-autotools-fixup: > - test -d ${WRKSRC} && find ${WRKSRC} -type f \( -name config.libpath -o \ > - -name config.rpath -o -name configure -o -name libtool.m4 \) \ > - -exec sed -i '' -e 's|freebsd1\*)|freebsd1.\*)|g' \ > - -e 's|freebsd\[12\]\*)|freebsd[12].*)|g' \ > - -e 's|freebsd\[123\]\*)|freebsd[123].*)|g' \ > - -e 's|freebsd\[\[12\]\]\*)|freebsd[[12]].*)|g' \ > - -e 's|freebsd\[\[123\]\]\*)|freebsd[[123]].*)|g' \ > - {} + || /usr/bin/true > - > -.ORDER: run-autotools run-autotools-fixup do-configure > -do-configure: run-autotools-fixup > -.endif > -- Nothin' ever doesn't change, but nothin' changes much. -- OK Go Breadth of IT experience, and depth of knowledge in the DNS. Yours for the right price. :) http://SupersetSolutions.com/ ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
Re: svn commit: r226162 - head/share/mk
On Sat, Oct 08, 2011 at 12:34:44PM -0700, Doug Barton wrote: > On 10/08/2011 11:25, Chris Rees wrote: > > Author: crees (ports committer) > > Date: Sat Oct 8 18:25:01 2011 > > New Revision: 226162 > > URL: http://svn.freebsd.org/changeset/base/226162 > > > > Log: > > Revert unapproved commit to bsd.port.mk. > > This is completely unacceptable. We don't do "commit wars" in FreeBSD. FWIW, I completely agree with Doug, which is a rare event. The original commit message included This commit should be reverted when there is a cleaner fix in autotools and/or ports/Mk/bsd.port.mk. Chris, it appears that you did not commit a cleaner fix. You also seem to have omitted the "Approved by", "Reviewed by", and/or "Discussed on" line in your commit message. -- Steve ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
Re: svn commit: r226162 - head/share/mk
On 8 Oct 2011 20:35, "Doug Barton" wrote: > > On 10/08/2011 11:25, Chris Rees wrote: > > Author: crees (ports committer) > > Date: Sat Oct 8 18:25:01 2011 > > New Revision: 226162 > > URL: http://svn.freebsd.org/changeset/base/226162 > > > > Log: > > Revert unapproved commit to bsd.port.mk. > > This is completely unacceptable. We don't do "commit wars" in FreeBSD. > IF it's accurate that portmgr has custody on this file (as opposed to > ports/Mk/bsd.port.mk where they unquestionably do), and IF portmgr had a > problem with this commit, it's up to them to deal with it. The fact that > you don't think it's a good idea (for whatever reason) frankly isn't > relevant. > > > This would have had more discussion, but it was explicitly rejected at submission by portmgr: > > > > http://lists.freebsd.org/pipermail/freebsd-ports/2011-September/070591.html > > I read that message as rejecting the idea of applying it to > ports/Mk/bsd.port.mk, and I think Jilles and Ed applied a very creative > solution to keeping things moving on HEAD without impacting the ports > tree itself. > This was subverting maintainer approval, whether inadvertent or not. It has nothing to do with whether I think it's a good idea or not, but please remember that this took place behind the back of the majority of the developers it affected, including me. Wherever the file is, and however creative the solution is, and however you read Erwin's message, the answer is clear; portmgr disapproves, please don't do it, because ports@ is where the fallout will happen. When I installed CURRENT I was surprised to find the problems impossible to reproduce, and that was because this fragment was put in an obscure place. We may not do revert wars, but I have to go through the proper process of getting stuff into bsd.port.mk, and so does everyone else. Please don't let's hold multiple conversations, feel free to bring my other email before developers@. Chris ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r226164 - head/usr.bin/kdump
Author: des Date: Sat Oct 8 21:02:08 2011 New Revision: 226164 URL: http://svn.freebsd.org/changeset/base/226164 Log: Address some of bde@'s concerns with the new code. Modified: head/usr.bin/kdump/kdump.c Modified: head/usr.bin/kdump/kdump.c == --- head/usr.bin/kdump/kdump.c Sat Oct 8 18:29:30 2011(r226163) +++ head/usr.bin/kdump/kdump.c Sat Oct 8 21:02:08 2011(r226164) @@ -110,16 +110,15 @@ struct ktr_header ktr_header; #define TIME_FORMAT"%b %e %T %Y" #define eqs(s1, s2)(strcmp((s1), (s2)) == 0) -#define print_number(i,n,c)\ - do {\ - if (decimal)\ - printf("%c%jd", c, (intmax_t)*i); \ - else\ - printf("%c%#jx", c, (intmax_t)*i); \ - i++;\ - n--;\ - c = ',';\ - } while (0) +#define print_number(i,n,c) do { \ + if (decimal)\ + printf("%c%jd", c, (intmax_t)*i); \ + else\ + printf("%c%#jx", c, (intmax_t)*i); \ + i++;\ + n--;\ + c = ',';\ +} while (0) #if defined(__amd64__) || defined(__i386__) @@ -513,7 +512,7 @@ ktrsyscall(struct ktr_syscall *ktr, u_in } case SYS_ptrace: putchar('('); - ptraceopname((intmax_t)*ip); + ptraceopname(*ip); c = ','; ip++; narg--; @@ -522,14 +521,14 @@ ktrsyscall(struct ktr_syscall *ktr, u_in case SYS_eaccess: print_number(ip, narg, c); putchar(','); - accessmodename((intmax_t)*ip); + accessmodename(*ip); ip++; narg--; break; case SYS_open: print_number(ip, narg, c); putchar(','); - flagsandmodename((int)ip[0], (int)ip[1], decimal); + flagsandmodename(ip[0], ip[1], decimal); ip += 2; narg -= 2; break; @@ -537,7 +536,7 @@ ktrsyscall(struct ktr_syscall *ktr, u_in print_number(ip, narg, c); print_number(ip, narg, c); putchar(','); - wait4optname((intmax_t)*ip); + wait4optname(*ip); ip++; narg--; break; @@ -546,14 +545,14 @@ ktrsyscall(struct ktr_syscall *ktr, u_in case SYS_lchmod: print_number(ip, narg, c); putchar(','); - modename((intmax_t)*ip); + modename(*ip); ip++; narg--; break; case SYS_mknod: print_number(ip, narg, c); putchar(','); - modename((intmax_t)*ip); + modename(*ip); ip++; narg--; break; @@ -561,7 +560,7 @@ ktrsyscall(struct ktr_syscall *ktr, u_in print_number(ip, narg, c); print_number(ip, narg, c); putchar(','); - getfsstatflagsname((intmax_t)*ip); + getfsstatflagsname(*ip); ip++; narg--; break; @@ -569,14 +568,14 @@ ktrsyscall(struct ktr_syscall *ktr, u_in print_number(ip, narg, c); print_number(ip, narg, c);
Re: svn commit: r226162 - head/share/mk
* Chris Rees , 20111008 20:25: > Revert unapproved commit to bsd.port.mk. You're very nice... :-) -- Ed Schouten WWW: http://80386.nl/ pgpFx0Q7LTiI2.pgp Description: PGP signature
svn commit: r226165 - head/sys/conf
Author: marius Date: Sat Oct 8 21:15:39 2011 New Revision: 226165 URL: http://svn.freebsd.org/changeset/base/226165 Log: Remove inphy(4), exphy(4) as well as ruephy(4) that no longer existed as a separate config option, which was missed in r226154. Modified: head/sys/conf/NOTES Modified: head/sys/conf/NOTES == --- head/sys/conf/NOTES Sat Oct 8 21:02:08 2011(r226164) +++ head/sys/conf/NOTES Sat Oct 8 21:15:39 2011(r226165) @@ -1862,10 +1862,8 @@ device bmtphy # Broadcom BCM5201/BCM5 device brgphy # Broadcom BCM54xx/57xx 1000baseTX device ciphy # Cicada/Vitesse CS/VSC8xxx device e1000phy# Marvell 88E1000 1000/100/10-BT -device exphy # 3Com internal PHY device gentbi # Generic 10-bit 1000BASE-{LX,SX} fiber ifaces device icsphy # ICS ICS1889-1893 -device inphy # Intel 82553/82555 device ip1000phy # IC Plus IP1000A/IP1001 device jmphy # JMicron JMP211/JMP202 device lxtphy # Level One LXT-970 @@ -1879,7 +1877,6 @@ devicerdcphy # RDC Semiconductor R60 device rgephy # RealTek 8169S/8110S/8211B/8211C device rlphy # RealTek 8139 device rlswitch# RealTek 8305 -device ruephy # RealTek RTL8150 device smcphy # SMSC LAN91C111 device tdkphy # TDK 89Q2120 device tlphy # Texas Instruments ThunderLAN ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
Re: svn commit: r225868 - head/bin/ps
On Sat Oct 1 11, Ed Schouten wrote: > * Alexander Best , 20110929 14:14: > > i think i wrote you about the two spaces between the "TT" and "TIME" field > > some time ago. you said that the "TT" entry can contain a postfix "-". can > > you describe a situation, where this can occur? i've never seen the "TT" > > field > > contain an entry larger than 2 chars. > > Also, it would be better if we replaced the "??" string with "-". When > we print "??", it actually means: this process has no controlling > terminal, not that we don't know which TTY it is. i've adjusted ps(1) and now the output looks like this: otaku% ps -xOtty,tdev PID TTY TDEV TT STAT TIME COMMAND 1427 -- - Is 15:02,64 /usr/local/bin/musicpd /usr/local/etc/musicpd.conf 1692 -- - Is0:00,15 ssh-agent 1740 -- - Ss0:00,69 /usr/local/bin/dbus-daemon --fork --print-pid 5 --print-address 7 --session 1744 -- - Is 10:02,33 /usr/local/bin/sakura 1746 -- - S 3:24,25 /usr/local/libexec/gam_server 45117 -- - Ss3:29,84 /usr/local/bin/pidgin 55734 -- - Is 17:03,48 /usr/local/bin/python2.7 /usr/local/bin/sonata 63888 -- - Is3:21,53 chromium-browser: (chrome) 63889 -- - I 0:05,26 chromium-browser: (chrome) 63890 -- - I 0:00,43 chrome: --type=zygote (chrome) 63891 -- - S 0:50,87 chrome: --type=zygote (chrome) 63892 -- - I 0:21,03 chrome: --type=zygote (chrome) 63893 -- - I 0:06,14 chrome: --type=zygote (chrome) 63894 -- - S 0:21,96 chrome: --type=zygote (chrome) 63904 -- - I 0:08,63 chrome: --type=zygote (chrome) 63905 -- - I 0:03,64 chrome: --type=zygote (chrome) 63907 -- - S 0:38,14 chrome: --type=zygote (chrome) 63908 -- - S 0:33,20 chrome: --type=zygote (chrome) 63909 -- - S 0:14,13 chrome: --type=zygote (chrome) 63910 -- - S 0:14,96 chrome: --type=zygote (chrome) 63911 -- - S 0:21,98 chrome: --type=zygote (chrome) 63913 -- - I 0:06,10 chrome: --type=zygote (chrome) 63914 -- - I 0:05,95 chrome: --type=zygote (chrome) 63915 -- - I 0:03,11 chrome: --type=zygote (chrome) 63916 -- - S 0:20,96 chrome: --type=zygote (chrome) 63917 -- - I 0:09,19 chrome: --type=zygote (chrome) 64191 -- - Z 0:07,58 64270 -- - I 0:31,20 chrome: --type=zygote (chrome) 64271 -- - I 0:12,39 chrome: --type=zygote (chrome) 64326 -- - I 0:08,61 chrome: --type=zygote (chrome) 64327 -- - I 0:03,11 chrome: --type=zygote (chrome) 64341 -- - I 0:05,40 chrome: --type=zygote (chrome) 64361 -- - I 0:12,72 chrome: --type=zygote (chrome) 64664 -- - Z 0:00,60 65411 -- - S 0:00,01 /usr/local/bin/pidgin 1664 ttyv0 0x2f v0 IW0:00,00 -zsh (zsh) 1712 ttyv0 0x2f v0 IW+ 0:00,00 /bin/sh /usr/local/bin/startx 1730 ttyv0 0x2f v0 IW+ 0:00,00 xinit /home/arundel/.xinitrc -- /home/arundel/.xserverrc :0 -auth /home/arundel/.serverauth.1712 1734 ttyv0 0x2f v0 IW0:00,00 sh /home/arundel/.xinitrc 1735 ttyv0 0x2f v0 S39:35,89 /usr/local/bin/awesome 1739 ttyv0 0x2f v0 I 0:00,00 dbus-launch --autolaunch 1210d605f192e5e97cd9d23a00043997 --binary-syntax --close-stderr 55738 pts/0 0x6b 0 IWs 0:00,00 /usr/local/bin/zsh 62073 pts/0 0x6b 0 I+0:02,11 ssh hub 64131 pts/5 0x6c 5 Is+ 0:00,09 /usr/local/bin/zsh 64134 pts/6 0x96 6 Is+ 0:00,50 /usr/local/bin/zsh 63523 pts/1 0x99 1 Is+ 0:00,10 /usr/local/bin/zsh 63586 pts/2 0x9a 2 Is0:00,05 /usr/local/bin/zsh 64254 pts/2 0x9a 2 I+0:00,37 ssh hub 63656 pts/3 0x9c 3 Is0:00,22 /usr/local/bin/zsh 64267 pts/3 0x9c 3 I+0:00,63 ssh freefall 64382 pts/7 0x9d 7 Ss0:00,16 /usr/local/bin/zsh 65413 pts/7 0x9d 7 R+0:00,00 ps -xOtty,tdev 64384 pts/8 0x9e 8 Is0:00,13 /usr/local/bin/zsh 64470 pts/8 0x9e 8 I 0:00,12 zsh 64642 pts/8 0x9e 8 I+0:00,09 edit machine.c 64484 pts/9 0x9f 9 Is+ 0:00,24 /usr/local/bin/zsh is this what you had in mind? cheers. alex > > -- > Ed Schouten > WWW: http://80386.nl/ ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
Re: svn commit: r225586 - in head/sys: modules/netgraph/ipfw netgraph
Alexander, Andrey, see a couple of comments below please. On Thu, Sep 15, 2011 at 12:28:17PM +, Andrey V. Elsukov wrote: A> Author: ae A> Date: Thu Sep 15 12:28:17 2011 A> New Revision: 225586 A> URL: http://svn.freebsd.org/changeset/base/225586 A> A> Log: A> Add IPv6 support to the ng_ipfw(4) [1]. Also add ifdefs to be able A> build it with and without INET/INET6 support. A> A> Submitted by: Alexander V. Chernikov [1] A> Tested by: Alexander V. Chernikov [1] A> Approved by: re (bz) A> MFC after: 2 weeks A> A> Modified: A> head/sys/modules/netgraph/ipfw/Makefile A> head/sys/netgraph/ng_ipfw.c A> A> Modified: head/sys/modules/netgraph/ipfw/Makefile A> == A> --- head/sys/modules/netgraph/ipfw/Makefile Thu Sep 15 12:27:26 2011 (r225585) A> +++ head/sys/modules/netgraph/ipfw/Makefile Thu Sep 15 12:28:17 2011 (r225586) A> @@ -1,6 +1,20 @@ A> # $FreeBSD$ A> A> +.include A> + A> KMOD= ng_ipfw A> -SRCS= ng_ipfw.c A> +SRCS= ng_ipfw.c opt_inet.h opt_inet6.h A> + A> +.if !defined(KERNBUILDDIR) A> + A> +.if ${MK_INET_SUPPORT} != "no" A> +opt_inet.h: A> +echo "#define INET 1" > ${.TARGET} A> +.endif A> +.if ${MK_INET6_SUPPORT} != "no" A> +opt_inet6.h: A> +echo "#define INET6 1" > ${.TARGET} A> +.endif A> +.endif A> A> .include A> A> Modified: head/sys/netgraph/ng_ipfw.c A> == A> --- head/sys/netgraph/ng_ipfw.c Thu Sep 15 12:27:26 2011 (r225585) A> +++ head/sys/netgraph/ng_ipfw.c Thu Sep 15 12:28:17 2011 (r225586) A> @@ -26,6 +26,9 @@ A> * $FreeBSD$ A> */ A> A> +#include "opt_inet.h" A> +#include "opt_inet6.h" A> + A> #include A> #include A> #include A> @@ -47,6 +50,8 @@ A> #include A> #include A> #include A> +#include A> +#include A> A> #include A> #include A> @@ -224,6 +229,7 @@ ng_ipfw_rcvdata(hook_p hook, item_p item A> struct m_tag *tag; A> struct ipfw_rule_ref *r; A> struct mbuf *m; A> +struct ip *ip; A> A> NGI_GET_M(item, m); A> NG_FREE_ITEM(item); A> @@ -234,23 +240,47 @@ ng_ipfw_rcvdata(hook_p hook, item_p item A> return (EINVAL);/* XXX: find smth better */ A> }; A> A> +if (m->m_len < sizeof(struct ip) && A> +(m = m_pullup(m, sizeof(struct ip))) == NULL) A> +return (EINVAL); In most cases we return ENOBUFS in case if m_pullup() failure. Lesser amount of code uses ENOMEM and EINVAL. I personally hate EINVAL, since it is usually used as one-for-all error, and thus is meaningless for user. A> +ip = mtod(m, struct ip *); A> + A> r = (struct ipfw_rule_ref *)(tag + 1); A> if (r->info & IPFW_INFO_IN) { A> -ip_input(m); A> +switch (ip->ip_v) { A> +#ifdef INET A> +case IPVERSION: A> +ip_input(m); A> +break; A> +#endif A> +#ifdef INET6 A> +case IPV6_VERSION >> 4: A> +ip6_input(m); A> +break; A> +#endif A> +default: A> +NG_FREE_M(m); A> +return (EINVAL); A> +} A> return (0); A> } else { A> -struct ip *ip; A> - A> -if (m->m_len < sizeof(struct ip) && A> -(m = m_pullup(m, sizeof(struct ip))) == NULL) A> +switch (ip->ip_v) { A> +#ifdef INET A> +case IPVERSION: A> +SET_HOST_IPLEN(ip); A> +return (ip_output(m, NULL, NULL, IP_FORWARDING, A> +NULL, NULL)); A> +#endif A> +#ifdef INET6 A> +case IPV6_VERSION >> 4: A> +return (ip6_output(m, NULL, NULL, 0, NULL, A> +NULL, NULL)); A> +#endif A> +default: A> return (EINVAL); Shouldn't you free the mbuf before returning? A> - A> -ip = mtod(m, struct ip *); A> - A> -SET_HOST_IPLEN(ip); A> - A> -return ip_output(m, NULL, NULL, IP_FORWARDING, NULL, NULL); A> -} A> +} A> +} A> } A> A> static int -- Totus tuus, Glebius. ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"