svn commit: r346926 - in user/ngie/bug-237403: . bin/date cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/ip etc/mtree lib/libbe lib/libc/gen lib/libvgl libexec/rc sbin/ifconfig sbin/ipfw share...
Enji Cooper
ngie at FreeBSD.org
Mon Apr 29 20:21:50 UTC 2019
Author: ngie
Date: Mon Apr 29 20:21:38 2019
New Revision: 346926
URL: https://svnweb.freebsd.org/changeset/base/346926
Log:
MFhead at r346925
Added:
user/ngie/bug-237403/lib/libc/gen/auxv.3
- copied unchanged from r346925, head/lib/libc/gen/auxv.3
user/ngie/bug-237403/share/man/man4/dtrace_audit.4
- copied unchanged from r346925, head/share/man/man4/dtrace_audit.4
user/ngie/bug-237403/stand/common/vdisk.c
- copied unchanged from r346925, head/stand/common/vdisk.c
user/ngie/bug-237403/sys/modules/allwinner/aw_pwm/
- copied from r346925, head/sys/modules/allwinner/aw_pwm/
user/ngie/bug-237403/sys/modules/allwinner/aw_rsb/
- copied from r346925, head/sys/modules/allwinner/aw_rsb/
user/ngie/bug-237403/sys/modules/allwinner/aw_rtc/
- copied from r346925, head/sys/modules/allwinner/aw_rtc/
user/ngie/bug-237403/sys/modules/allwinner/aw_sid/
- copied from r346925, head/sys/modules/allwinner/aw_sid/
user/ngie/bug-237403/sys/modules/allwinner/aw_thermal/
- copied from r346925, head/sys/modules/allwinner/aw_thermal/
user/ngie/bug-237403/sys/modules/allwinner/axp81x/
- copied from r346925, head/sys/modules/allwinner/axp81x/
user/ngie/bug-237403/sys/modules/allwinner/if_awg/
- copied from r346925, head/sys/modules/allwinner/if_awg/
user/ngie/bug-237403/usr.sbin/kldxref/ef_mips.c
- copied unchanged from r346925, head/usr.sbin/kldxref/ef_mips.c
user/ngie/bug-237403/usr.sbin/pkg/FreeBSD.conf.latest
- copied unchanged from r346925, head/usr.sbin/pkg/FreeBSD.conf.latest
user/ngie/bug-237403/usr.sbin/pkg/FreeBSD.conf.quarterly
- copied unchanged from r346925, head/usr.sbin/pkg/FreeBSD.conf.quarterly
Deleted:
user/ngie/bug-237403/usr.sbin/pkg/FreeBSD.conf
Modified:
user/ngie/bug-237403/MAINTAINERS (contents, props changed)
user/ngie/bug-237403/bin/date/date.1
user/ngie/bug-237403/bin/date/date.c
user/ngie/bug-237403/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/ip/tst.ipv4localsctp.ksh
user/ngie/bug-237403/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/ip/tst.localsctpstate.ksh
user/ngie/bug-237403/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/ip/tst.localsctpstate.ksh.out
user/ngie/bug-237403/etc/mtree/BSD.sendmail.dist
user/ngie/bug-237403/etc/mtree/BSD.usr.dist
user/ngie/bug-237403/etc/mtree/BSD.var.dist
user/ngie/bug-237403/lib/libbe/Makefile
user/ngie/bug-237403/lib/libbe/be.c
user/ngie/bug-237403/lib/libc/gen/Makefile.inc
user/ngie/bug-237403/lib/libvgl/bitmap.c
user/ngie/bug-237403/lib/libvgl/main.c
user/ngie/bug-237403/lib/libvgl/mouse.c
user/ngie/bug-237403/lib/libvgl/simple.c
user/ngie/bug-237403/lib/libvgl/vgl.h
user/ngie/bug-237403/libexec/rc/rc.initdiskless
user/ngie/bug-237403/sbin/ifconfig/ifgre.c
user/ngie/bug-237403/sbin/ipfw/ipfw2.c
user/ngie/bug-237403/share/man/man4/Makefile
user/ngie/bug-237403/share/man/man4/audit.4
user/ngie/bug-237403/share/man/man4/auditpipe.4
user/ngie/bug-237403/share/man/man4/gre.4
user/ngie/bug-237403/share/man/man4/iflib.4
user/ngie/bug-237403/stand/common/disk.c
user/ngie/bug-237403/stand/common/help.common
user/ngie/bug-237403/stand/efi/include/efilib.h
user/ngie/bug-237403/stand/efi/libefi/efienv.c
user/ngie/bug-237403/stand/efi/loader/autoload.c
user/ngie/bug-237403/stand/efi/loader/conf.c
user/ngie/bug-237403/stand/efi/loader/main.c
user/ngie/bug-237403/stand/fdt/fdt_loader_cmd.c
user/ngie/bug-237403/stand/fdt/fdt_platform.h
user/ngie/bug-237403/stand/i386/loader/conf.c
user/ngie/bug-237403/stand/loader.mk
user/ngie/bug-237403/sys/amd64/include/vmm.h
user/ngie/bug-237403/sys/amd64/vmm/amd/svm.c
user/ngie/bug-237403/sys/amd64/vmm/intel/vmx.c
user/ngie/bug-237403/sys/amd64/vmm/io/vlapic.c
user/ngie/bug-237403/sys/amd64/vmm/vmm.c
user/ngie/bug-237403/sys/amd64/vmm/vmm_dev.c
user/ngie/bug-237403/sys/amd64/vmm/vmm_lapic.c
user/ngie/bug-237403/sys/amd64/vmm/vmm_stat.c
user/ngie/bug-237403/sys/arm/allwinner/a10/a10_padconf.c
user/ngie/bug-237403/sys/arm/allwinner/aw_rsb.c
user/ngie/bug-237403/sys/arm/allwinner/aw_rtc.c
user/ngie/bug-237403/sys/arm/allwinner/aw_sid.c
user/ngie/bug-237403/sys/arm/allwinner/aw_syscon.c
user/ngie/bug-237403/sys/arm/allwinner/aw_thermal.c
user/ngie/bug-237403/sys/arm/allwinner/axp81x.c
user/ngie/bug-237403/sys/arm/allwinner/clkng/ccu_de2.c
user/ngie/bug-237403/sys/arm/allwinner/if_awg.c
user/ngie/bug-237403/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_pool.c
user/ngie/bug-237403/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/range_tree.h
user/ngie/bug-237403/sys/compat/freebsd32/freebsd32_systrace_args.c
user/ngie/bug-237403/sys/compat/linuxkpi/common/include/linux/device.h
user/ngie/bug-237403/sys/compat/linuxkpi/common/include/linux/dma-mapping.h
user/ngie/bug-237403/sys/compat/linuxkpi/common/include/linux/dmapool.h
user/ngie/bug-237403/sys/compat/linuxkpi/common/include/linux/pci.h
user/ngie/bug-237403/sys/compat/linuxkpi/common/include/linux/scatterlist.h
user/ngie/bug-237403/sys/compat/linuxkpi/common/src/linux_compat.c
user/ngie/bug-237403/sys/compat/linuxkpi/common/src/linux_pci.c
user/ngie/bug-237403/sys/conf/files.powerpc
user/ngie/bug-237403/sys/contrib/ipfilter/netinet/ip_fil_freebsd.c
user/ngie/bug-237403/sys/dev/acpi_support/acpi_ibm.c
user/ngie/bug-237403/sys/dev/altera/atse/if_atse.c
user/ngie/bug-237403/sys/dev/altera/softdma/softdma.c
user/ngie/bug-237403/sys/dev/cadence/if_cgem.c
user/ngie/bug-237403/sys/dev/cxgbe/crypto/t4_crypto.c
user/ngie/bug-237403/sys/dev/cxgbe/crypto/t4_crypto.h
user/ngie/bug-237403/sys/dev/cxgbe/t4_sge.c
user/ngie/bug-237403/sys/dev/gpio/gpioc.c
user/ngie/bug-237403/sys/dev/isp/isp_pci.c
user/ngie/bug-237403/sys/dev/mlx5/mlx5_en/mlx5_en_rx.c
user/ngie/bug-237403/sys/dev/uart/uart_cpu_arm64.c
user/ngie/bug-237403/sys/dev/xdma/xdma.h
user/ngie/bug-237403/sys/dev/xdma/xdma_mbuf.c
user/ngie/bug-237403/sys/dev/xdma/xdma_sg.c
user/ngie/bug-237403/sys/geom/geom_dev.c
user/ngie/bug-237403/sys/kern/kern_sig.c
user/ngie/bug-237403/sys/kern/kern_thread.c
user/ngie/bug-237403/sys/kern/systrace_args.c
user/ngie/bug-237403/sys/kern/uipc_mbuf.c
user/ngie/bug-237403/sys/kern/vfs_bio.c
user/ngie/bug-237403/sys/modules/allwinner/Makefile
user/ngie/bug-237403/sys/modules/fusefs/Makefile
user/ngie/bug-237403/sys/modules/if_gre/Makefile
user/ngie/bug-237403/sys/net/if_gre.c
user/ngie/bug-237403/sys/net/if_gre.h
user/ngie/bug-237403/sys/net/if_tap.c
user/ngie/bug-237403/sys/net/if_tun.c
user/ngie/bug-237403/sys/net/iflib.c
user/ngie/bug-237403/sys/netinet/in_mcast.c
user/ngie/bug-237403/sys/netinet/in_pcb.c
user/ngie/bug-237403/sys/netinet/in_pcb.h
user/ngie/bug-237403/sys/netinet/ip_gre.c
user/ngie/bug-237403/sys/netinet/ip_output.c
user/ngie/bug-237403/sys/netinet/tcp_syncache.c
user/ngie/bug-237403/sys/netinet6/ip6_gre.c
user/ngie/bug-237403/sys/netinet6/ip6_output.c
user/ngie/bug-237403/sys/netpfil/ipfw/ip_fw2.c
user/ngie/bug-237403/sys/opencrypto/cbc_mac.c
user/ngie/bug-237403/sys/powerpc/aim/aim_machdep.c
user/ngie/bug-237403/sys/powerpc/aim/mp_cpudep.c
user/ngie/bug-237403/sys/powerpc/conf/GENERIC64
user/ngie/bug-237403/sys/powerpc/include/cpu.h
user/ngie/bug-237403/sys/powerpc/include/pcb.h
user/ngie/bug-237403/sys/powerpc/include/spr.h
user/ngie/bug-237403/sys/powerpc/powernv/opal_dev.c
user/ngie/bug-237403/sys/powerpc/powerpc/cpu.c
user/ngie/bug-237403/sys/powerpc/powerpc/exec_machdep.c
user/ngie/bug-237403/sys/powerpc/powerpc/genassym.c
user/ngie/bug-237403/sys/powerpc/powerpc/swtch32.S
user/ngie/bug-237403/sys/powerpc/powerpc/swtch64.S
user/ngie/bug-237403/sys/powerpc/powerpc/trap.c
user/ngie/bug-237403/sys/riscv/riscv/plic.c
user/ngie/bug-237403/sys/sys/param.h
user/ngie/bug-237403/sys/sys/proc.h
user/ngie/bug-237403/sys/x86/x86/busdma_bounce.c
user/ngie/bug-237403/sys/x86/x86/mp_x86.c
user/ngie/bug-237403/tests/sys/opencrypto/cryptodev.py
user/ngie/bug-237403/tests/sys/opencrypto/cryptotest.py
user/ngie/bug-237403/tools/boot/ci-qemu-test.sh
user/ngie/bug-237403/tools/boot/install-boot.sh
user/ngie/bug-237403/tools/boot/rootgen.sh
user/ngie/bug-237403/tools/regression/fsx/fsx.c
user/ngie/bug-237403/usr.sbin/bhyve/acpi.c
user/ngie/bug-237403/usr.sbin/bhyve/bhyverun.h
user/ngie/bug-237403/usr.sbin/bhyve/smbiostbl.c
user/ngie/bug-237403/usr.sbin/bsdinstall/scripts/netconfig_ipv4
user/ngie/bug-237403/usr.sbin/nfsdumpstate/nfsdumpstate.c
user/ngie/bug-237403/usr.sbin/pkg/Makefile
Directory Properties:
user/ngie/bug-237403/ (props changed)
user/ngie/bug-237403/cddl/ (props changed)
user/ngie/bug-237403/cddl/contrib/opensolaris/ (props changed)
user/ngie/bug-237403/sys/cddl/contrib/opensolaris/ (props changed)
user/ngie/bug-237403/sys/contrib/ipfilter/ (props changed)
Modified: user/ngie/bug-237403/MAINTAINERS
==============================================================================
--- user/ngie/bug-237403/MAINTAINERS Mon Apr 29 20:19:21 2019 (r346925)
+++ user/ngie/bug-237403/MAINTAINERS Mon Apr 29 20:21:38 2019 (r346926)
@@ -35,17 +35,19 @@ makes a commit to the specified subtree.
subsystem login notes
-----------------------------
-atf freebsd-testing,jmmv,ngie Pre-commit review requested.
ath(4) adrian Pre-commit review requested, send to freebsd-wireless at freebsd.org
+contrib/atf ngie,#test Pre-commit review requested.
+contrib/capsicum-test ngie,#capsicum,#test Pre-commit review requested.
contrib/compiler-rt dim Pre-commit review preferred.
+contrib/googletest ngie,#test Pre-commit review requested.
contrib/ipfilter cy Pre-commit review requested.
contrib/libc++ dim Pre-commit review preferred.
contrib/libcxxrt dim Pre-commit review preferred.
contrib/libunwind dim,emaste,jhb Pre-commit review preferred.
contrib/llvm dim Pre-commit review preferred.
contrib/llvm/tools/lldb dim,emaste Pre-commit review preferred.
-contrib/netbsd-tests freebsd-testing,ngie Pre-commit review requested.
-contrib/pjdfstest freebsd-testing,asomers,ngie,pjd Pre-commit review requested.
+contrib/netbsd-tests ngie,#test Pre-commit review requested.
+contrib/pjdfstest asomers,ngie,pjd,#test Pre-commit review requested.
*env(3) secteam Due to the problematic security history of this
code, please have patches reviewed by secteam.
etc/mail gshapiro Pre-commit review requested. Keep in sync with -STABLE.
@@ -86,10 +88,15 @@ sh(1) jilles Pre-commit review requested. This also
to kill(1), printf(1) and test(1) which are
compiled in as builtins.
share/mk imp, bapt, bdrewery, emaste, sjg Make is hard.
-share/mk/*.test.mk freebsd-testing,ngie (same list as share/mk too) Pre-commit review requested.
+share/mk/*.test.mk imp,bapt,bdrewery, Pre-commit review requested.
+ emaste,ngie,sjg,#test
stand/forth dteske Pre-commit review requested.
stand/lua kevans Pre-commit review requested
-sys/compat/linuxkpi hselasky If in doubt, ask.
+sys/compat/linuxkpi hselasky If in doubt, ask.
+ zeising, johalun pre-commit review requested via
+ #x11 phabricator group.
+ (to avoid drm graphics drivers
+ impact)
sys/contrib/ipfilter cy Pre-commit review requested.
sys/dev/e1000 erj Pre-commit phabricator review requested.
sys/dev/ixgbe erj Pre-commit phabricator review requested.
@@ -101,7 +108,7 @@ sys/netinet/ip_carp.c glebius Pre-commit review recomm
sys/netpfil/pf kp,glebius Pre-commit review recommended.
sys/x86/xen royger Pre-commit review recommended.
sys/xen royger Pre-commit review recommended.
-tests freebsd-testing,ngie Pre-commit review requested.
+tests ngie,#test Pre-commit review requested.
tools/build imp Pre-commit review requested, especially to fix bootstrap issues.
top(1) eadler Pre-commit review requested.
usr.sbin/bsdconfig dteske Pre-commit phabricator review requested.
Modified: user/ngie/bug-237403/bin/date/date.1
==============================================================================
--- user/ngie/bug-237403/bin/date/date.1 Mon Apr 29 20:19:21 2019 (r346925)
+++ user/ngie/bug-237403/bin/date/date.1 Mon Apr 29 20:21:38 2019 (r346926)
@@ -32,7 +32,7 @@
.\" @(#)date.1 8.3 (Berkeley) 4/28/95
.\" $FreeBSD$
.\"
-.Dd March 20, 2019
+.Dd April 23, 2019
.Dt DATE 1
.Os
.Sh NAME
@@ -40,7 +40,7 @@
.Nd display or set date and time
.Sh SYNOPSIS
.Nm
-.Op Fl jRu
+.Op Fl jnRu
.Op Fl r Ar seconds | Ar filename
.Oo
.Fl v
@@ -142,6 +142,8 @@ This allows you to use the
flag in addition to the
.Cm +
option to convert one date format to another.
+.It Fl n
+Obsolete flag, accepted and ignored for compatibility.
.It Fl R
Use RFC 2822 date and time output format.
This is equivalent to using
Modified: user/ngie/bug-237403/bin/date/date.c
==============================================================================
--- user/ngie/bug-237403/bin/date/date.c Mon Apr 29 20:19:21 2019 (r346925)
+++ user/ngie/bug-237403/bin/date/date.c Mon Apr 29 20:21:38 2019 (r346926)
@@ -108,7 +108,7 @@ main(int argc, char *argv[])
(void) setlocale(LC_TIME, "");
rflag = 0;
Iflag = jflag = Rflag = 0;
- while ((ch = getopt(argc, argv, "f:I::jRr:uv:")) != -1)
+ while ((ch = getopt(argc, argv, "f:I::jnRr:uv:")) != -1)
switch((char)ch) {
case 'f':
fmt = optarg;
@@ -131,6 +131,8 @@ main(int argc, char *argv[])
break;
case 'j':
jflag = 1; /* don't set time */
+ break;
+ case 'n':
break;
case 'R': /* RFC 2822 datetime format */
if (Iflag)
Modified: user/ngie/bug-237403/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/ip/tst.ipv4localsctp.ksh
==============================================================================
--- user/ngie/bug-237403/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/ip/tst.ipv4localsctp.ksh Mon Apr 29 20:19:21 2019 (r346925)
+++ user/ngie/bug-237403/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/ip/tst.ipv4localsctp.ksh Mon Apr 29 20:21:38 2019 (r346926)
@@ -58,36 +58,52 @@ DIR=/var/tmp/dtest.$$
sctpport=1024
bound=5000
-while [ $sctpport -lt $bound ]; do
- ncat --sctp -z $local $sctpport > /dev/null || break
- sctpport=$(($sctpport + 1))
-done
-if [ $sctpport -eq $bound ]; then
- echo "couldn't find an available SCTP port"
- exit 1
-fi
mkdir $DIR
cd $DIR
-# ncat will exit when the association is closed.
-ncat --sctp --listen $local $sctpport &
-
-cat > test.pl <<-EOPERL
+cat > client.pl <<-EOPERL
use IO::Socket;
my \$s = IO::Socket::INET->new(
Type => SOCK_STREAM,
Proto => "sctp",
LocalAddr => "$local",
PeerAddr => "$local",
- PeerPort => $sctpport,
+ PeerPort => \$ARGV[0],
Timeout => 3);
- die "Could not connect to host $local port $sctpport \$@" unless \$s;
+ die "Could not connect to host $local port \$ARGV[0] \$@" unless \$s;
close \$s;
- sleep(2);
+ sleep(\$ARGV[1]);
EOPERL
-$dtrace -c 'perl test.pl' -qs /dev/stdin <<EODTRACE
+while [ $sctpport -lt $bound ]; do
+ perl client.pl $sctpport 0 2>&- || break
+ sctpport=$(($sctpport + 1))
+done
+if [ $sctpport -eq $bound ]; then
+ echo "couldn't find an available SCTP port"
+ exit 1
+fi
+
+cat > server.pl <<-EOPERL
+ use IO::Socket;
+ my \$l = IO::Socket::INET->new(
+ Type => SOCK_STREAM,
+ Proto => "sctp",
+ LocalAddr => "$local",
+ LocalPort => $sctpport,
+ Listen => 1,
+ Reuse => 1);
+ die "Could not listen on $local port $sctpport \$@" unless \$l;
+ my \$c = \$l->accept();
+ close \$l;
+ while (<\$c>) {};
+ close \$c;
+EOPERL
+
+perl server.pl &
+
+$dtrace -c "perl client.pl $sctpport 2" -qs /dev/stdin <<EODTRACE
BEGIN
{
ipsend = sctpsend = ipreceive = sctpreceive = 0;
@@ -122,10 +138,10 @@ sctp:::receive
END
{
printf("Minimum SCTP events seen\n\n");
- printf("ip:::send (%d) - %s\n", ipsend, ipsend >= 7 ? "yes" : "no");
- printf("ip:::receive (%d) - %s\n", ipreceive, ipreceive >= 7 ? "yes" : "no");
- printf("sctp:::send (%d) - %s\n", sctpsend, sctpsend >= 7 ? "yes" : "no");
- printf("sctp:::receive (%d) - %s\n", sctpreceive, sctpreceive >= 7 ? "yes" : "no");
+ printf("ip:::send - %s\n", ipsend >= 7 ? "yes" : "no");
+ printf("ip:::receive - %s\n", ipreceive >= 7 ? "yes" : "no");
+ printf("sctp:::send - %s\n", sctpsend >= 7 ? "yes" : "no");
+ printf("sctp:::receive - %s\n", sctpreceive >= 7 ? "yes" : "no");
}
EODTRACE
Modified: user/ngie/bug-237403/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/ip/tst.localsctpstate.ksh
==============================================================================
--- user/ngie/bug-237403/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/ip/tst.localsctpstate.ksh Mon Apr 29 20:19:21 2019 (r346925)
+++ user/ngie/bug-237403/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/ip/tst.localsctpstate.ksh Mon Apr 29 20:21:38 2019 (r346926)
@@ -61,36 +61,52 @@ DIR=/var/tmp/dtest.$$
sctpport=1024
bound=5000
-while [ $sctpport -lt $bound ]; do
- ncat --sctp -z $local $sctpport > /dev/null || break
- sctpport=$(($sctpport + 1))
-done
-if [ $sctpport -eq $bound ]; then
- echo "couldn't find an available SCTP port"
- exit 1
-fi
mkdir $DIR
cd $DIR
-# ncat will exit when the association is closed.
-ncat --sctp --listen $local $sctpport &
-
-cat > test.pl <<-EOPERL
+cat > client.pl <<-EOPERL
use IO::Socket;
my \$s = IO::Socket::INET->new(
Type => SOCK_STREAM,
Proto => "sctp",
LocalAddr => "$local",
PeerAddr => "$local",
- PeerPort => $sctpport,
+ PeerPort => \$ARGV[0],
Timeout => 3);
- die "Could not connect to host $local port $sctpport \$@" unless \$s;
+ die "Could not connect to host $local port \$ARGV[0] \$@" unless \$s;
close \$s;
- sleep(2);
+ sleep(\$ARGV[1]);
EOPERL
-$dtrace -c 'perl test.pl' -qs /dev/stdin <<EODTRACE
+while [ $sctpport -lt $bound ]; do
+ perl client.pl $sctpport 0 2>&- || break
+ sctpport=$(($sctpport + 1))
+done
+if [ $sctpport -eq $bound ]; then
+ echo "couldn't find an available SCTP port"
+ exit 1
+fi
+
+cat > server.pl <<-EOPERL
+ use IO::Socket;
+ my \$l = IO::Socket::INET->new(
+ Type => SOCK_STREAM,
+ Proto => "sctp",
+ LocalAddr => "$local",
+ LocalPort => $sctpport,
+ Listen => 1,
+ Reuse => 1);
+ die "Could not listen on $local port $sctpport \$@" unless \$l;
+ my \$c = \$l->accept();
+ close \$l;
+ while (<\$c>) {};
+ close \$c;
+EOPERL
+
+perl server.pl &
+
+$dtrace -c "perl client.pl $sctpport 2" -qs /dev/stdin <<EODTRACE
BEGIN
{
ipsend = sctpsend = ipreceive = sctpreceive = 0;
Modified: user/ngie/bug-237403/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/ip/tst.localsctpstate.ksh.out
==============================================================================
--- user/ngie/bug-237403/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/ip/tst.localsctpstate.ksh.out Mon Apr 29 20:19:21 2019 (r346925)
+++ user/ngie/bug-237403/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/ip/tst.localsctpstate.ksh.out Mon Apr 29 20:21:38 2019 (r346926)
@@ -10,3 +10,4 @@ sctp:::state-change to established - yes
sctp:::state-change to shutdown-sent - yes
sctp:::state-change to shutdown-received - yes
sctp:::state-change to shutdown-ack-sent - yes
+
Modified: user/ngie/bug-237403/etc/mtree/BSD.sendmail.dist
==============================================================================
--- user/ngie/bug-237403/etc/mtree/BSD.sendmail.dist Mon Apr 29 20:19:21 2019 (r346925)
+++ user/ngie/bug-237403/etc/mtree/BSD.sendmail.dist Mon Apr 29 20:21:38 2019 (r346926)
@@ -6,7 +6,7 @@
/set type=dir uname=root gname=wheel mode=0755
. nochange
var nochange
- spool nochange
+ spool nochange tags=package=runtime
clientmqueue uname=smmsp gname=smmsp mode=0770
..
..
Modified: user/ngie/bug-237403/etc/mtree/BSD.usr.dist
==============================================================================
--- user/ngie/bug-237403/etc/mtree/BSD.usr.dist Mon Apr 29 20:19:21 2019 (r346925)
+++ user/ngie/bug-237403/etc/mtree/BSD.usr.dist Mon Apr 29 20:21:38 2019 (r346926)
@@ -428,9 +428,9 @@
..
keys
pkg
- revoked
+ revoked tags=package=runtime
..
- trusted
+ trusted tags=package=runtime
..
..
..
Modified: user/ngie/bug-237403/etc/mtree/BSD.var.dist
==============================================================================
--- user/ngie/bug-237403/etc/mtree/BSD.var.dist Mon Apr 29 20:19:21 2019 (r346925)
+++ user/ngie/bug-237403/etc/mtree/BSD.var.dist Mon Apr 29 20:21:38 2019 (r346926)
@@ -32,7 +32,7 @@
..
crash
..
- cron
+ cron tags=package=runtime
tabs mode=0700
..
..
@@ -59,21 +59,21 @@
..
..
..
- empty mode=0555 flags=schg
+ empty mode=0555 flags=schg tags=package=runtime
..
games gname=games mode=0775
..
heimdal mode=0700
..
- log
+ log tags=package=runtime
..
- mail gname=mail mode=0775
+ mail gname=mail mode=0775 tags=package=runtime
..
msgs uname=daemon
..
preserve
..
- run
+ run tags=package=runtime
dhclient
..
ppp gname=network mode=0770
@@ -101,7 +101,7 @@
..
/set gname=wheel
..
- tmp mode=01777
+ tmp mode=01777 tags=package=runtime
vi.recover mode=01777
..
..
Modified: user/ngie/bug-237403/lib/libbe/Makefile
==============================================================================
--- user/ngie/bug-237403/lib/libbe/Makefile Mon Apr 29 20:19:21 2019 (r346925)
+++ user/ngie/bug-237403/lib/libbe/Makefile Mon Apr 29 20:21:38 2019 (r346926)
@@ -1,10 +1,11 @@
# $FreeBSD$
+SHLIBDIR?= /lib
+
.include <src.opts.mk>
PACKAGE= lib${LIB}
LIB= be
-SHLIBDIR?= /lib
SHLIB_MAJOR= 1
SHLIB_MINOR= 0
Modified: user/ngie/bug-237403/lib/libbe/be.c
==============================================================================
--- user/ngie/bug-237403/lib/libbe/be.c Mon Apr 29 20:19:21 2019 (r346925)
+++ user/ngie/bug-237403/lib/libbe/be.c Mon Apr 29 20:21:38 2019 (r346926)
@@ -431,8 +431,12 @@ be_deep_clone_prop(int prop, void *cb)
/* Just continue if we fail to read a property */
return (ZPROP_CONT);
- /* Only copy locally defined properties */
- if (src != ZPROP_SRC_LOCAL)
+ /*
+ * Only copy locally defined or received properties. This continues
+ * to avoid temporary/default/local properties intentionally without
+ * breaking received datasets.
+ */
+ if (src != ZPROP_SRC_LOCAL && src != ZPROP_SRC_RECEIVED)
return (ZPROP_CONT);
/* Augment mountpoint with altroot, if needed */
Modified: user/ngie/bug-237403/lib/libc/gen/Makefile.inc
==============================================================================
--- user/ngie/bug-237403/lib/libc/gen/Makefile.inc Mon Apr 29 20:19:21 2019 (r346925)
+++ user/ngie/bug-237403/lib/libc/gen/Makefile.inc Mon Apr 29 20:21:38 2019 (r346926)
@@ -193,6 +193,7 @@ SYM_MAPS+=${LIBC_SRCTOP}/gen/Symbol.map
MAN+= alarm.3 \
arc4random.3 \
+ auxv.3 \
basename.3 \
cap_rights_get.3 \
cap_sandboxed.3 \
@@ -321,6 +322,7 @@ MAN+= alarm.3 \
MLINKS+=arc4random.3 arc4random_buf.3 \
arc4random.3 arc4random_uniform.3
+MLINKS+=auxv.3 elf_aux_info.3
MLINKS+=ctermid.3 ctermid_r.3
MLINKS+=devname.3 devname_r.3
MLINKS+=devname.3 fdevname.3
Copied: user/ngie/bug-237403/lib/libc/gen/auxv.3 (from r346925, head/lib/libc/gen/auxv.3)
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ user/ngie/bug-237403/lib/libc/gen/auxv.3 Mon Apr 29 20:21:38 2019 (r346926, copy of r346925, head/lib/libc/gen/auxv.3)
@@ -0,0 +1,86 @@
+.\"
+.\" Copyright (c) 2019 Ian Lepore <ian at freebsd.org>
+.\"
+.\" Redistribution and use in source and binary forms, with or without
+.\" modification, are permitted provided that the following conditions
+.\" are met:
+.\"
+.\" 1. Redistributions of source code must retain the above copyright
+.\" notice, this list of conditions and the following disclaimer.
+.\" 2. Redistributions in binary form must reproduce the above copyright
+.\" notice, this list of conditions and the following disclaimer in the
+.\" documentation and/or other materials provided with the distribution.
+.\"
+.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
+.\" IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+.\" OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
+.\" IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
+.\" INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+.\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+.\" DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+.\" THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+.\" (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$
+.\"
+.Dd April 25, 2019
+.Dt ELF_AUX_INFO 3
+.Os
+.Sh NAME
+.Nm elf_aux_info
+.Nd extract data from the elf auxiliary vector of the current process
+.Sh LIBRARY
+.Lb libc
+.Sh SYNOPSIS
+.In sys/auxv.h
+.Ft int
+.Fn elf_aux_info "int aux" "void *buf" "int buflen"
+.Sh DESCRIPTION
+The
+.Fn elf_aux_info
+function retrieves the auxiliary info vector requested in
+.Va aux .
+The information is stored into the provided buffer if it will fit.
+The following values, defined in
+.In sys/elf_common.h
+can be requested:
+.Bl -tag -width AT_OSRELDATE
+.It AT_CANARY
+The canary value for SSP.
+.It AT_HWCAP
+CPU / hardware feature flags.
+.It AT_HWCAP2
+CPU / hardware feature flags.
+.It AT_NCPUS
+Number of CPUs.
+.It AT_OSRELDATE
+Kernel OSRELDATE.
+.It AT_PAGESIZES
+Vector of page sizes.
+.It AT_PAGESZ
+Page size in bytes.
+.It AT_TIMEKEEP
+Pointer to VDSO timehands (for library internal use).
+.El
+.Sh RETURN VALUES
+Returns zero on success, or an error number on failure.
+.Sh ERRORS
+.Bl -tag -width Er
+.It Bq Er EINVAL
+An unknown item was requested.
+.It Bq Er EINVAL
+The provided buffer was not the right size for the requested item.
+.It Bq Er ENOENT
+The requested item is not available.
+.El
+.Sh HISTORY
+The
+.Fn elf_aux_info
+function appeared in
+.Fx 12.0 .
+.Sh BUGS
+Only a small subset of available auxiliary info vector items are
+accessible with this function.
+Some items require a "right-sized" buffer while others just require a
+"big enough" buffer.
Modified: user/ngie/bug-237403/lib/libvgl/bitmap.c
==============================================================================
--- user/ngie/bug-237403/lib/libvgl/bitmap.c Mon Apr 29 20:19:21 2019 (r346925)
+++ user/ngie/bug-237403/lib/libvgl/bitmap.c Mon Apr 29 20:21:38 2019 (r346926)
@@ -167,8 +167,17 @@ int
__VGLBitmapCopy(VGLBitmap *src, int srcx, int srcy,
VGLBitmap *dst, int dstx, int dsty, int width, int hight)
{
- int srcline, dstline, yend, yextra, ystep;
-
+ byte *buffer, *p;
+ int mousemerge, srcline, dstline, yend, yextra, ystep;
+
+ mousemerge = 0;
+ if (hight < 0) {
+ hight = -hight;
+ mousemerge = (dst == VGLDisplay &&
+ VGLMouseOverlap(dstx, dsty, width, hight));
+ if (mousemerge)
+ buffer = alloca(width*src->PixelBytes);
+ }
if (srcx>src->VXsize || srcy>src->VYsize
|| dstx>dst->VXsize || dsty>dst->VYsize)
return -1;
@@ -198,14 +207,19 @@ __VGLBitmapCopy(VGLBitmap *src, int srcx, int srcy,
yextra = 0;
ystep = 1;
if (src->Bitmap == dst->Bitmap && srcy < dsty) {
- yend = srcy;
+ yend = srcy - 1;
yextra = hight - 1;
ystep = -1;
}
for (srcline = srcy + yextra, dstline = dsty + yextra; srcline != yend;
srcline += ystep, dstline += ystep) {
- WriteVerticalLine(dst, dstx, dstline, width,
- src->Bitmap+(srcline*src->VXsize+srcx)*dst->PixelBytes);
+ p = src->Bitmap+(srcline*src->VXsize+srcx)*dst->PixelBytes;
+ if (mousemerge && VGLMouseOverlap(dstx, dstline, width, 1)) {
+ bcopy(p, buffer, width*src->PixelBytes);
+ p = buffer;
+ VGLMouseMerge(dstx, dstline, width, p);
+ }
+ WriteVerticalLine(dst, dstx, dstline, width, p);
}
return 0;
}
@@ -216,19 +230,25 @@ VGLBitmapCopy(VGLBitmap *src, int srcx, int srcy,
{
int error;
+ if (hight < 0)
+ return -1;
if (src == VGLDisplay)
src = &VGLVDisplay;
if (src->Type != MEMBUF)
return -1; /* invalid */
if (dst == VGLDisplay) {
- VGLMouseFreeze(dstx, dsty, width, hight, 0);
+ VGLMouseFreeze();
__VGLBitmapCopy(src, srcx, srcy, &VGLVDisplay, dstx, dsty, width, hight);
+ error = __VGLBitmapCopy(src, srcx, srcy, &VGLVDisplay, dstx, dsty,
+ width, hight);
+ if (error != 0)
+ return error;
src = &VGLVDisplay;
srcx = dstx;
srcy = dsty;
} else if (dst->Type != MEMBUF)
return -1; /* invalid */
- error = __VGLBitmapCopy(src, srcx, srcy, dst, dstx, dsty, width, hight);
+ error = __VGLBitmapCopy(src, srcx, srcy, dst, dstx, dsty, width, -hight);
if (dst == VGLDisplay)
VGLMouseUnFreeze();
return error;
Modified: user/ngie/bug-237403/lib/libvgl/main.c
==============================================================================
--- user/ngie/bug-237403/lib/libvgl/main.c Mon Apr 29 20:19:21 2019 (r346925)
+++ user/ngie/bug-237403/lib/libvgl/main.c Mon Apr 29 20:21:38 2019 (r346926)
@@ -42,8 +42,6 @@ __FBSDID("$FreeBSD$");
#include <sys/consio.h>
#include "vgl.h"
-/* XXX Direct Color 24bits modes unsupported */
-
#define min(x, y) (((x) < (y)) ? (x) : (y))
#define max(x, y) (((x) > (y)) ? (x) : (y))
@@ -64,6 +62,7 @@ static unsigned int VGLCurWindow;
static int VGLInitDone = 0;
static video_info_t VGLOldModeInfo;
static vid_info_t VGLOldVInfo;
+static int VGLOldVXsize;
void
VGLEnd()
@@ -74,16 +73,19 @@ struct vt_mode smode;
if (!VGLInitDone)
return;
VGLInitDone = 0;
+ signal(SIGUSR1, SIG_IGN);
+ signal(SIGUSR2, SIG_IGN);
VGLSwitchPending = 0;
VGLAbortPending = 0;
+ VGLMouseMode(VGL_MOUSEHIDE);
- signal(SIGUSR1, SIG_IGN);
-
if (VGLMem != MAP_FAILED) {
VGLClear(VGLDisplay, 0);
munmap(VGLMem, VGLAdpInfo.va_window_size);
}
+ ioctl(0, FBIO_SETLINEWIDTH, &VGLOldVXsize);
+
if (VGLOldMode >= M_VESA_BASE)
ioctl(0, _IO('V', VGLOldMode - M_VESA_BASE), 0);
else
@@ -219,11 +221,9 @@ VGLInit(int mode)
case 2:
VGLDisplay->Type = VIDBUF16;
break;
-#if notyet
case 3:
VGLDisplay->Type = VIDBUF24;
break;
-#endif
case 4:
VGLDisplay->Type = VIDBUF32;
break;
@@ -321,6 +321,7 @@ VGLInit(int mode)
depth = VGLModeInfo.vi_depth;
if (depth == 15)
depth = 16;
+ VGLOldVXsize =
VGLDisplay->VXsize = VGLAdpInfo.va_line_width
*8/(depth/VGLModeInfo.vi_planes);
VGLDisplay->VYsize = VGLBufSize/VGLModeInfo.vi_planes/VGLAdpInfo.va_line_width;
Modified: user/ngie/bug-237403/lib/libvgl/mouse.c
==============================================================================
--- user/ngie/bug-237403/lib/libvgl/mouse.c Mon Apr 29 20:19:21 2019 (r346925)
+++ user/ngie/bug-237403/lib/libvgl/mouse.c Mon Apr 29 20:21:38 2019 (r346926)
@@ -39,57 +39,138 @@ __FBSDID("$FreeBSD$");
#include <sys/fbio.h>
#include "vgl.h"
+static void VGLMouseAction(int dummy);
+
#define BORDER 0xff /* default border -- light white in rgb 3:3:2 */
#define INTERIOR 0xa0 /* default interior -- red in rgb 3:3:2 */
+#define LARGE_MOUSE_IMG_XSIZE 19
+#define LARGE_MOUSE_IMG_YSIZE 32
+#define SMALL_MOUSE_IMG_XSIZE 10
+#define SMALL_MOUSE_IMG_YSIZE 16
#define X 0xff /* any nonzero in And mask means part of cursor */
#define B BORDER
#define I INTERIOR
-static byte StdAndMask[MOUSE_IMG_SIZE*MOUSE_IMG_SIZE] = {
- X,X,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
- X,X,X,0,0,0,0,0,0,0,0,0,0,0,0,0,
- X,X,X,X,0,0,0,0,0,0,0,0,0,0,0,0,
- X,X,X,X,X,0,0,0,0,0,0,0,0,0,0,0,
- X,X,X,X,X,X,0,0,0,0,0,0,0,0,0,0,
- X,X,X,X,X,X,X,0,0,0,0,0,0,0,0,0,
- X,X,X,X,X,X,X,X,0,0,0,0,0,0,0,0,
- X,X,X,X,X,X,X,X,X,0,0,0,0,0,0,0,
- X,X,X,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,
+ B,I,I,I,I,I,I,I,B,0,
+ B,I,I,I,I,I,I,I,I,B,
+ B,I,I,I,I,I,B,B,B,B,
+ B,I,I,B,I,I,B,0,0,0,
+ B,I,B,0,B,I,I,B,0,0,
+ B,B,0,0,B,I,I,B,0,0,
+ 0,0,0,0,0,B,I,I,B,0,
+ 0,0,0,0,0,B,I,I,B,0,
+ 0,0,0,0,0,0,B,B,0,0,
+};
#undef X
#undef B
#undef I
-static VGLBitmap VGLMouseStdAndMask =
- VGLBITMAP_INITIALIZER(MEMBUF, MOUSE_IMG_SIZE, MOUSE_IMG_SIZE, StdAndMask);
-static VGLBitmap VGLMouseStdOrMask =
- VGLBITMAP_INITIALIZER(MEMBUF, MOUSE_IMG_SIZE, MOUSE_IMG_SIZE, StdOrMask);
+static VGLBitmap VGLMouseLargeAndMask =
+ VGLBITMAP_INITIALIZER(MEMBUF, LARGE_MOUSE_IMG_XSIZE, LARGE_MOUSE_IMG_YSIZE,
+ LargeAndMask);
+static VGLBitmap VGLMouseLargeOrMask =
+ VGLBITMAP_INITIALIZER(MEMBUF, LARGE_MOUSE_IMG_XSIZE, LARGE_MOUSE_IMG_YSIZE,
+ LargeOrMask);
+static VGLBitmap VGLMouseSmallAndMask =
+ VGLBITMAP_INITIALIZER(MEMBUF, SMALL_MOUSE_IMG_XSIZE, SMALL_MOUSE_IMG_YSIZE,
+ SmallAndMask);
+static VGLBitmap VGLMouseSmallOrMask =
+ VGLBITMAP_INITIALIZER(MEMBUF, SMALL_MOUSE_IMG_XSIZE, SMALL_MOUSE_IMG_YSIZE,
+ SmallOrMask);
static VGLBitmap *VGLMouseAndMask, *VGLMouseOrMask;
-static int VGLMouseVisible = 0;
-static int VGLMouseShown = 0;
+static int VGLMouseShown = VGL_MOUSEHIDE;
static int VGLMouseXpos = 0;
static int VGLMouseYpos = 0;
static int VGLMouseButtons = 0;
@@ -102,91 +183,44 @@ static volatile sig_atomic_t VGLMsuppressint;
VGLMouseAction(0); \
} while (0)
-void
-VGLMousePointerShow()
+int
+__VGLMouseMode(int mode)
{
- byte buf[MOUSE_IMG_SIZE*MOUSE_IMG_SIZE*4];
- VGLBitmap buffer =
- VGLBITMAP_INITIALIZER(MEMBUF, MOUSE_IMG_SIZE, MOUSE_IMG_SIZE, buf);
- byte crtcidx, crtcval, gdcidx, gdcval;
- int pos;
+ int oldmode;
- if (!VGLMouseVisible) {
- INTOFF();
- VGLMouseVisible = 1;
- if (VGLModeInfo.vi_mem_model != V_INFO_MM_DIRECT) {
- crtcidx = inb(0x3c4);
- crtcval = inb(0x3c5);
- gdcidx = inb(0x3ce);
- gdcval = inb(0x3cf);
- }
- buffer.PixelBytes = VGLDisplay->PixelBytes;
- __VGLBitmapCopy(&VGLVDisplay, VGLMouseXpos, VGLMouseYpos,
- &buffer, 0, 0, MOUSE_IMG_SIZE, MOUSE_IMG_SIZE);
- for (pos = 0; pos < MOUSE_IMG_SIZE*MOUSE_IMG_SIZE; pos++)
- if (VGLMouseAndMask->Bitmap[pos])
- bcopy(&VGLMouseOrMask->Bitmap[pos*VGLDisplay->PixelBytes],
- &buffer.Bitmap[pos*VGLDisplay->PixelBytes],
- VGLDisplay->PixelBytes);
- __VGLBitmapCopy(&buffer, 0, 0, VGLDisplay,
- VGLMouseXpos, VGLMouseYpos, MOUSE_IMG_SIZE, MOUSE_IMG_SIZE);
- if (VGLModeInfo.vi_mem_model != V_INFO_MM_DIRECT) {
- outb(0x3c4, crtcidx);
- outb(0x3c5, crtcval);
- outb(0x3ce, gdcidx);
- outb(0x3cf, gdcval);
- }
- INTON();
- }
-}
-
-void
-VGLMousePointerHide()
-{
- byte crtcidx, crtcval, gdcidx, gdcval;
-
- if (VGLMouseVisible) {
- INTOFF();
- VGLMouseVisible = 0;
- if (VGLModeInfo.vi_mem_model != V_INFO_MM_DIRECT) {
- crtcidx = inb(0x3c4);
- crtcval = inb(0x3c5);
- gdcidx = inb(0x3ce);
- gdcval = inb(0x3cf);
- }
- __VGLBitmapCopy(&VGLVDisplay, VGLMouseXpos, VGLMouseYpos, VGLDisplay,
- VGLMouseXpos, VGLMouseYpos, MOUSE_IMG_SIZE, MOUSE_IMG_SIZE);
- if (VGLModeInfo.vi_mem_model != V_INFO_MM_DIRECT) {
- outb(0x3c4, crtcidx);
- outb(0x3c5, crtcval);
- outb(0x3ce, gdcidx);
- outb(0x3cf, gdcval);
- }
- INTON();
- }
-}
-
-void
-VGLMouseMode(int mode)
-{
+ INTOFF();
+ oldmode = VGLMouseShown;
if (mode == VGL_MOUSESHOW) {
if (VGLMouseShown == VGL_MOUSEHIDE) {
- VGLMousePointerShow();
VGLMouseShown = VGL_MOUSESHOW;
+ __VGLBitmapCopy(&VGLVDisplay, VGLMouseXpos, VGLMouseYpos,
+ VGLDisplay, VGLMouseXpos, VGLMouseYpos,
+ VGLMouseAndMask->VXsize, -VGLMouseAndMask->VYsize);
}
}
else {
if (VGLMouseShown == VGL_MOUSESHOW) {
- VGLMousePointerHide();
VGLMouseShown = VGL_MOUSEHIDE;
+ __VGLBitmapCopy(&VGLVDisplay, VGLMouseXpos, VGLMouseYpos,
+ VGLDisplay, VGLMouseXpos, VGLMouseYpos,
+ VGLMouseAndMask->VXsize, VGLMouseAndMask->VYsize);
}
}
+ INTON();
+ return oldmode;
}
void
+VGLMouseMode(int mode)
+{
+ __VGLMouseMode(mode);
+}
+
+static void
VGLMouseAction(int dummy)
{
struct mouse_info mouseinfo;
+ int mousemode;
if (VGLMsuppressint) {
VGLMintpending = 1;
@@ -197,13 +231,14 @@ again:
VGLMintpending = 0;
mouseinfo.operation = MOUSE_GETINFO;
ioctl(0, CONS_MOUSECTL, &mouseinfo);
- if (VGLMouseShown == VGL_MOUSESHOW)
- VGLMousePointerHide();
- VGLMouseXpos = mouseinfo.u.data.x;
- VGLMouseYpos = mouseinfo.u.data.y;
+ if (VGLMouseXpos != mouseinfo.u.data.x ||
+ VGLMouseYpos != mouseinfo.u.data.y) {
+ mousemode = __VGLMouseMode(VGL_MOUSEHIDE);
+ VGLMouseXpos = mouseinfo.u.data.x;
+ VGLMouseYpos = mouseinfo.u.data.y;
+ __VGLMouseMode(mousemode);
+ }
VGLMouseButtons = mouseinfo.u.data.buttons;
- if (VGLMouseShown == VGL_MOUSESHOW)
- VGLMousePointerShow();
/*
* Loop to handle any new (suppressed) signals. This is INTON() without
@@ -218,9 +253,10 @@ again:
void
VGLMouseSetImage(VGLBitmap *AndMask, VGLBitmap *OrMask)
{
- if (VGLMouseShown == VGL_MOUSESHOW)
- VGLMousePointerHide();
+ int mousemode;
+ mousemode = __VGLMouseMode(VGL_MOUSEHIDE);
+
VGLMouseAndMask = AndMask;
if (VGLMouseOrMask != NULL) {
@@ -231,20 +267,23 @@ VGLMouseSetImage(VGLBitmap *AndMask, VGLBitmap *OrMask
VGLBitmapAllocateBits(VGLMouseOrMask);
VGLBitmapCvt(OrMask, VGLMouseOrMask);
- if (VGLMouseShown == VGL_MOUSESHOW)
- VGLMousePointerShow();
+ __VGLMouseMode(mousemode);
}
void
VGLMouseSetStdImage()
{
- VGLMouseSetImage(&VGLMouseStdAndMask, &VGLMouseStdOrMask);
+ if (VGLDisplay->VXsize > 800)
+ VGLMouseSetImage(&VGLMouseLargeAndMask, &VGLMouseLargeOrMask);
+ else
+ VGLMouseSetImage(&VGLMouseSmallAndMask, &VGLMouseSmallOrMask);
}
int
VGLMouseInit(int mode)
{
struct mouse_info mouseinfo;
+ VGLBitmap *ormask;
int andmask, border, error, i, interior;
switch (VGLModeInfo.vi_mem_model) {
@@ -271,9 +310,14 @@ VGLMouseInit(int mode)
border = strtoul(getenv("VGLMOUSEBORDERCOLOR"), NULL, 0);
if (getenv("VGLMOUSEINTERIORCOLOR") != NULL)
interior = strtoul(getenv("VGLMOUSEINTERIORCOLOR"), NULL, 0);
- for (i = 0; i < MOUSE_IMG_SIZE*MOUSE_IMG_SIZE; i++)
- VGLMouseStdOrMask.Bitmap[i] = VGLMouseStdOrMask.Bitmap[i] == BORDER ?
- border : VGLMouseStdOrMask.Bitmap[i] == INTERIOR ? interior : 0;
+ ormask = &VGLMouseLargeOrMask;
+ for (i = 0; i < ormask->VXsize * ormask->VYsize; i++)
+ ormask->Bitmap[i] = ormask->Bitmap[i] == BORDER ? border :
+ ormask->Bitmap[i] == INTERIOR ? interior : 0;
+ ormask = &VGLMouseSmallOrMask;
+ for (i = 0; i < ormask->VXsize * ormask->VYsize; i++)
+ ormask->Bitmap[i] = ormask->Bitmap[i] == BORDER ? border :
+ ormask->Bitmap[i] == INTERIOR ? interior : 0;
VGLMouseSetStdImage();
mouseinfo.operation = MOUSE_MODE;
mouseinfo.u.mode.signal = SIGUSR2;
@@ -316,48 +360,67 @@ VGLMouseStatus(int *x, int *y, char *buttons)
return VGLMouseShown;
}
-int
-VGLMouseFreeze(int x, int y, int width, int hight, u_long color)
+void
+VGLMouseFreeze(void)
{
- INTOFF();
- if (width > 1 || hight > 1 || (color & 0xc0000000) == 0) { /* bitmap */
- if (VGLMouseShown == 1) {
- int overlap;
+ INTOFF();
+}
- if (x > VGLMouseXpos)
- overlap = (VGLMouseXpos + MOUSE_IMG_SIZE) - x;
- else
*** DIFF OUTPUT TRUNCATED AT 1000 LINES ***
More information about the svn-src-user
mailing list