svn commit: r337680 - head/usr.bin/systat

2018-08-12 Thread Cy Schubert
Author: cy
Date: Sun Aug 12 07:47:44 2018
New Revision: 337680
URL: https://svnweb.freebsd.org/changeset/base/337680

Log:
  Chasing r337661, fix systat after arc accounting change.

Modified:
  head/usr.bin/systat/main.c

Modified: head/usr.bin/systat/main.c
==
--- head/usr.bin/systat/main.c  Sun Aug 12 03:36:09 2018(r337679)
+++ head/usr.bin/systat/main.c  Sun Aug 12 07:47:44 2018(r337680)
@@ -260,6 +260,7 @@ labels(void)
 void
 display(void)
 {
+   uint64_t arc_stat;
int i, j;
 
/* Get the load average over the last minute. */
@@ -293,7 +294,11 @@ display(void)
GETSYSCTL("vfs.zfs.anon_size", arc[3]);
GETSYSCTL("kstat.zfs.misc.arcstats.hdr_size", arc[4]);
GETSYSCTL("kstat.zfs.misc.arcstats.l2_hdr_size", arc[5]);
-   GETSYSCTL("kstat.zfs.misc.arcstats.other_size", arc[6]);
+   GETSYSCTL("kstat.zfs.misc.arcstats.bonus_size", arc[6]);
+   GETSYSCTL("kstat.zfs.misc.arcstats.dnode_size", arc_stat);
+   arc[6] += arc_stat;
+   GETSYSCTL("kstat.zfs.misc.arcstats.dbuf_size", arc_stat);
+   arc[6] += arc_stat;
wmove(wload, 0, 0); wclrtoeol(wload);
for (i = 0 ; i < nitems(arc); i++) {
if (arc[i] > 10llu * 1024 * 1024 * 1024 ) {
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r337685 - head/share/misc

2018-08-12 Thread Li-Wen Hsu
Author: lwhsu
Date: Sun Aug 12 12:58:05 2018
New Revision: 337685
URL: https://svnweb.freebsd.org/changeset/base/337685

Log:
  Adding myself to committers-src.dot
  
  Approved by:  markj (mentor)

Modified:
  head/share/misc/committers-src.dot

Modified: head/share/misc/committers-src.dot
==
--- head/share/misc/committers-src.dot  Sun Aug 12 12:11:29 2018
(r337684)
+++ head/share/misc/committers-src.dot  Sun Aug 12 12:58:05 2018
(r337685)
@@ -240,6 +240,7 @@ lidl [label="Kurt Lidl\nl...@freebsd.org\n2015/10/21"]
 loos [label="Luiz Otavio O Souza\nl...@freebsd.org\n2013/07/03"]
 lstewart [label="Lawrence Stewart\nlstew...@freebsd.org\n2008/10/06"]
 luporl [label="Leandro Lupori\nlup...@freebsd.org\n2018/05/21"]
+lwhsu [label="Li-Wen Hsu\nlw...@freebsd.org\n2018/08/09"]
 manu [label="Emmanuel Vadot\nm...@freebsd.org\n2016/04/24"]
 marcel [label="Marcel Moolenaar\nmar...@freebsd.org\n1999/07/03"]
 marius [label="Marius Strobl\nmar...@freebsd.org\n2004/04/17"]
@@ -499,6 +500,7 @@ emaste -> achim
 emaste -> bwidawsk
 emaste -> dteske
 emaste -> kevans
+emaste -> lwhsu
 emaste -> markj
 emaste -> rstone
 
@@ -684,6 +686,7 @@ marcel -> nwhitehorn
 marcel -> sjg
 
 markj -> cem
+markj -> lwhsu
 markj -> rlibby
 
 markm -> jasone
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r337686 - in head: etc etc/newsyslog.conf.d usr.sbin/newsyslog usr.sbin/newsyslog/newsyslog.conf.d

2018-08-12 Thread Brad Davis
Author: brd
Date: Sun Aug 12 13:24:53 2018
New Revision: 337686
URL: https://svnweb.freebsd.org/changeset/base/337686

Log:
  Move all the newsyslog related configs to usr.sbin/newsyslog/
  
  This is related to pkgbase and changes these to use CONFS so that these are
  tagged as config files.
  
  Approved by:  AllanJude (mentor)
  Sponsored by: Essen Hackathon
  Differential Revision:https://reviews.freebsd.org/D16694

Added:
  head/usr.sbin/newsyslog/newsyslog.conf
 - copied unchanged from r337685, head/etc/newsyslog.conf
  head/usr.sbin/newsyslog/newsyslog.conf.d/
 - copied from r337685, head/etc/newsyslog.conf.d/
Deleted:
  head/etc/newsyslog.conf
  head/etc/newsyslog.conf.d/
Modified:
  head/etc/Makefile
  head/usr.sbin/newsyslog/Makefile
  head/usr.sbin/newsyslog/newsyslog.conf.d/Makefile

Modified: head/etc/Makefile
==
--- head/etc/Makefile   Sun Aug 12 12:58:05 2018(r337685)
+++ head/etc/Makefile   Sun Aug 12 13:24:53 2018(r337686)
@@ -31,7 +31,6 @@ BIN1= crontab \
motd \
netconfig \
networks \
-   newsyslog.conf \
nsswitch.conf \
phones \
profile \
@@ -170,7 +169,6 @@ distribution:
${_+_}cd ${.CURDIR}/devd; ${MAKE} install
${_+_}cd ${.CURDIR}/gss; ${MAKE} install
${_+_}cd ${.CURDIR}/mtree; ${MAKE} install
-   ${_+_}cd ${.CURDIR}/newsyslog.conf.d; ${MAKE} install
${_+_}cd ${SRCTOP}/share/termcap; ${MAKE} etc-termcap
${_+_}cd ${.CURDIR}/syslog.d; ${MAKE} install
${_+_}cd ${SRCTOP}/usr.sbin/rmt; ${MAKE} etc-rmt

Modified: head/usr.sbin/newsyslog/Makefile
==
--- head/usr.sbin/newsyslog/MakefileSun Aug 12 12:58:05 2018
(r337685)
+++ head/usr.sbin/newsyslog/MakefileSun Aug 12 13:24:53 2018
(r337686)
@@ -2,6 +2,7 @@
 
 .include 
 
+CONFS= newsyslog.conf
 PROG=  newsyslog
 MAN=   newsyslog.8 newsyslog.conf.5
 SRCS=  newsyslog.c ptimes.c
@@ -9,5 +10,6 @@ LIBADD=sbuf
 
 HAS_TESTS=
 SUBDIR.${MK_TESTS}+= tests
+SUBDIR+=   newsyslog.conf.d
 
 .include 

Copied: head/usr.sbin/newsyslog/newsyslog.conf (from r337685, 
head/etc/newsyslog.conf)
==
--- /dev/null   00:00:00 1970   (empty, because file is newly added)
+++ head/usr.sbin/newsyslog/newsyslog.conf  Sun Aug 12 13:24:53 2018
(r337686, copy of r337685, head/etc/newsyslog.conf)
@@ -0,0 +1,35 @@
+# configuration file for newsyslog
+# $FreeBSD$
+#
+# Entries which do not specify the '/pid_file' field will cause the
+# syslogd process to be signalled when that log file is rotated.  This
+# action is only appropriate for log files which are written to by the
+# syslogd process (ie, files listed in /etc/syslog.conf).  If there
+# is no process which needs to be signalled when a given log file is
+# rotated, then the entry for that file should include the 'N' flag.
+#
+# Note: some sites will want to select more restrictive protections than the
+# defaults.  In particular, it may be desirable to switch many of the 644
+# entries to 640 or 600.  For example, some sites will consider the
+# contents of maillog, messages, and lpd-errs to be confidential.  In the
+# future, these defaults may change to more conservative ones.
+#
+# logfilename  [owner:group]mode count size when  flags 
[/pid_file] [sig_num]
+/var/log/all.log   600  7 *@T00  J
+/var/log/auth.log  600  7 1000 @0101T JC
+/var/log/console.log   600  5 1000 * J
+/var/log/cron  600  3 1000 * JC
+/var/log/daily.log 640  7 *@T00  JN
+/var/log/debug.log 600  7 1000 * JC
+/var/log/init.log  644  3 1000 * J
+/var/log/kerberos.log  600  7 1000 * J
+/var/log/maillog   640  7 *@T00  JC
+/var/log/messages  644  5 1000 @0101T JC
+/var/log/monthly.log   640  12*$M1D0 JN
+/var/log/devd.log  644  3 1000 * JC
+/var/log/security  600  101000 * JC
+/var/log/utx.log   644  3 *@01T05 B
+/var/log/weekly.log640  5 *$W6D0 JN
+
+ /etc/newsyslog.conf.d/*
+ /usr/local/etc/newsyslog.conf.d/*

Modified: head/usr.sbin/newsyslog/newsyslog.conf.d/Makefile
==
--- head/etc/newsyslog.conf.d/Makefile  Sun Aug 12 12:58:05 2018
(r337685)
+++ head/usr.sbin/newsyslog/newsyslog.conf.d/Makefile   Sun Aug 12 13:24:53 
2018(r337686)
@@ -2,36 +2,36 @@
 
 .include 
 
-BINDIR=/etc/newsyslog.conf.d
+CONFSDIR=  /etc/newsyslog.conf

svn commit: r337687 - in head: etc usr.sbin/inetd

2018-08-12 Thread Brad Davis
Author: brd
Date: Sun Aug 12 13:29:40 2018
New Revision: 337687
URL: https://svnweb.freebsd.org/changeset/base/337687

Log:
  Move inetd.conf to usr.sbin/inetd/
  
  This is pkgbase related as it uses CONFS to tag the file as a config file
  
  Approved by:  AllanJude (mentor)
  Sponsored by: Essen Hackathon
  Differential Revision:https://reviews.freebsd.org/D16693

Added:
  head/usr.sbin/inetd/inetd.conf
 - copied unchanged from r337686, head/etc/inetd.conf
Deleted:
  head/etc/inetd.conf
Modified:
  head/etc/Makefile
  head/usr.sbin/inetd/Makefile

Modified: head/etc/Makefile
==
--- head/etc/Makefile   Sun Aug 12 13:24:53 2018(r337686)
+++ head/etc/Makefile   Sun Aug 12 13:29:40 2018(r337687)
@@ -63,10 +63,6 @@ BIN1+= amd.map
 BIN1+= ftpusers
 .endif
 
-.if ${MK_INETD} != "no"
-BIN1+= inetd.conf
-.endif
-
 .if ${MK_LOCATE} != "no"
 BIN1+= ${SRCTOP}/usr.bin/locate/locate/locate.rc
 .endif

Modified: head/usr.sbin/inetd/Makefile
==
--- head/usr.sbin/inetd/MakefileSun Aug 12 13:24:53 2018
(r337686)
+++ head/usr.sbin/inetd/MakefileSun Aug 12 13:29:40 2018
(r337687)
@@ -3,6 +3,7 @@
 
 .include 
 
+CONFS= inetd.conf
 PROG=  inetd
 MAN=   inetd.8
 MLINKS=inetd.8 inetd.conf.5

Copied: head/usr.sbin/inetd/inetd.conf (from r337686, head/etc/inetd.conf)
==
--- /dev/null   00:00:00 1970   (empty, because file is newly added)
+++ head/usr.sbin/inetd/inetd.conf  Sun Aug 12 13:29:40 2018
(r337687, copy of r337686, head/etc/inetd.conf)
@@ -0,0 +1,123 @@
+# $FreeBSD$
+#
+# Internet server configuration database
+#
+# Define *both* IPv4 and IPv6 entries for dual-stack support.
+# To disable a service, comment it out by prefixing the line with '#'.
+# To enable a service, remove the '#' at the beginning of the line.
+#
+#ftp   stream  tcp nowait  root/usr/libexec/ftpd   ftpd -l
+#ftp   stream  tcp6nowait  root/usr/libexec/ftpd   ftpd -l
+#ssh   stream  tcp nowait  root/usr/sbin/sshd  sshd -i -4
+#ssh   stream  tcp6nowait  root/usr/sbin/sshd  sshd -i -6
+#telnetstream  tcp nowait  root/usr/libexec/telnetdtelnetd
+#telnetstream  tcp6nowait  root/usr/libexec/telnetdtelnetd
+#shell stream  tcp nowait  root/usr/local/sbin/rshdrshd
+#shell stream  tcp6nowait  root/usr/local/sbin/rshdrshd
+#login stream  tcp nowait  root/usr/local/sbin/rlogind rlogind
+#login stream  tcp6nowait  root/usr/local/sbin/rlogind rlogind
+#fingerstream  tcp nowait/3/10 nobody /usr/libexec/fingerd fingerd 
-k -s
+#fingerstream  tcp6nowait/3/10 nobody /usr/libexec/fingerd fingerd 
-k -s
+#
+# run comsat as root to be able to print partial mailbox contents w/ biff,
+# or use the safer tty:tty to just print that new mail has been received.
+#comsatdgram   udp waittty:tty /usr/libexec/comsat comsat
+#
+# ntalk is required for the 'talk' utility to work correctly
+#ntalk dgram   udp waittty:tty /usr/libexec/ntalkd ntalkd
+#tftp  dgram   udp waitroot/usr/libexec/tftpd  tftpd -l -s 
/tftpboot
+#tftp  dgram   udp6waitroot/usr/libexec/tftpd  tftpd -l -s 
/tftpboot
+#bootpsdgram   udp waitroot/usr/libexec/bootpd bootpd
+#
+# "Small servers" -- used to be standard on, but we're more conservative
+# about things due to Internet security concerns.  Only turn on what you
+# need.
+#
+#daytime streamtcp nowait  rootinternal
+#daytime streamtcp6nowait  rootinternal
+#daytime dgram udp waitrootinternal
+#daytime dgram udp6waitrootinternal
+#time  stream  tcp nowait  rootinternal
+#time  stream  tcp6nowait  rootinternal
+#time   dgram  udp waitrootinternal
+#time   dgram  udp6waitrootinternal
+#echo  stream  tcp nowait  rootinternal
+#echo  stream  tcp6nowait  rootinternal
+#echo  dgram   udp waitrootinternal
+#echo  dgram   udp6waitrootinternal
+#discard streamtcp nowait  rootinternal
+#discard streamtcp6nowait  rootinternal
+#discard dgram udp waitrootinternal
+#discard dgram udp6waitrootinternal
+#chargen streamtcp nowait  rootinternal
+#chargen streamtcp6nowait  rootinternal
+#chargen dgram udp waitrootinternal
+#chargen dgram udp6waitrootinternal
+#
+# CVS servers - for master CVS repositories only!  You must set the
+# --allow-root path correctly or you open a trivial to exploit but
+# deadly security hole.
+#
+#cvspserverstream  tcp nowait  root/usr/local/bin/cvs  

svn commit: r337688 - head/sys/netinet

2018-08-12 Thread Michael Tuexen
Author: tuexen
Date: Sun Aug 12 14:05:15 2018
New Revision: 337688
URL: https://svnweb.freebsd.org/changeset/base/337688

Log:
  Add explicit cast to silence a warning for the userland stack.
  
  Thanks to Felix Weinrank for providing the patch.

Modified:
  head/sys/netinet/sctp_output.c

Modified: head/sys/netinet/sctp_output.c
==
--- head/sys/netinet/sctp_output.c  Sun Aug 12 13:29:40 2018
(r337687)
+++ head/sys/netinet/sctp_output.c  Sun Aug 12 14:05:15 2018
(r337688)
@@ -4396,7 +4396,7 @@ sctp_lowlevel_chunk_output(struct sctp_inpcb *inp,
} else {
ip6h->ip6_nxt = IPPROTO_SCTP;
}
-   ip6h->ip6_plen = htons(packet_length - sizeof(struct 
ip6_hdr));
+   ip6h->ip6_plen = htons((uint16_t)(packet_length - 
sizeof(struct ip6_hdr)));
ip6h->ip6_dst = sin6->sin6_addr;
 
/*
@@ -11258,7 +11258,7 @@ sctp_send_resp_msg(struct sockaddr *src, struct sockad
 #endif
 #ifdef INET6
case AF_INET6:
-   ip6->ip6_plen = htons(len - sizeof(struct ip6_hdr));
+   ip6->ip6_plen = htons((uint16_t)(len - sizeof(struct ip6_hdr)));
if (port) {
shout->checksum = sctp_calculate_cksum(mout, 
sizeof(struct ip6_hdr) + sizeof(struct udphdr));
SCTP_STAT_INCR(sctps_sendswcrc);
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r337689 - head/sys/dev/ipmi

2018-08-12 Thread Justin Hibbits
Author: jhibbits
Date: Sun Aug 12 20:33:55 2018
New Revision: 337689
URL: https://svnweb.freebsd.org/changeset/base/337689

Log:
  ipmi/opal: Enable polled mode and proper callback
  
  Fix a NULL dereference that would occur any time an ioctl() was done, due to a
  missing ipmi_enqueue_request callback.  Just use the default for now, until we
  decide to properly enable IPMI interrupts.
  
  Reported by:  kbowling

Modified:
  head/sys/dev/ipmi/ipmi_opal.c

Modified: head/sys/dev/ipmi/ipmi_opal.c
==
--- head/sys/dev/ipmi/ipmi_opal.c   Sun Aug 12 14:05:15 2018
(r337688)
+++ head/sys/dev/ipmi/ipmi_opal.c   Sun Aug 12 20:33:55 2018
(r337689)
@@ -210,6 +210,8 @@ opal_ipmi_attach(device_t dev)
}
sc->ipmi.ipmi_startup = opal_ipmi_startup;
sc->ipmi.ipmi_driver_request = opal_ipmi_driver_request;
+   sc->ipmi.ipmi_enqueue_request = ipmi_polled_enqueue_request;
+   sc->ipmi.ipmi_driver_requests_polled = 1;
sc->ipmi.ipmi_dev = dev;
 
sc->sc_msg = malloc(sizeof(struct opal_ipmi_msg) + IPMI_MAX_RX, M_IPMI,
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r337690 - head/sys/conf

2018-08-12 Thread Matt Macy
Author: mmacy
Date: Sun Aug 12 21:04:53 2018
New Revision: 337690
URL: https://svnweb.freebsd.org/changeset/base/337690

Log:
  fix static ZFS linking
  
  Static linking of ZFS is a newish option and LINT doesn't include it

Modified:
  head/sys/conf/files

Modified: head/sys/conf/files
==
--- head/sys/conf/files Sun Aug 12 20:33:55 2018(r337689)
+++ head/sys/conf/files Sun Aug 12 21:04:53 2018(r337690)
@@ -171,6 +171,7 @@ cddl/contrib/opensolaris/uts/common/fs/zfs/bptree.c 

 cddl/contrib/opensolaris/uts/common/fs/zfs/bqueue.c
optional zfs compile-with "${ZFS_C}"
 cddl/contrib/opensolaris/uts/common/fs/zfs/cityhash.c  
optional zfs compile-with "${ZFS_C}"
 cddl/contrib/opensolaris/uts/common/fs/zfs/dbuf.c  
optional zfs compile-with "${ZFS_C}"
+cddl/contrib/opensolaris/uts/common/fs/zfs/dbuf_stats.c
optional zfs compile-with "${ZFS_C}"
 cddl/contrib/opensolaris/uts/common/fs/zfs/ddt.c   
optional zfs compile-with "${ZFS_C}"
 cddl/contrib/opensolaris/uts/common/fs/zfs/ddt_zap.c   
optional zfs compile-with "${ZFS_C}"
 cddl/contrib/opensolaris/uts/common/fs/zfs/dmu.c   
optional zfs compile-with "${ZFS_C}"
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


Re: svn commit: r337535 - head/sbin/init

2018-08-12 Thread Conrad Meyer
Then maybe don’t keep bringing it up? Especially when it’s totally
irrelevant, like here.  FreeBSD has certain assumptions of supported
platforms beyond the guarantees of standard C that have nothing whatsoever
to do with the boogeyman of a patched compiler.

On Thu, Aug 9, 2018 at 2:42 PM Benjamin Kaduk  wrote:

> On Thu, Aug 9, 2018 at 11:03 AM, Conrad Meyer  wrote:
>
>> On Thu, Aug 9, 2018 at 5:52 AM, Benjamin Kaduk  wrote:
>> > On Thu, Aug 9, 2018 at 7:17 AM, Edward Tomasz Napierala <
>> tr...@freebsd.org>
>> > wrote:
>> >>   Use NULLs instead of casted zeroes, for consistency.
>> >
>> > It's probably helpful to note explicitly that these are not in
>> arguments to
>> > varargs functions,
>>
>> I don't think it's helpful.
>>
>> > in which case the explicit cast is needed in order to produce a program
>> that
>> > will have
>> > correct behavior on all compliant compilers/systems.
>>
>> Here "compliant" means "minimally compliant to the C standard."  Use
>> of NULL in varargs is functionally correct on all FreeBSD systems.
>>
>> >  (We do define NULL to
>> > be a zero-with-cast,
>> > but programs
>>
>> (Ones that care about portability to weird systems.)  I don't think
>> BSD's 500 line init — hyper local to FreeBSD — is a strong candidate
>> for portability.
>>
>> > should not assume that NULL will be of pointer type -- "An
>> > integer constant
>> > expression with the value 0, or such an expression cast to type void *,
>> is
>> > called a null pointer constant".)
>>
>> Right.  The problem only arises when both conditions are met:
>>
>> 1. The system's varargs representation is smaller than the pointer
>> representation, and
>> 2. The runtime headers do not defined NULL as a pointer-typed value.
>> (3. The function being invoked is actually varargs?)
>>
>> Neither is true on FreeBSD and v7-style init is not a useful place to
>> call for portability.
>>
>
> I don't really feel a need to continue the discussion that was already
> started in response
> to  r336835 (in addition to the current thread), so I'll limit myself to
> asking whether we
> want to be writing standard C or a FreeBSD-specific dialect of C.  My
> understanding was
> that we had some experience with the latter (e.g., heavy patching of the
> compiler) and
> it ended up with us in a bad place, which would tend to support writing
> standard C or
> as close to it as we can.  (Yes, I know that we have non-standard printf
> specifiers and the like.)
>
> -Ben
>
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


Re: svn commit: r337554 - in head/sys/cam: . ata nvme scsi

2018-08-12 Thread Conrad Meyer
I had two functional changes in mind for after this part (which I hoped
would be non controversial) that you would be included on the review.
Markj pointed me at the related D15592.  I’m not sure that approach was the
correct one and hope to continue discussion there.  Once that’s reached
consensus, I may need to revisit my subsequent change.  If it ends up that
ultimately this particular patch isn’t used, backing it out is trivial.
Until then, it’s pretty harmless.

Thanks,
Conrad

On Thu, Aug 9, 2018 at 2:56 PM Scott Long  wrote:

>
>
> > On Aug 9, 2018, at 3:53 PM, Conrad Meyer  wrote:
> >
> > Author: cem
> > Date: Thu Aug  9 21:53:32 2018
> > New Revision: 337554
> > URL: https://svnweb.freebsd.org/changeset/base/337554
> >
> > Log:
> >  cam(4): Add an xpt-neutral flag indicating a valid panic CCB
> >
> >  No functional change.
> >
> >  Note that this change is careful to set the CCB header xflags after
> >  foo_fill_bar() routines, which generally zero existing flags.  An
> earlier
> >  version of this patch mistakenly set the flag before the fill routines.
> >
> >  Submitted by:Scott Ferris , jhibbits@
> >  Reviewed by: bdrewery@, markj@, and non-committer FreeBSD contributor
> Anton Rang
> >  Sponsored by:Dell EMC Isilon
>
> What’s the purpose of this flag?  I see it gets set in plenty of places,
> but never checked.
>
> Scott
>
>
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r337696 - in head: cddl/lib/libnvpair cddl/lib/libzfs_core include

2018-08-12 Thread Kyle Evans
Author: kevans
Date: Mon Aug 13 03:38:32 2018
New Revision: 337696
URL: https://svnweb.freebsd.org/changeset/base/337696

Log:
  Use INCS for non-sys/ libnvpair and libzfs_core includes
  
  While nothing was wrong with libnvpair.h, libzfs_core.h was only guarded by
  MK_CDDL rather than MK_CDDL && MK_ZFS. Rather than ugl'if'ying
  include/Makefile to impose the extra restriction, just move the non-sys/
  includes into INCS with the respect lib builds.
  
  This has the added bonus of allowing third party packagers to try and split
  these libs out of the FreeBSD-runtime package, if they are so inclined.
  
  The sys/ include was left alone- generally userland libraries shouldn't
  install kernel headers.
  
  MFC after:1 week

Modified:
  head/cddl/lib/libnvpair/Makefile
  head/cddl/lib/libzfs_core/Makefile
  head/include/Makefile

Modified: head/cddl/lib/libnvpair/Makefile
==
--- head/cddl/lib/libnvpair/MakefileSun Aug 12 22:07:13 2018
(r337695)
+++ head/cddl/lib/libnvpair/MakefileMon Aug 13 03:38:32 2018
(r337696)
@@ -5,6 +5,7 @@
 
 LIB=   nvpair
 
+INCS=  libnvpair.h
 SRCS=  libnvpair.c \
nvpair_alloc_system.c \
nvpair_json.c \

Modified: head/cddl/lib/libzfs_core/Makefile
==
--- head/cddl/lib/libzfs_core/Makefile  Sun Aug 12 22:07:13 2018
(r337695)
+++ head/cddl/lib/libzfs_core/Makefile  Mon Aug 13 03:38:32 2018
(r337696)
@@ -9,6 +9,7 @@
 LIB=   zfs_core
 LIBADD=nvpair
 
+INCS=  libzfs_core.h
 SRCS=  libzfs_core.c \
libzfs_core_compat.c \
zfs_ioctl_compat.c

Modified: head/include/Makefile
==
--- head/include/Makefile   Sun Aug 12 22:07:13 2018(r337695)
+++ head/include/Makefile   Mon Aug 13 03:38:32 2018(r337696)
@@ -246,12 +246,6 @@ copies: .PHONY .META
${INSTALL} -C ${TAG_ARGS} -o ${BINOWN} -g ${BINGRP} -m 444 teken.h \
${SDESTDIR}${INCLUDEDIR}/teken
 .if ${MK_CDDL} != "no"
-   cd ${SRCTOP}/cddl/contrib/opensolaris/lib/libzfs_core/common; \
-   ${INSTALL} -C ${TAG_ARGS} -o ${BINOWN} -g ${BINGRP} -m 444 
libzfs_core.h \
-   ${SDESTDIR}${INCLUDEDIR}
-   cd ${SRCTOP}/cddl/contrib/opensolaris/lib/libnvpair; \
-   ${INSTALL} -C ${TAG_ARGS} -o ${BINOWN} -g ${BINGRP} -m 444 libnvpair.h \
-   ${SDESTDIR}${INCLUDEDIR}
cd ${SRCTOP}/sys/cddl/contrib/opensolaris/uts/common/sys; \
${INSTALL} -C ${TAG_ARGS} -o ${BINOWN} -g ${BINGRP} -m 444 nvpair.h \
${SDESTDIR}${INCLUDEDIR}/sys
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r337697 - in head: lib/libbe sbin/bectl

2018-08-12 Thread Kyle Evans
Author: kevans
Date: Mon Aug 13 03:42:14 2018
New Revision: 337697
URL: https://svnweb.freebsd.org/changeset/base/337697

Log:
  libbe(3): Fix be_import to delete temp snapshot
  
  Deleting the temp snapshot isn't immediately possible because it's the
  origin of the newly imported boot environment. However, this is trivially
  solved by opening the new boot environment and promoting it. The roles are
  now reversed and the temp snapshot/dataset may be completely destroyed.
  
  Remove the BUGS from libbe(3) and bectl(8).

Modified:
  head/lib/libbe/be.c
  head/lib/libbe/libbe.3
  head/sbin/bectl/bectl.8

Modified: head/lib/libbe/be.c
==
--- head/lib/libbe/be.c Mon Aug 13 03:38:32 2018(r337696)
+++ head/lib/libbe/be.c Mon Aug 13 03:42:14 2018(r337697)
@@ -720,11 +720,27 @@ be_import(libbe_handle_t *lbh, const char *bootenv, in
 
err = zfs_clone(zfs, buf, props);
zfs_close(zfs);
-
nvlist_free(props);
 
-   /* XXX TODO: Figure out how to destroy the ghost... */
-   return (BE_ERR_SUCCESS);
+   if (err != 0)
+   return (set_error(lbh, BE_ERR_UNKNOWN));
+
+   /*
+* Finally, we open up the dataset we just cloned the snapshot to so 
that
+* we may promote it.  This is necessary in order to clean up the ghost
+* snapshot that doesn't need to be seen.
+*/
+   if ((zfs = zfs_open(lbh->lzh, buf, ZFS_TYPE_DATASET)) == NULL)
+   return (set_error(lbh, BE_ERR_ZFSOPEN));
+
+   err = zfs_promote(zfs);
+   zfs_close(zfs);
+
+   if (err != 0)
+   return (set_error(lbh, BE_ERR_UNKNOWN));
+
+   /* Clean up the temporary snapshot */
+   return (be_destroy(lbh, nbuf, 0));
 }
 
 #if SOON

Modified: head/lib/libbe/libbe.3
==
--- head/lib/libbe/libbe.3  Mon Aug 13 03:38:32 2018(r337696)
+++ head/lib/libbe/libbe.3  Mon Aug 13 03:42:14 2018(r337697)
@@ -28,7 +28,7 @@
 .\"
 .\" $FreeBSD$
 .\"
-.Dd August 10, 2018
+.Dd August 12, 2018
 .Dt LIBBE 3
 .Os
 .Sh NAME
@@ -455,9 +455,3 @@ were written as a 2017 Google Summer of Code project w
 as a mentor.
 Later work was done by
 .An Kyle Evans Aq Mt kev...@freebsd.org .
-.Sh BUGS
-The
-.Fn be_import
-function does not destroy the temporary boot environment it creates for import,
-because the snapshot created to do the import may not be deleted since it is 
the
-origin of the new boot environment.

Modified: head/sbin/bectl/bectl.8
==
--- head/sbin/bectl/bectl.8 Mon Aug 13 03:38:32 2018(r337696)
+++ head/sbin/bectl/bectl.8 Mon Aug 13 03:42:14 2018(r337697)
@@ -18,7 +18,7 @@
 .\"
 .\" $FreeBSD$
 .\"
-.Dd August 10, 2018
+.Dd August 12, 2018
 .Dt BECTL 8
 .Os
 .Sh NAME
@@ -271,9 +271,3 @@ Wrote the original
 .Xr beadm 1
 manual page that this one is derived from.
 .El
-.Sh BUGS
-.Nm
-import
-does not destroy the temporary boot environment it creates for import, because
-the snapshot created to do the import may not be deleted since it is the
-origin of the new boot environment.
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r337698 - head/lib/libbe

2018-08-12 Thread Kyle Evans
Author: kevans
Date: Mon Aug 13 03:43:49 2018
New Revision: 337698
URL: https://svnweb.freebsd.org/changeset/base/337698

Log:
  libbe(3): Light typo fix/word addition

Modified:
  head/lib/libbe/be.c

Modified: head/lib/libbe/be.c
==
--- head/lib/libbe/be.c Mon Aug 13 03:42:14 2018(r337697)
+++ head/lib/libbe/be.c Mon Aug 13 03:43:49 2018(r337698)
@@ -726,9 +726,10 @@ be_import(libbe_handle_t *lbh, const char *bootenv, in
return (set_error(lbh, BE_ERR_UNKNOWN));
 
/*
-* Finally, we open up the dataset we just cloned the snapshot to so 
that
+* Finally, we open up the dataset we just cloned the snapshot so that
 * we may promote it.  This is necessary in order to clean up the ghost
-* snapshot that doesn't need to be seen.
+* snapshot that doesn't need to be seen after the operation is
+* complete.
 */
if ((zfs = zfs_open(lbh->lzh, buf, ZFS_TYPE_DATASET)) == NULL)
return (set_error(lbh, BE_ERR_ZFSOPEN));
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r337699 - in head: cddl/lib/libbe sbin/bectl

2018-08-12 Thread Kyle Evans
Author: kevans
Date: Mon Aug 13 05:01:19 2018
New Revision: 337699
URL: https://svnweb.freebsd.org/changeset/base/337699

Log:
  libbe(3)/bectl(8): Remove now-redundant include paths
  
  These were previously necessary because the libnvpair and libzfs_core
  includes were not installed into the SYSROOT, being a part of the copies
  target in include/Makefile rather than being installed with the library.
  
  This was fixed in r337696 and the headers are now installed properly, so we
  may let go of the cruft.

Modified:
  head/cddl/lib/libbe/Makefile
  head/sbin/bectl/Makefile

Modified: head/cddl/lib/libbe/Makefile
==
--- head/cddl/lib/libbe/MakefileMon Aug 13 03:43:49 2018
(r337698)
+++ head/cddl/lib/libbe/MakefileMon Aug 13 05:01:19 2018
(r337699)
@@ -17,9 +17,7 @@ LIBADD+= zfs
 LIBADD+= nvpair
 
 CFLAGS+= -I${LIBBE_SRC}
-CFLAGS+= -I${SRCTOP}/cddl/contrib/opensolaris/lib/libnvpair
 CFLAGS+= -I${SRCTOP}/cddl/contrib/opensolaris/lib/libzfs/common
-CFLAGS+= -I${SRCTOP}/cddl/contrib/opensolaris/lib/libzfs_core/common
 CFLAGS+= -I${SRCTOP}/sys/cddl/compat/opensolaris
 CFLAGS+= -I${SRCTOP}/cddl/compat/opensolaris/include
 CFLAGS+= -I${SRCTOP}/cddl/compat/opensolaris/lib/libumem

Modified: head/sbin/bectl/Makefile
==
--- head/sbin/bectl/MakefileMon Aug 13 03:43:49 2018(r337698)
+++ head/sbin/bectl/MakefileMon Aug 13 05:01:19 2018(r337699)
@@ -13,7 +13,6 @@ LIBADD+= util
 CFLAGS+= -I${SRCTOP}/cddl/contrib/opensolaris/lib/libzfs/common
 CFLAGS+= -I${SRCTOP}/sys/cddl/compat/opensolaris
 CFLAGS+= -I${SRCTOP}/sys/cddl/contrib/opensolaris/uts/common
-CFLAGS+= -I${SRCTOP}/cddl/contrib/opensolaris/lib/libnvpair
 
 CFLAGS+= -DNEED_SOLARIS_BOOLEAN
 
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r337700 - head/include

2018-08-12 Thread Kyle Evans
Author: kevans
Date: Mon Aug 13 05:16:27 2018
New Revision: 337700
URL: https://svnweb.freebsd.org/changeset/base/337700

Log:
  Install symlink for sys/nvpair.h in include/Makefile symlinks target
  
  Noticed while fixing the install/sysroot situation for libnvpair and
  libzfs_core- if one uses the symlinks target, libzfs_core.h is not
  installed.

Modified:
  head/include/Makefile

Modified: head/include/Makefile
==
--- head/include/Makefile   Mon Aug 13 05:01:19 2018(r337699)
+++ head/include/Makefile   Mon Aug 13 05:16:27 2018(r337700)
@@ -384,6 +384,11 @@ symlinks: .PHONY .META
${INSTALL_SYMLINK} ${TAG_ARGS} ../../../sys/rpc/$$h \
${SDESTDIR}${INCLUDEDIR}/rpc; \
done
+.if ${MK_CDDL} != "no"
+   ${INSTALL_SYMLINK} ${TAG_ARGS} \
+   ../../../sys/cddl/contrib/opensolaris/uts/common/sys/nvpair.h \
+   ${SDESTDIR}${INCLUDEDIR}/sys
+.endif
 .if ${MK_MLX5TOOL} != "no"
${INSTALL_SYMLINK} ${TAG_ARGS} ../../../../sys/dev/mlx5/mlx5io.h \
${SDESTDIR}${INCLUDEDIR}/dev/mlx5
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


Re: svn commit: r337663 - in head: . cddl/lib cddl/lib/libbe contrib/mdocml lib/libbe sbin sbin/bectl share/mk

2018-08-12 Thread Ravi Pokala
-Original Message-
From:  on behalf of Kyle Evans 

Date: 2018-08-11, Saturday at 16:50
To: , , 

Subject: svn commit: r337663 - in head: . cddl/lib cddl/lib/libbe 
contrib/mdocml lib/libbe sbin sbin/bectl share/mk

> Author: kevans
> Date: Sat Aug 11 23:50:09 2018
> New Revision: 337663
> URL: https://svnweb.freebsd.org/changeset/base/337663
> 
> Log:
>   Merge libbe(3)/bectl(8) from projects/bectl into head
>   
>   bectl(8) is an administrative interface for working with ZFS boot
>   environments, intended to provide a superset of the functionality provided
>   by sysutils/beadm.
>   
>   libbe(3) is the back-end library that the required functionality has been
>   pulled out into for later reuse.
>   
>   These were originally written for GSoC 2017 under the mentorship of
>   allanjude@.

Originally written by who?

-Ravi (rpokala@)

>   
>   bectl(8) has proven pretty stable in my testing, with the known bug
>   documented in the man page.
>   
>   Relnotes:   yes



___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r337703 - in head/sys/gnu/dts: arm include/dt-bindings/clock include/dt-bindings/dma include/dt-bindings/memory include/dt-bindings/net include/dt-bindings/phy include/dt-bindings/pinct...

2018-08-12 Thread Emmanuel Vadot
Author: manu
Date: Mon Aug 13 06:40:20 2018
New Revision: 337703
URL: https://svnweb.freebsd.org/changeset/base/337703

Log:
  Import DTS files from Linux 4.18

Added:
 - copied unchanged from r337701, 
vendor/device-tree/dist/src/arm/am335x-osd335x-common.dtsi
 - copied unchanged from r337701, 
vendor/device-tree/dist/src/arm/am335x-pocketbeagle.dts
 - copied unchanged from r337701, 
vendor/device-tree/dist/src/arm/am3517-som.dtsi
 - copied unchanged from r337701, 
vendor/device-tree/dist/src/arm/aspeed-bmc-intel-s2600wf.dts
 - copied unchanged from r337701, 
vendor/device-tree/dist/src/arm/aspeed-bmc-opp-lanyang.dts
 - copied unchanged from r337701, 
vendor/device-tree/dist/src/arm/aspeed-bmc-portwell-neptune.dts
 - copied unchanged from r337701, 
vendor/device-tree/dist/src/arm/bcm2837-rpi-3-b-plus.dts
 - copied unchanged from r337701, 
vendor/device-tree/dist/src/arm/bcm283x-rpi-lan7515.dtsi
 - copied unchanged from r337701, 
vendor/device-tree/dist/src/arm/bcm47094-luxul-xap-1610.dts
 - copied unchanged from r337701, 
vendor/device-tree/dist/src/arm/bcm47094-luxul-xwr-3150-v1.dts
 - copied unchanged from r337701, 
vendor/device-tree/dist/src/arm/berlin2cd-valve-steamlink.dts
 - copied unchanged from r337701, 
vendor/device-tree/dist/src/arm/dra7-mmc-iodelay.dtsi
 - copied unchanged from r337701, 
vendor/device-tree/dist/src/arm/imx6dl-mamoj.dts
 - copied unchanged from r337701, 
vendor/device-tree/dist/src/arm/imx6q-dhcom-pdk2.dts
 - copied unchanged from r337701, 
vendor/device-tree/dist/src/arm/imx6q-dhcom-som.dtsi
 - copied unchanged from r337701, 
vendor/device-tree/dist/src/arm/imx6q-icore-mipi.dts
 - copied unchanged from r337701, 
vendor/device-tree/dist/src/arm/imx6q-kp-tpc.dts
 - copied unchanged from r337701, 
vendor/device-tree/dist/src/arm/imx6q-kp.dtsi
 - copied unchanged from r337701, 
vendor/device-tree/dist/src/arm/meson8m2-mxiii-plus.dts
 - copied unchanged from r337701, 
vendor/device-tree/dist/src/arm/meson8m2.dtsi
 - copied unchanged from r337701, 
vendor/device-tree/dist/src/arm/mt7623a-rfb-emmc.dts
 - copied unchanged from r337701, 
vendor/device-tree/dist/src/arm/mt7623a-rfb-nand.dts
 - copied unchanged from r337701, 
vendor/device-tree/dist/src/arm/mt7623a.dtsi
 - copied unchanged from r337701, 
vendor/device-tree/dist/src/arm/mt7623n-rfb-emmc.dts
 - copied unchanged from r337701, 
vendor/device-tree/dist/src/arm/qcom-ipq4019-ap.dk04.1-c1.dts
 - copied unchanged from r337701, 
vendor/device-tree/dist/src/arm/qcom-ipq4019-ap.dk04.1-c3.dts
 - copied unchanged from r337701, 
vendor/device-tree/dist/src/arm/qcom-ipq4019-ap.dk04.1.dtsi
 - copied unchanged from r337701, 
vendor/device-tree/dist/src/arm/qcom-ipq4019-ap.dk07.1-c1.dts
 - copied unchanged from r337701, 
vendor/device-tree/dist/src/arm/qcom-ipq4019-ap.dk07.1-c2.dts
 - copied unchanged from r337701, 
vendor/device-tree/dist/src/arm/qcom-ipq4019-ap.dk07.1.dtsi
 - copied unchanged from r337701, 
vendor/device-tree/dist/src/arm/qcom-msm8974-sony-xperia-amami.dts
 - copied unchanged from r337701, 
vendor/device-tree/dist/src/arm/r8a77470-iwg23s-sbc.dts
 - copied unchanged from r337701, 
vendor/device-tree/dist/src/arm/r8a77470.dtsi
 - copied unchanged from r337701, 
vendor/device-tree/dist/src/arm/stm32f469.dtsi
 - copied unchanged from r337701, 
vendor/device-tree/dist/src/arm/sun7i-a20-olimex-som-evb-emmc.dts
 - copied unchanged from r337701, 
vendor/device-tree/dist/src/arm/sun8i-h2-plus-libretech-all-h3-cc.dts
 - copied unchanged from r337701, 
vendor/device-tree/dist/src/arm/sun8i-r16-nintendo-nes-classic.dts
 - copied unchanged from r337701, 
vendor/device-tree/dist/src/arm/sun8i-r16-nintendo-super-nes-classic.dts
 - copied unchanged from r337701, 
vendor/device-tree/dist/src/arm/sunxi-libretech-all-h3-cc.dtsi
 - copied unchanged from r337701, 
vendor/device-tree/dist/include/dt-bindings/clock/actions,s900-cmu.h
 - copied unchanged from r337701, 
vendor/device-tree/dist/include/dt-bindings/clock/axg-aoclkc.h
 - copied unchanged from r337701, 
vendor/device-tree/dist/include/dt-bindings/clock/nuvoton,npcm7xx-clock.h
 - copied unchanged from r337701, 
vendor/device-tree/dist/include/dt-bindings/clock/qcom,gcc-msm8998.h
 - copied unchanged from r337701, 
vendor/device-tree/dist/include/dt-bindings/clock/qcom,gcc-sdm845.h
 - copied unchanged from r337701, 
vendor/device-tree/dist/include/dt-bindings/clock/qcom,rpmh.h
 - copied unchanged from r337701, 
vendor/device-tree/dist/include/dt-bindings/clock/qcom,videocc-sdm845.h
 - copied unchanged from r337701, 
vendor/device-tree/dist/include/dt-bindings/clock/r8a77470-cpg-mssr.h
 - copied unchanged from r337701, 
vendor/device-tree/dist/include/dt-bindings/clock/r8a77990-cpg-mssr.h
 - copied unchanged from r337701, 
vendor/device-tree/dist/include/dt-bindings/clock/sun50i-h6-r-ccu.h