Date: Fri, 28 Jan 2011 19:51:53 GMT From: Edward Tomasz Napierala <trasz@FreeBSD.org> To: Perforce Change Reviews <perforce@freebsd.org> Subject: PERFORCE change 188279 for review Message-ID: <201101281951.p0SJprOe000480@skunkworks.freebsd.org>
next in thread | raw e-mail | index | archive | help
http://p4web.freebsd.org/@@188279?ac=10 Change 188279 by trasz@trasz_victim on 2011/01/28 19:51:33 IFC. Affected files ... .. //depot/projects/soc2009/trasz_limits/Makefile#11 integrate .. //depot/projects/soc2009/trasz_limits/bin/ps/ps.1#8 integrate .. //depot/projects/soc2009/trasz_limits/bin/sh/var.c#14 integrate .. //depot/projects/soc2009/trasz_limits/etc/periodic/daily/800.scrub-zfs#4 integrate .. //depot/projects/soc2009/trasz_limits/gnu/lib/libgcc/Makefile#12 integrate .. //depot/projects/soc2009/trasz_limits/gnu/lib/libgomp/Makefile#5 integrate .. //depot/projects/soc2009/trasz_limits/gnu/usr.bin/binutils/Makefile.inc0#7 integrate .. //depot/projects/soc2009/trasz_limits/lib/libc/Makefile#11 integrate .. //depot/projects/soc2009/trasz_limits/lib/libc/sys/Makefile.inc#10 integrate .. //depot/projects/soc2009/trasz_limits/lib/libc/sys/ptrace.2#6 integrate .. //depot/projects/soc2009/trasz_limits/lib/libelf/elf_data.c#3 integrate .. //depot/projects/soc2009/trasz_limits/lib/libkvm/kvm_powerpc64.c#2 integrate .. //depot/projects/soc2009/trasz_limits/libexec/rtld-elf/amd64/rtld_machdep.h#2 integrate .. //depot/projects/soc2009/trasz_limits/libexec/rtld-elf/arm/rtld_machdep.h#2 integrate .. //depot/projects/soc2009/trasz_limits/libexec/rtld-elf/i386/rtld_machdep.h#2 integrate .. //depot/projects/soc2009/trasz_limits/libexec/rtld-elf/ia64/rtld_machdep.h#2 integrate .. //depot/projects/soc2009/trasz_limits/libexec/rtld-elf/map_object.c#5 integrate .. //depot/projects/soc2009/trasz_limits/libexec/rtld-elf/mips/rtld_machdep.h#2 integrate .. //depot/projects/soc2009/trasz_limits/libexec/rtld-elf/powerpc/rtld_machdep.h#3 integrate .. //depot/projects/soc2009/trasz_limits/libexec/rtld-elf/powerpc64/rtld_machdep.h#2 integrate .. //depot/projects/soc2009/trasz_limits/libexec/rtld-elf/rtld.c#18 integrate .. //depot/projects/soc2009/trasz_limits/libexec/rtld-elf/sparc64/rtld_machdep.h#2 integrate .. //depot/projects/soc2009/trasz_limits/sbin/dump/itime.c#3 integrate .. //depot/projects/soc2009/trasz_limits/sbin/dump/main.c#3 integrate .. //depot/projects/soc2009/trasz_limits/sbin/dump/optr.c#3 integrate .. //depot/projects/soc2009/trasz_limits/sbin/dump/tape.c#2 integrate .. //depot/projects/soc2009/trasz_limits/sbin/fdisk/fdisk.c#7 integrate .. //depot/projects/soc2009/trasz_limits/sbin/fsck_ffs/inode.c#2 integrate .. //depot/projects/soc2009/trasz_limits/sbin/fsck_ffs/main.c#6 integrate .. //depot/projects/soc2009/trasz_limits/sbin/fsck_ffs/suj.c#4 integrate .. //depot/projects/soc2009/trasz_limits/sbin/fsdb/fsdb.c#3 integrate .. //depot/projects/soc2009/trasz_limits/sbin/fsirand/fsirand.c#3 integrate .. //depot/projects/soc2009/trasz_limits/sbin/geom/class/part/gpart.8#12 integrate .. //depot/projects/soc2009/trasz_limits/sbin/geom/class/virstor/gvirstor.8#2 integrate .. //depot/projects/soc2009/trasz_limits/sbin/hastctl/hastctl.c#3 integrate .. //depot/projects/soc2009/trasz_limits/sbin/hastd/control.c#6 integrate .. //depot/projects/soc2009/trasz_limits/sbin/hastd/control.h#4 integrate .. //depot/projects/soc2009/trasz_limits/sbin/hastd/hast.h#6 integrate .. //depot/projects/soc2009/trasz_limits/sbin/hastd/hastd.c#12 integrate .. //depot/projects/soc2009/trasz_limits/sbin/hastd/hastd.h#5 integrate .. //depot/projects/soc2009/trasz_limits/sbin/hastd/pjdlog.c#8 integrate .. //depot/projects/soc2009/trasz_limits/sbin/hastd/pjdlog.h#4 integrate .. //depot/projects/soc2009/trasz_limits/sbin/hastd/primary.c#12 integrate .. //depot/projects/soc2009/trasz_limits/sbin/iscontrol/config.c#4 integrate .. //depot/projects/soc2009/trasz_limits/sbin/iscontrol/fsm.c#3 integrate .. //depot/projects/soc2009/trasz_limits/sbin/mount/mount.8#8 integrate .. //depot/projects/soc2009/trasz_limits/sbin/newfs/mkfs.c#7 integrate .. //depot/projects/soc2009/trasz_limits/share/doc/papers/kernmalloc/Makefile#2 integrate .. //depot/projects/soc2009/trasz_limits/share/doc/papers/kernmalloc/appendix.ms#1 branch .. //depot/projects/soc2009/trasz_limits/share/doc/papers/sysperf/Makefile#2 integrate .. //depot/projects/soc2009/trasz_limits/share/doc/papers/sysperf/appendix.ms#1 branch .. //depot/projects/soc2009/trasz_limits/share/examples/etc/make.conf#6 integrate .. //depot/projects/soc2009/trasz_limits/share/man/man4/altq.4#9 integrate .. //depot/projects/soc2009/trasz_limits/share/man/man4/ixgb.4#3 integrate .. //depot/projects/soc2009/trasz_limits/share/man/man4/nfe.4#3 integrate .. //depot/projects/soc2009/trasz_limits/share/man/man4/re.4#7 integrate .. //depot/projects/soc2009/trasz_limits/share/man/man4/rgephy.4#2 integrate .. //depot/projects/soc2009/trasz_limits/share/man/man5/rc.conf.5#19 integrate .. //depot/projects/soc2009/trasz_limits/share/man/man7/build.7#6 integrate .. //depot/projects/soc2009/trasz_limits/share/man/man9/Makefile#24 integrate .. //depot/projects/soc2009/trasz_limits/share/man/man9/sbuf.9#4 integrate .. //depot/projects/soc2009/trasz_limits/sys/amd64/amd64/machdep.c#26 integrate .. //depot/projects/soc2009/trasz_limits/sys/amd64/amd64/vm_machdep.c#9 integrate .. //depot/projects/soc2009/trasz_limits/sys/amd64/linux32/linux.h#5 integrate .. //depot/projects/soc2009/trasz_limits/sys/amd64/linux32/linux32_machdep.c#7 integrate .. //depot/projects/soc2009/trasz_limits/sys/cam/ata/ata_xpt.c#14 integrate .. //depot/projects/soc2009/trasz_limits/sys/cddl/compat/opensolaris/kern/opensolaris_atomic.c#2 integrate .. //depot/projects/soc2009/trasz_limits/sys/cddl/compat/opensolaris/sys/atomic.h#2 integrate .. //depot/projects/soc2009/trasz_limits/sys/compat/linprocfs/linprocfs.c#13 integrate .. //depot/projects/soc2009/trasz_limits/sys/compat/linux/linux_misc.c#20 integrate .. //depot/projects/soc2009/trasz_limits/sys/compat/linux/linux_misc.h#3 integrate .. //depot/projects/soc2009/trasz_limits/sys/conf/options#28 integrate .. //depot/projects/soc2009/trasz_limits/sys/dev/ata/chipsets/ata-intel.c#12 integrate .. //depot/projects/soc2009/trasz_limits/sys/dev/ath/ath_hal/ah.c#6 integrate .. //depot/projects/soc2009/trasz_limits/sys/dev/ath/ath_hal/ah.h#7 integrate .. //depot/projects/soc2009/trasz_limits/sys/dev/ath/ath_hal/ah_debug.h#3 integrate .. //depot/projects/soc2009/trasz_limits/sys/dev/ath/ath_hal/ah_eeprom_v4k.c#4 integrate .. //depot/projects/soc2009/trasz_limits/sys/dev/ath/ath_hal/ah_eeprom_v4k.h#4 integrate .. //depot/projects/soc2009/trasz_limits/sys/dev/ath/ath_hal/ar5212/ar5212.h#5 integrate .. //depot/projects/soc2009/trasz_limits/sys/dev/ath/ath_hal/ar5416/ar2133.c#2 integrate .. //depot/projects/soc2009/trasz_limits/sys/dev/ath/ath_hal/ar5416/ar5416.h#5 integrate .. //depot/projects/soc2009/trasz_limits/sys/dev/ath/ath_hal/ar5416/ar5416_ani.c#4 integrate .. //depot/projects/soc2009/trasz_limits/sys/dev/ath/ath_hal/ar5416/ar5416_reset.c#10 integrate .. //depot/projects/soc2009/trasz_limits/sys/dev/ath/ath_hal/ar5416/ar5416_xmit.c#5 integrate .. //depot/projects/soc2009/trasz_limits/sys/dev/ath/ath_hal/ar5416/ar5416reg.h#6 integrate .. //depot/projects/soc2009/trasz_limits/sys/dev/ath/ath_hal/ar9002/ar9285v2.ini#2 integrate .. //depot/projects/soc2009/trasz_limits/sys/dev/ath/ath_rate/sample/sample.c#4 integrate .. //depot/projects/soc2009/trasz_limits/sys/dev/ath/ath_rate/sample/tx_schedules.h#1 branch .. //depot/projects/soc2009/trasz_limits/sys/dev/cxgb/cxgb_sge.c#17 integrate .. //depot/projects/soc2009/trasz_limits/sys/dev/md/md.c#14 integrate .. //depot/projects/soc2009/trasz_limits/sys/dev/mii/miidevs#13 integrate .. //depot/projects/soc2009/trasz_limits/sys/dev/mii/rlphy.c#3 integrate .. //depot/projects/soc2009/trasz_limits/sys/dev/nfe/if_nfe.c#12 integrate .. //depot/projects/soc2009/trasz_limits/sys/dev/re/if_re.c#16 integrate .. //depot/projects/soc2009/trasz_limits/sys/dev/siis/siis.c#14 integrate .. //depot/projects/soc2009/trasz_limits/sys/dev/siis/siis.h#6 integrate .. //depot/projects/soc2009/trasz_limits/sys/dev/uart/uart_tty.c#5 integrate .. //depot/projects/soc2009/trasz_limits/sys/dev/usb/usb_freebsd.h#5 integrate .. //depot/projects/soc2009/trasz_limits/sys/fs/nfs/nfsport.h#14 integrate .. //depot/projects/soc2009/trasz_limits/sys/fs/procfs/procfs_dbregs.c#3 integrate .. //depot/projects/soc2009/trasz_limits/sys/fs/procfs/procfs_fpregs.c#4 integrate .. //depot/projects/soc2009/trasz_limits/sys/fs/procfs/procfs_map.c#7 integrate .. //depot/projects/soc2009/trasz_limits/sys/fs/procfs/procfs_regs.c#4 integrate .. //depot/projects/soc2009/trasz_limits/sys/geom/geom_disk.c#5 integrate .. //depot/projects/soc2009/trasz_limits/sys/geom/journal/g_journal.c#4 integrate .. //depot/projects/soc2009/trasz_limits/sys/geom/part/g_part.c#14 integrate .. //depot/projects/soc2009/trasz_limits/sys/geom/part/g_part.h#5 integrate .. //depot/projects/soc2009/trasz_limits/sys/geom/part/g_part_bsd.c#6 integrate .. //depot/projects/soc2009/trasz_limits/sys/geom/part/g_part_ebr.c#5 integrate .. //depot/projects/soc2009/trasz_limits/sys/geom/part/g_part_gpt.c#11 integrate .. //depot/projects/soc2009/trasz_limits/sys/geom/part/g_part_mbr.c#6 integrate .. //depot/projects/soc2009/trasz_limits/sys/i386/i386/machdep.c#24 integrate .. //depot/projects/soc2009/trasz_limits/sys/i386/linux/linux_machdep.c#5 integrate .. //depot/projects/soc2009/trasz_limits/sys/kern/kern_descrip.c#21 integrate .. //depot/projects/soc2009/trasz_limits/sys/kern/kern_fork.c#32 integrate .. //depot/projects/soc2009/trasz_limits/sys/kern/kern_jail.c#34 integrate .. //depot/projects/soc2009/trasz_limits/sys/kern/kern_malloc.c#8 integrate .. //depot/projects/soc2009/trasz_limits/sys/kern/kern_proc.c#21 integrate .. //depot/projects/soc2009/trasz_limits/sys/kern/kern_sig.c#21 integrate .. //depot/projects/soc2009/trasz_limits/sys/kern/kern_sysctl.c#12 integrate .. //depot/projects/soc2009/trasz_limits/sys/kern/subr_lock.c#8 integrate .. //depot/projects/soc2009/trasz_limits/sys/kern/subr_sleepqueue.c#10 integrate .. //depot/projects/soc2009/trasz_limits/sys/kern/subr_trap.c#11 integrate .. //depot/projects/soc2009/trasz_limits/sys/kern/subr_witness.c#11 integrate .. //depot/projects/soc2009/trasz_limits/sys/kern/sys_process.c#14 integrate .. //depot/projects/soc2009/trasz_limits/sys/kern/uipc_syscalls.c#17 integrate .. //depot/projects/soc2009/trasz_limits/sys/kern/vfs_mount.c#15 integrate .. //depot/projects/soc2009/trasz_limits/sys/kern/vfs_subr.c#25 integrate .. //depot/projects/soc2009/trasz_limits/sys/mips/include/sf_buf.h#3 integrate .. //depot/projects/soc2009/trasz_limits/sys/mips/mips/uio_machdep.c#4 integrate .. //depot/projects/soc2009/trasz_limits/sys/mips/mips/vm_machdep.c#14 integrate .. //depot/projects/soc2009/trasz_limits/sys/modules/Makefile#28 integrate .. //depot/projects/soc2009/trasz_limits/sys/modules/khelp/Makefile#1 branch .. //depot/projects/soc2009/trasz_limits/sys/modules/khelp/h_ertt/Makefile#1 branch .. //depot/projects/soc2009/trasz_limits/sys/net/if.c#26 integrate .. //depot/projects/soc2009/trasz_limits/sys/netinet/if_ether.c#19 integrate .. //depot/projects/soc2009/trasz_limits/sys/netinet/in_pcb.c#20 integrate .. //depot/projects/soc2009/trasz_limits/sys/netinet/khelp/h_ertt.c#1 branch .. //depot/projects/soc2009/trasz_limits/sys/netinet/khelp/h_ertt.h#1 branch .. //depot/projects/soc2009/trasz_limits/sys/netinet/sctp_cc_functions.c#9 integrate .. //depot/projects/soc2009/trasz_limits/sys/netinet/sctp_constants.h#9 integrate .. //depot/projects/soc2009/trasz_limits/sys/netinet/sctp_output.c#23 integrate .. //depot/projects/soc2009/trasz_limits/sys/netinet/sctp_pcb.h#7 integrate .. //depot/projects/soc2009/trasz_limits/sys/netinet/sctp_structs.h#10 integrate .. //depot/projects/soc2009/trasz_limits/sys/netinet/sctp_sysctl.h#8 integrate .. //depot/projects/soc2009/trasz_limits/sys/netinet/sctp_usrreq.c#15 integrate .. //depot/projects/soc2009/trasz_limits/sys/pci/if_rlreg.h#9 integrate .. //depot/projects/soc2009/trasz_limits/sys/powerpc/aim/trap.c#10 integrate .. //depot/projects/soc2009/trasz_limits/sys/powerpc/powerpc/exec_machdep.c#5 integrate .. //depot/projects/soc2009/trasz_limits/sys/sys/diskmbr.h#3 integrate .. //depot/projects/soc2009/trasz_limits/sys/sys/gpt.h#4 integrate .. //depot/projects/soc2009/trasz_limits/sys/sys/proc.h#31 integrate .. //depot/projects/soc2009/trasz_limits/sys/sys/ptrace.h#7 integrate .. //depot/projects/soc2009/trasz_limits/sys/sys/sysctl.h#14 integrate .. //depot/projects/soc2009/trasz_limits/sys/sys/sysent.h#9 integrate .. //depot/projects/soc2009/trasz_limits/sys/vm/uma_core.c#10 integrate .. //depot/projects/soc2009/trasz_limits/sys/vm/vm_phys.c#10 integrate .. //depot/projects/soc2009/trasz_limits/sys/vm/vm_reserv.c#6 integrate .. //depot/projects/soc2009/trasz_limits/tools/regression/bin/sh/builtins/trap7.0#1 branch .. //depot/projects/soc2009/trasz_limits/tools/tools/ath/Makefile#3 integrate .. //depot/projects/soc2009/trasz_limits/tools/tools/ath/ath_ee_v4k_print/Makefile#1 branch .. //depot/projects/soc2009/trasz_limits/tools/tools/ath/ath_ee_v4k_print/eeprom.c#1 branch .. //depot/projects/soc2009/trasz_limits/tools/tools/ath/ath_ee_v4k_print/eeprom.h#1 branch .. //depot/projects/soc2009/trasz_limits/tools/tools/ath/ath_ee_v4k_print/main.c#1 branch .. //depot/projects/soc2009/trasz_limits/tools/tools/ath/ath_ee_v4k_print/v4k.c#1 branch .. //depot/projects/soc2009/trasz_limits/tools/tools/ath/ath_ee_v4k_print/v4k.h#1 branch .. //depot/projects/soc2009/trasz_limits/usr.bin/csup/updater.c#2 integrate .. //depot/projects/soc2009/trasz_limits/usr.bin/getopt/getopt.1#4 integrate .. //depot/projects/soc2009/trasz_limits/usr.bin/ktrdump/ktrdump.8#2 integrate .. //depot/projects/soc2009/trasz_limits/usr.bin/ktrdump/ktrdump.c#2 integrate .. //depot/projects/soc2009/trasz_limits/usr.bin/man/man.sh#4 integrate .. //depot/projects/soc2009/trasz_limits/usr.bin/netstat/netisr.c#2 integrate .. //depot/projects/soc2009/trasz_limits/usr.sbin/Makefile.mips#3 integrate .. //depot/projects/soc2009/trasz_limits/usr.sbin/freebsd-update/freebsd-update.sh#8 integrate .. //depot/projects/soc2009/trasz_limits/usr.sbin/makefs/ffs.c#3 integrate .. //depot/projects/soc2009/trasz_limits/usr.sbin/makefs/makefs.c#3 integrate .. //depot/projects/soc2009/trasz_limits/usr.sbin/quot/quot.c#2 integrate .. //depot/projects/soc2009/trasz_limits/usr.sbin/usbdump/usbdump.c#3 integrate Differences ... ==== //depot/projects/soc2009/trasz_limits/Makefile#11 (text+ko) ==== @@ -1,5 +1,5 @@ # -# $FreeBSD: src/Makefile,v 1.381 2011/01/23 16:28:44 bz Exp $ +# $FreeBSD: src/Makefile,v 1.382 2011/01/25 08:13:31 bz Exp $ # # The user-driven targets are: # @@ -28,7 +28,8 @@ # delete-old-dirs - Delete obsolete directories. # delete-old-files - Delete obsolete files. # delete-old-libs - Delete obsolete libraries. -# targets - Print a list of supported TARGET/TARGET_ARCH pairs. +# targets - Print a list of supported TARGET/TARGET_ARCH pairs +# for world and kernel targets. # # This makefile is simple by design. The FreeBSD make automatically reads # the /usr/share/mk/sys.mk unless the -m argument is specified on the @@ -297,7 +298,7 @@ .endfor targets: - @echo "Supported TARGETS/TARGET_ARCH pairs" + @echo "Supported TARGET/TARGET_ARCH pairs for world and kernel targets" .for target in ${TARGETS} .for target_arch in ${TARGET_ARCHES_${target}} @echo " ${target}/${target_arch}" ==== //depot/projects/soc2009/trasz_limits/bin/ps/ps.1#8 (text+ko) ==== @@ -27,7 +27,7 @@ .\" SUCH DAMAGE. .\" .\" @(#)ps.1 8.3 (Berkeley) 4/18/94 -.\" $FreeBSD: src/bin/ps/ps.1,v 1.97 2010/10/08 00:44:53 emaste Exp $ +.\" $FreeBSD: src/bin/ps/ps.1,v 1.98 2011/01/25 11:04:16 kib Exp $ .\" .Dd July 24, 2010 .Dt PS 1 @@ -288,6 +288,7 @@ .It Dv "P_ADVLOCK" Ta No "0x00001 Process may hold a POSIX advisory lock" .It Dv "P_CONTROLT" Ta No "0x00002 Has a controlling terminal" .It Dv "P_KTHREAD" Ta No "0x00004 Kernel thread" +.It Dv "P_FOLLOWFORK" Ta No "0x00008 Attach debugger to new children" .It Dv "P_PPWAIT" Ta No "0x00010 Parent is waiting for child to exec/exit" .It Dv "P_PROFIL" Ta No "0x00020 Has started profiling" .It Dv "P_STOPPROF" Ta No "0x00040 Has thread in requesting to stop prof" ==== //depot/projects/soc2009/trasz_limits/bin/sh/var.c#14 (text+ko) ==== @@ -36,7 +36,7 @@ #endif #endif /* not lint */ #include <sys/cdefs.h> -__FBSDID("$FreeBSD: src/bin/sh/var.c,v 1.54 2011/01/01 13:26:18 jilles Exp $"); +__FBSDID("$FreeBSD: src/bin/sh/var.c,v 1.55 2011/01/25 20:56:18 jilles Exp $"); #include <unistd.h> #include <stdlib.h> @@ -600,9 +600,8 @@ /* - * Command to list all variables which are set. Currently this command - * is invoked from the set command when the set command is called without - * any variables. + * Command to list all variables which are set. This is invoked from the + * set command when it is called without any options or operands. */ int @@ -840,9 +839,7 @@ /* - * The unset builtin command. We unset the function before we unset the - * variable to allow a function to be unset when there is a readonly variable - * with the same name. + * The unset builtin command. */ int ==== //depot/projects/soc2009/trasz_limits/etc/periodic/daily/800.scrub-zfs#4 (text+ko) ==== @@ -1,10 +1,14 @@ #!/bin/sh # -# $FreeBSD: src/etc/periodic/daily/800.scrub-zfs,v 1.3 2011/01/23 17:13:29 jpaetzel Exp $ +# $FreeBSD: src/etc/periodic/daily/800.scrub-zfs,v 1.4 2011/01/25 13:41:48 jpaetzel Exp $ # # If there is a global system configuration file, suck it in. # + +newline=" +" # A single newline + if [ -r /etc/defaults/periodic.conf ] then . /etc/defaults/periodic.conf @@ -24,17 +28,19 @@ for pool in ${daily_scrub_zfs_pools}; do # sanity check - _status=$(zpool list ${pool} | sed -n -e '$p') + _status=$(zpool list "${pool}" 2> /dev/null) if [ $? -ne 0 ]; then echo " WARNING: pool '${pool}' specified in" echo " '/etc/periodic.conf:daily_scrub_zfs_pools'" echo " does not exist" continue fi - if echo ${_status} | grep -q FAULTED; then + _status=${_status##*$newline} + case ${_status} in + *FAULTED*) echo "Skipping faulted pool: ${pool}" - continue - fi + continue ;; + esac # successful only if there is at least one pool to scrub rc=0 ==== //depot/projects/soc2009/trasz_limits/gnu/lib/libgcc/Makefile#12 (text+ko) ==== @@ -1,4 +1,4 @@ -# $FreeBSD: src/gnu/lib/libgcc/Makefile,v 1.78 2011/01/07 20:26:33 imp Exp $ +# $FreeBSD: src/gnu/lib/libgcc/Makefile,v 1.79 2011/01/27 14:16:12 jchandra Exp $ GCCDIR= ${.CURDIR}/../../../contrib/gcc GCCLIB= ${.CURDIR}/../../../contrib/gcclibs @@ -121,8 +121,8 @@ .if ${TARGET_CPUARCH} == mips LIB2FUNCS_EXTRA = floatunsidf.c floatunsisf.c -# XXX do we need n32 here? -.if ${TARGET_ARCH:Mmips64*} != "" +# ABIs other than o32 need this +.if ${TARGET_ARCH:Mmipse[lb]} == "" LIB2FUNCS_EXTRA+= floatdidf.c fixunsdfsi.c LIB2FUNCS_EXTRA+= floatdisf.c floatundidf.c LIB2FUNCS_EXTRA+= fixsfdi.c floatundisf.c ==== //depot/projects/soc2009/trasz_limits/gnu/lib/libgomp/Makefile#5 (text+ko) ==== @@ -1,4 +1,4 @@ -# $FreeBSD: src/gnu/lib/libgomp/Makefile,v 1.8 2011/01/07 20:26:33 imp Exp $ +# $FreeBSD: src/gnu/lib/libgomp/Makefile,v 1.9 2011/01/27 14:16:12 jchandra Exp $ GCCDIR= ${.CURDIR}/../../../contrib/gcc GCCLIB= ${.CURDIR}/../../../contrib/gcclibs @@ -25,7 +25,7 @@ # Target-specific OpenMP configuration .if ${MACHINE_CPUARCH} == arm || ${MACHINE_CPUARCH} == i386 || \ ${MACHINE_ARCH} == powerpc || \ - ${MACHINE_ARCH} == mipsel || ${MACHINE_ARCH} == mipseb + (${MACHINE_CPUARCH} == mips && ${MACHINE_ARCH:Mmips64*} == "") OMP_LOCK_ALIGN = 4 OMP_LOCK_KIND= 4 OMP_LOCK_SIZE= 4 ==== //depot/projects/soc2009/trasz_limits/gnu/usr.bin/binutils/Makefile.inc0#7 (text+ko) ==== @@ -1,4 +1,4 @@ -# $FreeBSD: src/gnu/usr.bin/binutils/Makefile.inc0,v 1.44 2011/01/07 20:26:33 imp Exp $ +# $FreeBSD: src/gnu/usr.bin/binutils/Makefile.inc0,v 1.45 2011/01/27 14:16:12 jchandra Exp $ # # This is included explicitly at the top of each sub-Makefile. We can't # use the normal "Makefile.inc" mechanism, because we need some of these @@ -28,7 +28,7 @@ .if ${TARGET_CPUARCH} == "arm" || ${TARGET_CPUARCH} == "i386" || \ ${TARGET_ARCH} == "powerpc" || \ - ${TARGET_ARCH} == "mipsel" || ${TARGET_ARCH} == "mipseb" + (${TARGET_CPUARCH} == "mips" && ${TARGET_ARCH:Mmips64*} == "") CFLAGS+= -DBFD_DEFAULT_TARGET_SIZE=32 .else CFLAGS+= -DBFD_DEFAULT_TARGET_SIZE=64 ==== //depot/projects/soc2009/trasz_limits/lib/libc/Makefile#11 (text+ko) ==== @@ -1,5 +1,5 @@ # @(#)Makefile 8.2 (Berkeley) 2/3/94 -# $FreeBSD: src/lib/libc/Makefile,v 1.89 2011/01/07 20:26:33 imp Exp $ +# $FreeBSD: src/lib/libc/Makefile,v 1.90 2011/01/27 14:16:12 jchandra Exp $ SHLIBDIR?= /lib @@ -68,6 +68,7 @@ ${LIBC_ARCH} != "ia64" && \ ${LIBC_ARCH} != "powerpc64" && \ ${LIBC_ARCH} != "sparc64" && \ + ${MACHINE_ARCH:Mmipsn32*} == "" && \ ${MACHINE_ARCH:Mmips64*} == "" .include "${.CURDIR}/quad/Makefile.inc" .endif ==== //depot/projects/soc2009/trasz_limits/lib/libc/sys/Makefile.inc#10 (text+ko) ==== @@ -1,5 +1,5 @@ # @(#)Makefile.inc 8.3 (Berkeley) 10/24/94 -# $FreeBSD: src/lib/libc/sys/Makefile.inc,v 1.148 2011/01/07 14:28:54 kib Exp $ +# $FreeBSD: src/lib/libc/sys/Makefile.inc,v 1.149 2011/01/25 21:06:49 kib Exp $ # sys sources .PATH: ${.CURDIR}/${LIBC_ARCH}/sys ${.CURDIR}/sys @@ -53,16 +53,23 @@ # Generated files CLEANFILES+= ${SASM} ${SPSEUDO} +.if ${MACHINE_CPUARCH} == "amd64" || ${MACHINE_CPUARCH} == "i386" || \ + ${MACHINE_CPUARCH} == "powerpc" +NOTE_GNU_STACK='\t.section .note.GNU-stack,"",%%progbits\n' +.else +NOTE_GNU_STACK='' +.endif + ${SASM}: printf '#include "compat.h"\n' > ${.TARGET} printf '#include "SYS.h"\nRSYSCALL(${.PREFIX})\n' >> ${.TARGET} - printf '\t.section .note.GNU-stack,"",%%progbits\n' >>${.TARGET} + printf ${NOTE_GNU_STACK} >>${.TARGET} ${SPSEUDO}: printf '#include "compat.h"\n' > ${.TARGET} printf '#include "SYS.h"\nPSEUDO(${.PREFIX:S/_//})\n' \ >> ${.TARGET} - printf '\t.section .note.GNU-stack,"",%%progbits\n' >>${.TARGET} + printf ${NOTE_GNU_STACK} >>${.TARGET} MAN+= abort2.2 accept.2 access.2 acct.2 adjtime.2 \ aio_cancel.2 aio_error.2 aio_read.2 aio_return.2 \ ==== //depot/projects/soc2009/trasz_limits/lib/libc/sys/ptrace.2#6 (text+ko) ==== @@ -1,8 +1,8 @@ -.\" $FreeBSD: src/lib/libc/sys/ptrace.2,v 1.47 2010/08/06 14:33:42 joel Exp $ +.\" $FreeBSD: src/lib/libc/sys/ptrace.2,v 1.48 2011/01/25 11:02:12 kib Exp $ .\" $NetBSD: ptrace.2,v 1.2 1995/02/27 12:35:37 cgd Exp $ .\" .\" This file is in the public domain. -.Dd July 10, 2010 +.Dd January 23, 2011 .Dt PTRACE 2 .Os .Sh NAME @@ -295,6 +295,8 @@ sigset_t pl_sigmask; sigset_t pl_siglist; siginfo_t pl_siginfo; + char pl_tdname[MAXCOMLEN + 1]; + int pl_child_pid; }; .Ed .Pp @@ -345,6 +347,14 @@ member of .Vt "struct ptrace_lwpinfo" contains valid information. +.It PL_FLAG_FORKED +Indicates that the process is returning from a call to +.Fn fork 2 +that created a new child process. +The process identifier of the new process is available in the +.Va pl_child_pid +member of +.Vt "struct ptrace_lwpinfo" . .El .It pl_sigmask The current signal mask of the LWP @@ -356,11 +366,20 @@ The siginfo that accompanies the signal pending. Only valid for .Dv PL_EVENT_SIGNAL -kind of stop, when -.Va pl_flags -has +stop when .Dv PL_FLAG_SI -set. +is set in +.Va pl_flags . +.It pl_tdname +The name of the thread. +.It pl_child_pid +The process identifier of the new child process. +Only valid for a +.Dv PL_EVENT_SIGNAL +stop when +.Dv PL_FLAG_FORKED +is set in +.Va pl_flags . .El .It PT_GETNUMLWPS This request returns the number of kernel threads associated with the @@ -391,6 +410,21 @@ .It PT_SYSCALL This request will trace the specified process on each system call entry and exit. +.It PT_FOLLOW_FORK +This request controls tracing for new child processes of a traced process. +If +.Fa data +is non-zero, +then new child processes will enable tracing and stop before executing their +first instruction. +If +.Fa data +is zero, then new child processes will execute without tracing enabled. +By default, tracing is not enabled for new child processes. +Child processes do not inherit this property. +The traced process will set the +.Dv PL_FLAG_FORKED +flag upon exit from a system call that creates a new process. .It PT_VM_TIMESTAMP This request returns the generation number or timestamp of the memory map of the traced process as the return value from @@ -567,6 +601,7 @@ .At v7 . .Sh BUGS The +.Dv PL_FLAG_FORKED , .Dv PL_FLAG_SCE , .Dv PL_FLAG_SCX and ==== //depot/projects/soc2009/trasz_limits/lib/libelf/elf_data.c#3 (text+ko) ==== @@ -25,7 +25,7 @@ */ #include <sys/cdefs.h> -__FBSDID("$FreeBSD: src/lib/libelf/elf_data.c,v 1.4 2010/07/21 10:25:02 kaiw Exp $"); +__FBSDID("$FreeBSD: src/lib/libelf/elf_data.c,v 1.5 2011/01/25 19:17:50 kan Exp $"); #include <assert.h> #include <errno.h> @@ -115,8 +115,10 @@ d->d_type = elftype; d->d_version = e->e_version; - if (sh_type == SHT_NOBITS) + if (sh_type == SHT_NOBITS || sh_size == 0) { + STAILQ_INSERT_TAIL(&s->s_data, d, d_next); return (d); + } if ((d->d_buf = malloc(msz*count)) == NULL) { (void) _libelf_release_data(d); ==== //depot/projects/soc2009/trasz_limits/lib/libkvm/kvm_powerpc64.c#2 (text+ko) ==== @@ -27,7 +27,7 @@ */ #include <sys/cdefs.h> -__FBSDID("$FreeBSD: src/lib/libkvm/kvm_powerpc64.c,v 1.1 2010/07/10 15:15:00 nwhitehorn Exp $"); +__FBSDID("$FreeBSD: src/lib/libkvm/kvm_powerpc64.c,v 1.2 2011/01/24 11:06:40 uqs Exp $"); #include <sys/param.h> #include <sys/endian.h> @@ -41,6 +41,7 @@ #include <limits.h> #include <kvm.h> #include <stdlib.h> +#include <string.h> #include "kvm_private.h" ==== //depot/projects/soc2009/trasz_limits/libexec/rtld-elf/amd64/rtld_machdep.h#2 (text+ko) ==== @@ -23,7 +23,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $FreeBSD: src/libexec/rtld-elf/amd64/rtld_machdep.h,v 1.14 2009/04/19 23:02:50 rwatson Exp $ + * $FreeBSD: src/libexec/rtld-elf/amd64/rtld_machdep.h,v 1.15 2011/01/25 21:12:31 kib Exp $ */ #ifndef RTLD_MACHDEP_H @@ -73,4 +73,7 @@ extern void *__tls_get_addr(tls_index *ti); +#define RTLD_DEFAULT_STACK_PF_EXEC PF_X +#define RTLD_DEFAULT_STACK_EXEC PROT_EXEC + #endif ==== //depot/projects/soc2009/trasz_limits/libexec/rtld-elf/arm/rtld_machdep.h#2 (text+ko) ==== @@ -23,7 +23,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $FreeBSD: src/libexec/rtld-elf/arm/rtld_machdep.h,v 1.6 2009/04/19 23:02:50 rwatson Exp $ + * $FreeBSD: src/libexec/rtld-elf/arm/rtld_machdep.h,v 1.7 2011/01/25 21:12:31 kib Exp $ */ #ifndef RTLD_MACHDEP_H @@ -69,4 +69,7 @@ extern void *__tls_get_addr(tls_index *ti); +#define RTLD_DEFAULT_STACK_PF_EXEC PF_X +#define RTLD_DEFAULT_STACK_EXEC PROT_EXEC + #endif ==== //depot/projects/soc2009/trasz_limits/libexec/rtld-elf/i386/rtld_machdep.h#2 (text+ko) ==== @@ -23,7 +23,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $FreeBSD: src/libexec/rtld-elf/i386/rtld_machdep.h,v 1.12 2009/04/19 23:02:50 rwatson Exp $ + * $FreeBSD: src/libexec/rtld-elf/i386/rtld_machdep.h,v 1.13 2011/01/25 21:12:31 kib Exp $ */ #ifndef RTLD_MACHDEP_H @@ -74,4 +74,7 @@ extern void *___tls_get_addr(tls_index *ti) __attribute__((__regparm__(1))); extern void *__tls_get_addr(tls_index *ti); +#define RTLD_DEFAULT_STACK_PF_EXEC PF_X +#define RTLD_DEFAULT_STACK_EXEC PROT_EXEC + #endif ==== //depot/projects/soc2009/trasz_limits/libexec/rtld-elf/ia64/rtld_machdep.h#2 (text+ko) ==== @@ -23,7 +23,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $FreeBSD: src/libexec/rtld-elf/ia64/rtld_machdep.h,v 1.7 2009/04/19 23:02:50 rwatson Exp $ + * $FreeBSD: src/libexec/rtld-elf/ia64/rtld_machdep.h,v 1.8 2011/01/25 21:12:31 kib Exp $ */ #ifndef RTLD_MACHDEP_H @@ -65,4 +65,7 @@ extern void *__tls_get_addr(unsigned long module, unsigned long offset); +#define RTLD_DEFAULT_STACK_PF_EXEC 0 +#define RTLD_DEFAULT_STACK_EXEC 0 + #endif ==== //depot/projects/soc2009/trasz_limits/libexec/rtld-elf/map_object.c#5 (text+ko) ==== @@ -22,7 +22,7 @@ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * - * $FreeBSD: src/libexec/rtld-elf/map_object.c,v 1.24 2011/01/08 17:11:49 kib Exp $ + * $FreeBSD: src/libexec/rtld-elf/map_object.c,v 1.25 2011/01/25 21:12:31 kib Exp $ */ #include <sys/param.h> @@ -101,7 +101,7 @@ phdyn = phinterp = phtls = NULL; phdr_vaddr = 0; segs = alloca(sizeof(segs[0]) * hdr->e_phnum); - stack_flags = PF_X | PF_R | PF_W; + stack_flags = RTLD_DEFAULT_STACK_PF_EXEC | PF_R | PF_W; while (phdr < phlimit) { switch (phdr->p_type) { ==== //depot/projects/soc2009/trasz_limits/libexec/rtld-elf/mips/rtld_machdep.h#2 (text+ko) ==== @@ -23,7 +23,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $FreeBSD: src/libexec/rtld-elf/mips/rtld_machdep.h,v 1.2 2009/04/19 23:02:50 rwatson Exp $ + * $FreeBSD: src/libexec/rtld-elf/mips/rtld_machdep.h,v 1.3 2011/01/25 21:12:31 kib Exp $ */ #ifndef RTLD_MACHDEP_H @@ -69,4 +69,7 @@ extern void *__tls_get_addr(tls_index *ti); +#define RTLD_DEFAULT_STACK_PF_EXEC PF_X +#define RTLD_DEFAULT_STACK_EXEC PROT_EXEC + #endif ==== //depot/projects/soc2009/trasz_limits/libexec/rtld-elf/powerpc/rtld_machdep.h#3 (text+ko) ==== @@ -23,7 +23,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $FreeBSD: src/libexec/rtld-elf/powerpc/rtld_machdep.h,v 1.6 2010/02/22 16:49:45 nwhitehorn Exp $ + * $FreeBSD: src/libexec/rtld-elf/powerpc/rtld_machdep.h,v 1.7 2011/01/25 21:12:31 kib Exp $ */ #ifndef RTLD_MACHDEP_H @@ -84,4 +84,7 @@ extern void *__tls_get_addr(tls_index* ti); +#define RTLD_DEFAULT_STACK_PF_EXEC PF_X +#define RTLD_DEFAULT_STACK_EXEC PROT_EXEC + #endif ==== //depot/projects/soc2009/trasz_limits/libexec/rtld-elf/powerpc64/rtld_machdep.h#2 (text+ko) ==== @@ -23,7 +23,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $FreeBSD: src/libexec/rtld-elf/powerpc64/rtld_machdep.h,v 1.1 2010/07/10 17:43:24 nwhitehorn Exp $ + * $FreeBSD: src/libexec/rtld-elf/powerpc64/rtld_machdep.h,v 1.2 2011/01/25 21:12:31 kib Exp $ */ #ifndef RTLD_MACHDEP_H @@ -76,4 +76,7 @@ extern void *__tls_get_addr(tls_index* ti); +#define RTLD_DEFAULT_STACK_PF_EXEC PF_X +#define RTLD_DEFAULT_STACK_EXEC PROT_EXEC + #endif ==== //depot/projects/soc2009/trasz_limits/libexec/rtld-elf/rtld.c#18 (text+ko) ==== @@ -24,7 +24,7 @@ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * - * $FreeBSD: src/libexec/rtld-elf/rtld.c,v 1.166 2011/01/22 19:25:49 kib Exp $ + * $FreeBSD: src/libexec/rtld-elf/rtld.c,v 1.169 2011/01/28 17:30:24 pluknet Exp $ */ /* @@ -191,7 +191,7 @@ int osreldate, pagesize; -static int stack_prot = PROT_READ | PROT_WRITE | PROT_EXEC; +static int stack_prot = PROT_READ | PROT_WRITE | RTLD_DEFAULT_STACK_EXEC; static int max_stack_flags; /* @@ -1385,7 +1385,7 @@ digest_dynamic1(&objtmp, 1, &dyn_rpath, &dyn_soname); assert(objtmp.needed == NULL); #if !defined(__mips__) - /* MIPS and SH{3,5} have a bogus DT_TEXTREL. */ + /* MIPS has a bogus DT_TEXTREL. */ assert(!objtmp.textrel); #endif @@ -2800,7 +2800,12 @@ donelist_init(&donelist); if (symlook_global(&req, &donelist) != 0) return (NULL); - return ((const void **)(req.defobj_out->relocbase + req.sym_out->st_value)); + if (ELF_ST_TYPE(req.sym_out->st_info) == STT_FUNC) + return ((const void **)make_function_pointer(req.sym_out, + req.defobj_out)); + else + return ((const void **)(req.defobj_out->relocbase + + req.sym_out->st_value)); } /* ==== //depot/projects/soc2009/trasz_limits/libexec/rtld-elf/sparc64/rtld_machdep.h#2 (text+ko) ==== @@ -23,7 +23,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $FreeBSD: src/libexec/rtld-elf/sparc64/rtld_machdep.h,v 1.9 2009/04/19 23:02:50 rwatson Exp $ + * $FreeBSD: src/libexec/rtld-elf/sparc64/rtld_machdep.h,v 1.10 2011/01/25 21:12:31 kib Exp $ */ #ifndef RTLD_MACHDEP_H @@ -65,4 +65,7 @@ extern void *__tls_get_addr(tls_index *ti); +#define RTLD_DEFAULT_STACK_PF_EXEC 0 +#define RTLD_DEFAULT_STACK_EXEC 0 + #endif ==== //depot/projects/soc2009/trasz_limits/sbin/dump/itime.c#3 (text+ko) ==== @@ -32,12 +32,11 @@ static char sccsid[] = "@(#)itime.c 8.1 (Berkeley) 6/5/93"; #endif static const char rcsid[] = - "$FreeBSD: src/sbin/dump/itime.c,v 1.18 2010/02/03 23:56:12 delphij Exp $"; + "$FreeBSD: src/sbin/dump/itime.c,v 1.19 2011/01/24 06:17:05 mckusick Exp $"; #endif /* not lint */ #include <sys/param.h> #include <sys/queue.h> -#include <sys/time.h> #include <ufs/ufs/dinode.h> @@ -49,6 +48,7 @@ #include <stdio.h> #include <stdlib.h> #include <string.h> +#include <time.h> #include <timeconv.h> #include "dump.h" ==== //depot/projects/soc2009/trasz_limits/sbin/dump/main.c#3 (text+ko) ==== @@ -38,12 +38,11 @@ static char sccsid[] = "@(#)main.c 8.6 (Berkeley) 5/1/95"; #endif static const char rcsid[] = - "$FreeBSD: src/sbin/dump/main.c,v 1.68 2010/02/03 23:56:12 delphij Exp $"; + "$FreeBSD: src/sbin/dump/main.c,v 1.69 2011/01/24 06:17:05 mckusick Exp $"; #endif /* not lint */ #include <sys/param.h> #include <sys/stat.h> -#include <sys/time.h> #include <sys/mount.h> #include <sys/disklabel.h> @@ -64,6 +63,7 @@ #include <stdio.h> #include <stdlib.h> #include <string.h> +#include <time.h> #include <timeconv.h> #include <unistd.h> ==== //depot/projects/soc2009/trasz_limits/sbin/dump/optr.c#3 (text+ko) ==== @@ -32,13 +32,12 @@ static char sccsid[] = "@(#)optr.c 8.2 (Berkeley) 1/6/94"; #endif static const char rcsid[] = - "$FreeBSD: src/sbin/dump/optr.c,v 1.37 2009/05/29 07:26:44 brian Exp $"; + "$FreeBSD: src/sbin/dump/optr.c,v 1.38 2011/01/24 06:17:05 mckusick Exp $"; #endif /* not lint */ #include <sys/param.h> #include <sys/queue.h> #include <sys/wait.h> -#include <sys/time.h> #include <ufs/ufs/dinode.h> @@ -51,6 +50,7 @@ #include <string.h> #include <stdarg.h> #include <signal.h> +#include <time.h> #include <unistd.h> #include "dump.h" ==== //depot/projects/soc2009/trasz_limits/sbin/dump/tape.c#2 (text+ko) ==== @@ -32,12 +32,11 @@ static char sccsid[] = "@(#)tape.c 8.4 (Berkeley) 5/1/95"; #endif static const char rcsid[] = - "$FreeBSD: src/sbin/dump/tape.c,v 1.27 2005/03/02 02:30:08 iedowse Exp $"; + "$FreeBSD: src/sbin/dump/tape.c,v 1.28 2011/01/24 06:17:05 mckusick Exp $"; #endif /* not lint */ #include <sys/param.h> #include <sys/socket.h> -#include <sys/time.h> #include <sys/wait.h> #include <sys/stat.h> @@ -54,6 +53,7 @@ #include <stdio.h> #include <stdlib.h> #include <string.h> +#include <time.h> #include <unistd.h> #include "dump.h" ==== //depot/projects/soc2009/trasz_limits/sbin/fdisk/fdisk.c#7 (text+ko) ==== @@ -25,7 +25,7 @@ */ #include <sys/cdefs.h> -__FBSDID("$FreeBSD: src/sbin/fdisk/fdisk.c,v 1.98 2011/01/22 05:21:20 sobomax Exp $"); +__FBSDID("$FreeBSD: src/sbin/fdisk/fdisk.c,v 1.100 2011/01/25 04:35:07 sobomax Exp $"); #include <sys/disk.h> #include <sys/disklabel.h> @@ -49,7 +49,10 @@ int iotest; -#define NOSECTORS ((u_int32_t)-1) +#define NO_DISK_SECTORS ((u_int32_t)-1) +#define NO_TRACK_CYLINDERS 1023 +#define NO_TRACK_HEADS 255 +#define NO_TRACK_SECTORS 63 #define LBUF 100 static char lbuf[LBUF]; @@ -62,7 +65,7 @@ * Created. */ -#define Decimal(str, ans, tmp, size) if (decimal(str, &tmp, ans, size)) ans = tmp +#define Decimal(str, ans, tmp, maxval) if (decimal(str, &tmp, ans, maxval)) ans = tmp #define RoundCyl(x) ((((x) + cylsecs - 1) / cylsecs) * cylsecs) @@ -247,7 +250,7 @@ static int read_s0(void); static int write_s0(void); static int ok(const char *str); -static int decimal(const char *str, int *num, int deflt, int size); +static int decimal(const char *str, int *num, int deflt, uint32_t maxval); static int read_config(char *config_file); static void reset_boot(void); static int sanitize_partition(struct dos_partition *); @@ -572,9 +575,9 @@ } do { - Decimal("sysid (165=FreeBSD)", partp->dp_typ, tmp, sizeof(partp->dp_typ)); - Decimal("start", partp->dp_start, tmp, sizeof(partp->dp_start)); - Decimal("size", partp->dp_size, tmp, sizeof(partp->dp_size)); + Decimal("sysid (165=FreeBSD)", partp->dp_typ, tmp, 255); + Decimal("start", partp->dp_start, tmp, NO_DISK_SECTORS); + Decimal("size", partp->dp_size, tmp, NO_DISK_SECTORS); if (!sanitize_partition(partp)) { warnx("ERROR: failed to adjust; setting sysid to 0"); partp->dp_typ = 0; @@ -586,9 +589,9 @@ tcyl = DPCYL(partp->dp_scyl,partp->dp_ssect); thd = partp->dp_shd; tsec = DPSECT(partp->dp_ssect); - Decimal("beginning cylinder", tcyl, tmp, sizeof(partp->dp_scyl)); - Decimal("beginning head", thd, tmp, sizeof(partp->dp_shd)); - Decimal("beginning sector", tsec, tmp, sizeof(partp->dp_ssect)); + Decimal("beginning cylinder", tcyl, tmp, NO_TRACK_CYLINDERS); + Decimal("beginning head", thd, tmp, NO_TRACK_HEADS); + Decimal("beginning sector", tsec, tmp, NO_TRACK_SECTORS); partp->dp_scyl = DOSCYL(tcyl); partp->dp_ssect = DOSSECT(tsec,tcyl); partp->dp_shd = thd; @@ -596,9 +599,9 @@ tcyl = DPCYL(partp->dp_ecyl,partp->dp_esect); thd = partp->dp_ehd; tsec = DPSECT(partp->dp_esect); - Decimal("ending cylinder", tcyl, tmp, sizeof(partp->dp_ecyl)); - Decimal("ending head", thd, tmp, sizeof(partp->dp_ehd)); - Decimal("ending sector", tsec, tmp, sizeof(partp->dp_esect)); + Decimal("ending cylinder", tcyl, tmp, NO_TRACK_CYLINDERS); + Decimal("ending head", thd, tmp, NO_TRACK_HEADS); + Decimal("ending sector", tsec, tmp, NO_TRACK_SECTORS); partp->dp_ecyl = DOSCYL(tcyl); partp->dp_esect = DOSSECT(tsec,tcyl); partp->dp_ehd = thd; @@ -915,16 +918,12 @@ } static int -decimal(const char *str, int *num, int deflt, int size) +decimal(const char *str, int *num, int deflt, uint32_t maxval) { - long long acc = 0, maxval; + long long acc = 0; int c; char *cp; - if (size == 0) { - size = sizeof(*num); - } - maxval = (long long)1 << (size * 8); while (1) { printf("Supply a decimal value for \"%s\" [%d] ", str, deflt); fflush(stdout); @@ -941,7 +940,7 @@ return 0; while ((c = *cp++)) { if (c <= '9' && c >= '0') { - if (acc < maxval) + if (maxval > 0 && acc <= maxval) acc = acc * 10 + c - '0'; } else break; @@ -949,10 +948,11 @@ if (c == ' ' || c == '\t') while ((c = *cp) && (c == ' ' || c == '\t')) cp++; if (!c) { - if (acc >= maxval) { >>> TRUNCATED FOR MAIL (1000 lines) <<<
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201101281951.p0SJprOe000480>