Re: svn commit: r293115 - head/etc

2016-01-04 Thread Jan Beich
Warner Losh  writes:

> Author: imp
> Date: Sun Jan  3 19:18:48 2016
> New Revision: 293115
> URL: https://svnweb.freebsd.org/changeset/base/293115
>
> Log:
>   Use /bin/rm to remove /firstboot*. Otherwise rm -i alias is picked
>   up and can cause issues on boot with the prompts.

Why do you have ~/.profile stuff leaking into rc* boot sequence?
And maybe use |command| instead.

  $ alias rm=foo /bin/rm=foo
  $ rm
  sh: foo: not found
  $ /bin/rm
  sh: foo: not found

  $ command rm
  usage: rm [-f | -i] [-dIPRrvWx] file ...
 unlink file

~/.profile may also contain syntax allowed by bash e.g.,

  $ rm() { bar; }; /bin/rm() { bar; }
  $ rm
  bash: bar: command not found
  $ /bin/rm
  bash: bar: command not found

  $ command rm
  rm: missing operand
  Try 'rm --help' for more information.


signature.asc
Description: PGP signature


Re: svn commit: r293112 - head/sys/dev/ixl

2016-01-04 Thread John Baldwin
On Sunday, January 03, 2016 06:09:47 PM Garrett Cooper wrote:
> Author: ngie
> Date: Sun Jan  3 18:09:46 2016
> New Revision: 293112
> URL: https://svnweb.freebsd.org/changeset/base/293112
> 
> Log:
>   Fix ixl(4) compilation with PCI_IOV pre-r266974
>   
>   stable/10 doesn't have the if_getdrvflags(9) KPI. Reference the field in the
>   structure directly if the __FreeBSD_version is < 1100022, so the driver can
>   be built with PCI_IOV support on stable/10, without backporting all of
>   r266974 (which requires additional changes due to projects/ifnet, etc)
>   
>   Differential Revision: https://reviews.freebsd.org/D4759
>   Reviewed by: erj, sbruno
>   Sponsored by: EMC / Isilon Storage Division
> 
> Modified:
>   head/sys/dev/ixl/if_ixl.c
> 
> Modified: head/sys/dev/ixl/if_ixl.c
> ==
> --- head/sys/dev/ixl/if_ixl.c Sun Jan  3 17:58:11 2016(r293111)
> +++ head/sys/dev/ixl/if_ixl.c Sun Jan  3 18:09:46 2016(r293112)
> @@ -6606,7 +6606,11 @@ ixl_iov_uninit(device_t dev)
>   pf->veb_seid = 0;
>   }
>  
> +#if __FreeBSD_version > 1100022
>   if ((if_getdrvflags(ifp) & IFF_DRV_RUNNING) == 0)
> +#else
> + if ((ifp->if_drv_flags & IFF_DRV_RUNNING) == 0)
> +#endif
>   ixl_disable_intr(vsi);

FWIW, it is probably simpler to do something like this in an ixl header instead:

#if __FreeBSD_version <= 1100022
#define if_getdrvflags(ifp) (ifp)->if_drv_flags
#endif

In the past when the Intel drivers have used compat shims they have preferred 
this
method (defining compat macros for "new" APIs on old OS versions) instead of 
using
#ifdef's in the code itself.

-- 
John Baldwin
___
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: r293159 - in head/sys: net netinet netinet6

2016-01-04 Thread Alexander V. Chernikov
Author: melifaro
Date: Mon Jan  4 15:03:20 2016
New Revision: 293159
URL: https://svnweb.freebsd.org/changeset/base/293159

Log:
  Add rib_lookup_info() to provide API for retrieving individual route
entries data in unified format.
  
  There are control plane functions that require information other than
just next-hop data (e.g. individual rtentry fields like flags or
prefix/mask). Given that the goal is to avoid rte reference/refcounting,
re-use rt_addrinfo structure to store most rte fields. If caller wants
to retrieve key/mask or gateway (which are sockaddrs and are allocated
separately), it needs to provide sufficient-sized sockaddrs structures
w/ ther pointers saved in passed rt_addrinfo.
  
  Convert:
* lltable new records checks (in_lltable_rtcheck(),
  nd6_is_new_addr_neighbor().
* rtsock pre-add/change route check.
* IPv6 NS ND-proxy check (RADIX_MPATH code was eliminated because
   1) we don't support RTF_ANNOUNCE ND-proxy for networks and there should
 not be multiple host routes for such hosts 2) if we have multiple
 routes we should inspect them (which is not done). 3) the entire idea
 of abusing KRT as storage for ND proxy seems odd. Userland programs
 should be used for that purpose).

Modified:
  head/sys/net/route.c
  head/sys/net/route.h
  head/sys/net/rtsock.c
  head/sys/netinet/in.c
  head/sys/netinet6/nd6.c
  head/sys/netinet6/nd6_nbr.c

Modified: head/sys/net/route.c
==
--- head/sys/net/route.cMon Jan  4 09:58:16 2016(r293158)
+++ head/sys/net/route.cMon Jan  4 15:03:20 2016(r293159)
@@ -147,6 +147,8 @@ static void rt_notifydelete(struct rtent
 static struct radix_node *rt_mpath_unlink(struct radix_node_head *rnh,
 struct rt_addrinfo *info, struct rtentry *rto, int *perror);
 #endif
+static int rt_exportinfo(struct rtentry *rt, struct rt_addrinfo *info,
+int flags);
 
 struct if_mtuinfo
 {
@@ -832,6 +834,147 @@ rtrequest_fib(int req,
 
 
 /*
+ * Copy most of @rt data into @info.
+ *
+ * If @flags contains NHR_COPY, copies dst,netmask and gw to the
+ * pointers specified by @info structure. Assume such pointers
+ * are zeroed sockaddr-like structures with sa_len field initialized
+ * to reflect size of the provided buffer. if no NHR_COPY is specified,
+ * point dst,netmask and gw @info fields to appropriate @rt values.
+ *
+ * if @flags contains NHR_REF, do refcouting on rt_ifp.
+ *
+ * Returns 0 on success.
+ */
+int
+rt_exportinfo(struct rtentry *rt, struct rt_addrinfo *info, int flags)
+{
+   struct rt_metrics *rmx;
+   struct sockaddr *src, *dst;
+   int sa_len;
+
+   if (flags & NHR_COPY) {
+   /* Copy destination if dst is non-zero */
+   src = rt_key(rt);
+   dst = info->rti_info[RTAX_DST];
+   sa_len = src->sa_len;
+   if (src != NULL && dst != NULL) {
+   if (src->sa_len > dst->sa_len)
+   return (ENOMEM);
+   memcpy(dst, src, src->sa_len);
+   info->rti_addrs |= RTA_DST;
+   }
+
+   /* Copy mask if set && dst is non-zero */
+   src = rt_mask(rt);
+   dst = info->rti_info[RTAX_NETMASK];
+   if (src != NULL && dst != NULL) {
+
+   /*
+* Radix stores different value in sa_len,
+* assume rt_mask() to have the same length
+* as rt_key()
+*/
+   if (sa_len > dst->sa_len)
+   return (ENOMEM);
+   memcpy(dst, src, src->sa_len);
+   info->rti_addrs |= RTA_NETMASK;
+   }
+
+   /* Copy gateway is set && dst is non-zero */
+   src = rt->rt_gateway;
+   dst = info->rti_info[RTAX_GATEWAY];
+   if ((rt->rt_flags & RTF_GATEWAY) && src != NULL && dst != NULL){
+   if (src->sa_len > dst->sa_len)
+   return (ENOMEM);
+   memcpy(dst, src, src->sa_len);
+   info->rti_addrs |= RTA_GATEWAY;
+   }
+   } else {
+   info->rti_info[RTAX_DST] = rt_key(rt);
+   info->rti_addrs |= RTA_DST;
+   if (rt_mask(rt) != NULL) {
+   info->rti_info[RTAX_NETMASK] = rt_mask(rt);
+   info->rti_addrs |= RTA_NETMASK;
+   }
+   if (rt->rt_flags & RTF_GATEWAY) {
+   info->rti_info[RTAX_GATEWAY] = rt->rt_gateway;
+   info->rti_addrs |= RTA_GATEWAY;
+   }
+   }
+
+   rmx = info->rti_rmx;
+   if (rmx != NULL) {
+   info->rti_mflags |= RTV_MTU;
+   rmx->rmx_mtu = rt->

Re: svn commit: r293022 - head/sys/net80211

2016-01-04 Thread John Baldwin
On Friday, January 01, 2016 07:41:42 PM Adrian Chadd wrote:
> yup. all  of this is ... terrible atm.
> 
> I do need to be able to give a bounds though. :(

The _sbt variants let you specify a bounds for the "fuzzy".  You
give the deadline time as one value ('sbt') and an upper bound on
how long to delay extra as the second ('pr').  The wait will
timeout sometime between 'sbt' and 'sbt + pr'.

Alternatively, you can leave 'pr' as 0 and encode the precision
via the C_PREL() flags instead as described in callout(9).  (I
think how to use sbintime_t should probably be broken out into
a separate sbintime(9) manpage that callout(9) and other consumers
reference rather than being buried in callout(9) to make it easier
to figure out how to use these.  The same manpage can also talk
about the SBT_* constants and how to generate sbintime_t values
from known reference times.)

-- 
John Baldwin
___
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: r293022 - head/sys/net80211

2016-01-04 Thread Adrian Chadd
On 4 January 2016 at 07:47, John Baldwin  wrote:
> On Friday, January 01, 2016 07:41:42 PM Adrian Chadd wrote:
>> yup. all  of this is ... terrible atm.
>>
>> I do need to be able to give a bounds though. :(
>
> The _sbt variants let you specify a bounds for the "fuzzy".  You
> give the deadline time as one value ('sbt') and an upper bound on
> how long to delay extra as the second ('pr').  The wait will
> timeout sometime between 'sbt' and 'sbt + pr'.
>
> Alternatively, you can leave 'pr' as 0 and encode the precision
> via the C_PREL() flags instead as described in callout(9).  (I
> think how to use sbintime_t should probably be broken out into
> a separate sbintime(9) manpage that callout(9) and other consumers
> reference rather than being buried in callout(9) to make it easier
> to figure out how to use these.  The same manpage can also talk
> about the SBT_* constants and how to generate sbintime_t values
> from known reference times.)

I dug into it a few months ago and found it was .. not quite as bounded fuzzy :(


-a
___
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: r293115 - head/etc

2016-01-04 Thread Warner Losh
On Mon, Jan 4, 2016 at 1:44 AM, Jan Beich  wrote:

> Warner Losh  writes:
>
> > Author: imp
> > Date: Sun Jan  3 19:18:48 2016
> > New Revision: 293115
> > URL: https://svnweb.freebsd.org/changeset/base/293115
> >
> > Log:
> >   Use /bin/rm to remove /firstboot*. Otherwise rm -i alias is picked
> >   up and can cause issues on boot with the prompts.
>
> Why do you have ~/.profile stuff leaking into rc* boot sequence?
>

Because I though they were in /root/.profile. I was going to quote
them here. Also, all other instances of rm in the rc files I noticed
with a quick grep has /bin/rm.

Turns out it is simply rm's default behavior w/o -f to prompt, I think.

Warner
___
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: r293115 - head/etc

2016-01-04 Thread Allan Jude
On 2016-01-04 11:50, Warner Losh wrote:
> 
> 
> On Mon, Jan 4, 2016 at 1:44 AM, Jan Beich  > wrote:
> 
> Warner Losh  writes:
> 
> > Author: imp
> > Date: Sun Jan  3 19:18:48 2016
> > New Revision: 293115
> > URL: https://svnweb.freebsd.org/changeset/base/293115
> >
> > Log:
> >   Use /bin/rm to remove /firstboot*. Otherwise rm -i alias is picked
> >   up and can cause issues on boot with the prompts.
> 
> Why do you have ~/.profile stuff leaking into rc* boot sequence?
> 
> 
> Because I though they were in /root/.profile. I was going to quote
> them here. Also, all other instances of rm in the rc files I noticed
> with a quick grep has /bin/rm.
> 
> Turns out it is simply rm's default behavior w/o -f to prompt, I think.
> 
> Warner

Prompting is not the default behaviour, but also check /etc/profile


-- 
Allan Jude



signature.asc
Description: OpenPGP digital signature


Re: svn commit: r293115 - head/etc

2016-01-04 Thread Warner Losh
On Mon, Jan 4, 2016 at 9:53 AM, Allan Jude  wrote:

> On 2016-01-04 11:50, Warner Losh wrote:
> >
> >
> > On Mon, Jan 4, 2016 at 1:44 AM, Jan Beich  > > wrote:
> >
> > Warner Losh  writes:
> >
> > > Author: imp
> > > Date: Sun Jan  3 19:18:48 2016
> > > New Revision: 293115
> > > URL: https://svnweb.freebsd.org/changeset/base/293115
> > >
> > > Log:
> > >   Use /bin/rm to remove /firstboot*. Otherwise rm -i alias is
> picked
> > >   up and can cause issues on boot with the prompts.
> >
> > Why do you have ~/.profile stuff leaking into rc* boot sequence?
> >
> >
> > Because I though they were in /root/.profile. I was going to quote
> > them here. Also, all other instances of rm in the rc files I noticed
> > with a quick grep has /bin/rm.
> >
> > Turns out it is simply rm's default behavior w/o -f to prompt, I think.
> >
> > Warner
>
> Prompting is not the default behaviour, but also check /etc/profile
>

I specifically did before sending. There's nothing in  /etc/profile
on the affected system. Nor in /root/.profile. However, the files
were on a read-only filesystem which is why rm's default behavior
of prompting for files it can't delete kicked in. I though there was
a stray alias rm rm -i floating around, but was bad and didn't
actually look to confirm until a few minutes ago.

Warner
___
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: r293115 - head/etc

2016-01-04 Thread Warner Losh
On Mon, Jan 4, 2016 at 10:00 AM, Colin Percival 
wrote:

> On 01/03/16 11:18, Warner Losh wrote:
> > Log:
> >   Use /bin/rm to remove /firstboot*. Otherwise rm -i alias is picked
> >   up and can cause issues on boot with the prompts.
>
> Huh, I never realized that could be a problem.


It can, but it was a false positive here. /bin/sh always sources them,
so if you'd added an alias, it would be hit here.


>
> >   Fix the read-only
> >   root case with horrible kludge of mounting rw removing the files, then
> >   mounting ro.
>
> The solution I intended when I introduced this (and used elsewhere) was to
> set $firstboot_sentinel in /etc(/defaults)?/rc.conf.  This case is
> precisely
> why it's a shell variable, in fact.


Except that's not exactly useful. NanoBSD boots with no filesystems writable
that are permanent.  So I could set it to /var/firstboot or something like
that,
and the error would go away. However, that wouldn't solve the problem
because /var is repopulated from base seed files every boot with NanoBSD
so we'd get firstboot behavior on every single boot. Or, we could remount
/ rw and remove the file and remount it ro when a read-only root was
requested.

I wondered to myself why we didn't use the same mechanism as nextboot
for this feature. Do you know?

Warner
___
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: r293115 - head/etc

2016-01-04 Thread Colin Percival
On 01/03/16 11:18, Warner Losh wrote:
> Log:
>   Use /bin/rm to remove /firstboot*. Otherwise rm -i alias is picked
>   up and can cause issues on boot with the prompts.

Huh, I never realized that could be a problem.

>   Fix the read-only
>   root case with horrible kludge of mounting rw removing the files, then
>   mounting ro.

The solution I intended when I introduced this (and used elsewhere) was to
set $firstboot_sentinel in /etc(/defaults)?/rc.conf.  This case is precisely
why it's a shell variable, in fact.

Colin Percival

> Modified: head/etc/rc
> ==
> --- head/etc/rc   Sun Jan  3 19:06:17 2016(r293114)
> +++ head/etc/rc   Sun Jan  3 19:18:48 2016(r293115)
> @@ -131,11 +131,14 @@ done
>  
>  # Remove the firstboot sentinel, and reboot if it was requested.
>  if [ -e ${firstboot_sentinel} ]; then
> - rm ${firstboot_sentinel}
> + [ ${root_rw_mount} = "yes" ] || mount -uw /
> + /bin/rm ${firstboot_sentinel}
>   if [ -e ${firstboot_sentinel}-reboot ]; then
> - rm ${firstboot_sentinel}-reboot
> + /bin/rm ${firstboot_sentinel}-reboot
> + [ ${root_rw_mount} = "yes" ] || mount -ur /
>   kill -INT 1
>   fi
> + [ ${root_rw_mount} = "yes" ] || mount -ur /
>  fi
>  
>  echo ''

-- 
Colin Percival
Security Officer Emeritus, FreeBSD | The power to serve
Founder, Tarsnap | www.tarsnap.com | Online backups for the truly paranoid
___
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: r293164 - head/sys/net80211

2016-01-04 Thread Adrian Chadd
Author: adrian
Date: Mon Jan  4 17:17:06 2016
New Revision: 293164
URL: https://svnweb.freebsd.org/changeset/base/293164

Log:
  [net80211] fix duration field; it's unsigned, but not long.
  
  Submitted by: Imre Vadasz 
  Obtained from:DragonflyBSD

Modified:
  head/sys/net80211/ieee80211_scan_sw.c

Modified: head/sys/net80211/ieee80211_scan_sw.c
==
--- head/sys/net80211/ieee80211_scan_sw.c   Mon Jan  4 16:51:56 2016
(r293163)
+++ head/sys/net80211/ieee80211_scan_sw.c   Mon Jan  4 17:17:06 2016
(r293164)
@@ -359,7 +359,7 @@ ieee80211_swscan_bg_scan(const struct ie
duration = IEEE80211_SCAN_OFFCHANNEL;
 
IEEE80211_DPRINTF(vap, IEEE80211_MSG_SCAN,
-   "%s: %s scan, ticks %u duration %lu\n", __func__,
+   "%s: %s scan, ticks %u duration %u\n", __func__,
ss->ss_flags & IEEE80211_SCAN_ACTIVE ? "active" : "passive",
ticks, duration);
 
___
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: r293165 - head/sys/boot/efi/loader

2016-01-04 Thread Ed Maste
Author: emaste
Date: Mon Jan  4 17:22:06 2016
New Revision: 293165
URL: https://svnweb.freebsd.org/changeset/base/293165

Log:
  loader.efi: support non-contiguous console modes
  
  Submitted by: Toomas Soome 
  MFC after:1 week
  Differential Revision:https://reviews.freebsd.org/D4760

Modified:
  head/sys/boot/efi/loader/main.c

Modified: head/sys/boot/efi/loader/main.c
==
--- head/sys/boot/efi/loader/main.c Mon Jan  4 17:17:06 2016
(r293164)
+++ head/sys/boot/efi/loader/main.c Mon Jan  4 17:22:06 2016
(r293165)
@@ -359,10 +359,11 @@ command_mode(int argc, char *argv[])
return (CMD_OK);
}
 
-   for (i = 0; ; i++) {
+   printf("Current mode: %d\n", conout->Mode->Mode);
+   for (i = 0; i <= conout->Mode->MaxMode; i++) {
status = conout->QueryMode(conout, i, &cols, &rows);
if (EFI_ERROR(status))
-   break;
+   continue;
printf("Mode %d: %u columns, %u rows\n", i, (unsigned)cols,
(unsigned)rows);
}
___
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: r293166 - head/sys/netinet

2016-01-04 Thread Alexander V. Chernikov
Author: melifaro
Date: Mon Jan  4 17:23:10 2016
New Revision: 293166
URL: https://svnweb.freebsd.org/changeset/base/293166

Log:
  Maintain consistent behavior: make fib4_lookup_nh_ext() return
rt_ifp pointer by default, as done by other fib lookup functions.

Modified:
  head/sys/netinet/in_fib.c

Modified: head/sys/netinet/in_fib.c
==
--- head/sys/netinet/in_fib.c   Mon Jan  4 17:22:06 2016(r293165)
+++ head/sys/netinet/in_fib.c   Mon Jan  4 17:23:10 2016(r293166)
@@ -97,7 +97,10 @@ fib4_rte_to_nh_extended(struct rtentry *
struct sockaddr_in *gw;
struct in_ifaddr *ia;
 
-   pnh4->nh_ifp = rte->rt_ifa->ifa_ifp;
+   if ((flags & NHR_IFAIF) != 0)
+   pnh4->nh_ifp = rte->rt_ifa->ifa_ifp;
+   else
+   pnh4->nh_ifp = rte->rt_ifp;
pnh4->nh_mtu = min(rte->rt_mtu, rte->rt_ifp->if_mtu);
if (rte->rt_flags & RTF_GATEWAY) {
gw = (struct sockaddr_in *)rte->rt_gateway;
___
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: r293167 - head/sys/netgraph/netflow

2016-01-04 Thread Alexander V. Chernikov
Author: melifaro
Date: Mon Jan  4 17:25:32 2016
New Revision: 293167
URL: https://svnweb.freebsd.org/changeset/base/293167

Log:
  Fix route lookup condition: do IPv6 route lookup for source based on
NG_NETFLOW_CONF_NOSRCLOOKUP instead of NG_NETFLOW_CONF_NODSTLOOKUP.

Modified:
  head/sys/netgraph/netflow/netflow.c

Modified: head/sys/netgraph/netflow/netflow.c
==
--- head/sys/netgraph/netflow/netflow.c Mon Jan  4 17:23:10 2016
(r293166)
+++ head/sys/netgraph/netflow/netflow.c Mon Jan  4 17:25:32 2016
(r293167)
@@ -451,7 +451,7 @@ hash6_insert(priv_p priv, struct flow_ha
}
}
 
-   if ((flags & NG_NETFLOW_CONF_NODSTLOOKUP) == 0) {
+   if ((flags & NG_NETFLOW_CONF_NOSRCLOOKUP) == 0) {
/* Do route lookup on source address, to fill in src_mask. */
bzero(&rin6, sizeof(struct route_in6));
src = (struct sockaddr_in6 *)&rin6.ro_dst;
___
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: r293115 - head/etc

2016-01-04 Thread Colin Percival
On 01/04/16 09:09, Warner Losh wrote:
> On Mon, Jan 4, 2016 at 10:00 AM, Colin Percival  > wrote:
> On 01/03/16 11:18, Warner Losh wrote:
> >   Fix the read-only
> >   root case with horrible kludge of mounting rw removing the files, then
> >   mounting ro.
> 
> The solution I intended when I introduced this (and used elsewhere) was to
> set $firstboot_sentinel in /etc(/defaults)?/rc.conf.  This case is 
> precisely
> why it's a shell variable, in fact.
> 
> Except that's not exactly useful. NanoBSD boots with no filesystems writable
> that are permanent.  So I could set it to /var/firstboot or something like 
> that,
> and the error would go away. However, that wouldn't solve the problem
> because /var is repopulated from base seed files every boot with NanoBSD
> so we'd get firstboot behavior on every single boot. Or, we could remount
> / rw and remove the file and remount it ro when a read-only root was
> requested.

Huh, ok.  I assumed that you had a /conf/ or something like that for storing
persistent configuration data.

> I wondered to myself why we didn't use the same mechanism as nextboot
> for this feature. Do you know?

Doesn't that still write to the filesystem?

-- 
Colin Percival
Security Officer Emeritus, FreeBSD | The power to serve
Founder, Tarsnap | www.tarsnap.com | Online backups for the truly paranoid
___
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: r293168 - head/lib/libgssapi

2016-01-04 Thread Doug Rabson
Author: dfr
Date: Mon Jan  4 17:42:12 2016
New Revision: 293168
URL: https://svnweb.freebsd.org/changeset/base/293168

Log:
  Fix a memory leak in gss_release_oid_set

Modified:
  head/lib/libgssapi/gss_release_oid_set.c

Modified: head/lib/libgssapi/gss_release_oid_set.c
==
--- head/lib/libgssapi/gss_release_oid_set.cMon Jan  4 17:25:32 2016
(r293167)
+++ head/lib/libgssapi/gss_release_oid_set.cMon Jan  4 17:42:12 2016
(r293168)
@@ -32,15 +32,25 @@
 
 OM_uint32
 gss_release_oid_set(OM_uint32 *minor_status,
-gss_OID_set *set)
+gss_OID_set *setp)
 {
+   gss_OID_set set;
+   gss_OID o;
+   size_t i;
 
*minor_status = 0;
-   if (set && *set) {
-   if ((*set)->elements)
-   free((*set)->elements);
-   free(*set);
-   *set = GSS_C_NO_OID_SET;
+   if (setp) {
+   set = *setp;
+   if (set) {
+   for (i = 0; i < set->count; i++) {
+   o = &set->elements[i];
+   if (o->elements)
+   free(o->elements);
+   }
+   free(set->elements);
+   free(set);
+   *setp = GSS_C_NO_OID_SET;
+   }
}
return (GSS_S_COMPLETE);
 }
___
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: r293115 - head/etc

2016-01-04 Thread Jilles Tjoelker
On Mon, Jan 04, 2016 at 10:09:00AM -0700, Warner Losh wrote:
> On Mon, Jan 4, 2016 at 10:00 AM, Colin Percival 
> wrote:

> > On 01/03/16 11:18, Warner Losh wrote:
> > > Log:
> > >   Use /bin/rm to remove /firstboot*. Otherwise rm -i alias is picked
> > >   up and can cause issues on boot with the prompts.

> > Huh, I never realized that could be a problem.

> It can, but it was a false positive here. /bin/sh always sources them,
> so if you'd added an alias, it would be hit here.

A non-interactive non-login sh does not source any startup files. Login
shells source /etc/profile and ~/.profile and interactive shells source
the file whose name is in the ENV environment variable.

The prompt comes from trying to remove an existing file which is not
writable. It can be suppressed by using rm -f instead of rm.

-- 
Jilles Tjoelker
___
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: r293169 - head/sys/netinet6

2016-01-04 Thread Alexander V. Chernikov
Author: melifaro
Date: Mon Jan  4 18:32:24 2016
New Revision: 293169
URL: https://svnweb.freebsd.org/changeset/base/293169

Log:
  Finish r293098: make ip6_getpmtu() and ip6_getpmtu_ctl() use new routing API

Modified:
  head/sys/netinet6/ip6_output.c

Modified: head/sys/netinet6/ip6_output.c
==
--- head/sys/netinet6/ip6_output.c  Mon Jan  4 17:42:12 2016
(r293168)
+++ head/sys/netinet6/ip6_output.c  Mon Jan  4 18:32:24 2016
(r293169)
@@ -97,6 +97,7 @@ __FBSDID("$FreeBSD$");
 #include 
 #include 
 #include 
+#include 
 #include 
 #include 
 #include 
@@ -1225,27 +1226,24 @@ ip6_insertfraghdr(struct mbuf *m0, struc
 static int
 ip6_getpmtu_ctl(u_int fibnum, struct in6_addr *dst, u_long *mtup)
 {
-   struct route_in6 ro_pmtu;
+   struct nhop6_extended nh6;
+   struct in6_addr kdst;
+   uint32_t scopeid;
struct ifnet *ifp;
-   struct sockaddr_in6 *sa6_dst;
u_long mtu;
+   int error;
 
-   sa6_dst = (struct sockaddr_in6 *)&ro_pmtu.ro_dst;
-   bzero(sa6_dst, sizeof(*sa6_dst));
-   sa6_dst->sin6_family = AF_INET6;
-   sa6_dst->sin6_len = sizeof(struct sockaddr_in6);
-   sa6_dst->sin6_addr = *dst;
-
-   in6_rtalloc(&ro_pmtu, fibnum);
-
-   if (ro_pmtu.ro_rt == NULL)
+   in6_splitscope(dst, &kdst, &scopeid);
+   if (fib6_lookup_nh_ext(fibnum, &kdst, scopeid, NHR_REF, 0, &nh6) != 0)
return (EHOSTUNREACH);
 
-   ifp = ro_pmtu.ro_rt->rt_ifp;
-   mtu = ro_pmtu.ro_rt->rt_mtu;
-   RO_RTFREE(&ro_pmtu);
+   ifp = nh6.nh_ifp;
+   mtu = nh6.nh_mtu;
 
-   return (ip6_calcmtu(ifp, dst, mtu, mtup, NULL));
+   error = ip6_calcmtu(ifp, dst, mtu, mtup, NULL);
+   fib6_free_nh_ext(fibnum, &nh6);
+
+   return (error);
 }
 
 /*
@@ -1263,6 +1261,9 @@ ip6_getpmtu(struct route_in6 *ro_pmtu, i
 struct ifnet *ifp, struct in6_addr *dst, u_long *mtup,
 int *alwaysfragp, u_int fibnum)
 {
+   struct nhop6_basic nh6;
+   struct in6_addr kdst;
+   uint32_t scopeid;
struct sockaddr_in6 *sa6_dst;
u_long mtu;
 
@@ -1284,12 +1285,13 @@ ip6_getpmtu(struct route_in6 *ro_pmtu, i
sa6_dst->sin6_len = sizeof(struct sockaddr_in6);
sa6_dst->sin6_addr = *dst;
 
-   in6_rtalloc(ro_pmtu, fibnum);
-   if (ro_pmtu->ro_rt) {
-   mtu = ro_pmtu->ro_rt->rt_mtu;
-   RO_RTFREE(ro_pmtu);
-   }
+   in6_splitscope(dst, &kdst, &scopeid);
+   if (fib6_lookup_nh_basic(fibnum, &kdst, scopeid, 0, 0,
+   &nh6) == 0)
+   ro_pmtu->ro_mtu = nh6.nh_mtu;
}
+
+   mtu = ro_pmtu->ro_mtu;
}
 
if (ro_pmtu->ro_rt)
___
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: r293170 - head/release/doc/en_US.ISO8859-1/hardware

2016-01-04 Thread Christian Brueffer
Author: brueffer
Date: Mon Jan  4 18:34:27 2016
New Revision: 293170
URL: https://svnweb.freebsd.org/changeset/base/293170

Log:
  Add rtwn(4) to the hardware list.

Modified:
  head/release/doc/en_US.ISO8859-1/hardware/article.xml

Modified: head/release/doc/en_US.ISO8859-1/hardware/article.xml
==
--- head/release/doc/en_US.ISO8859-1/hardware/article.xml   Mon Jan  4 
18:32:24 2016(r293169)
+++ head/release/doc/en_US.ISO8859-1/hardware/article.xml   Mon Jan  4 
18:34:27 2016(r293170)
@@ -1017,6 +1017,9 @@
 
   &hwlist.rsu;
 
+  Realtek RTL8188CE based PCIe IEEE 802.11b/g/n wireless network
+   adapters (&man.rtwn.4; driver)
+
   &hwlist.rum;
 
   &hwlist.run;
___
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: r293171 - head/sys/modules

2016-01-04 Thread Christian Brueffer
Author: brueffer
Date: Mon Jan  4 19:04:33 2016
New Revision: 293171
URL: https://svnweb.freebsd.org/changeset/base/293171

Log:
  Don't build rtwnfw if building without binary blobs.
  
  rtwnfw got added in r293009 and depends on source-less and
  non-free microcode in sys/contrib/dev/rtwn.
  
  PR:   205874
  Submitted by: Fabian Keil
  Obtained from:ElectroBSD

Modified:
  head/sys/modules/Makefile

Modified: head/sys/modules/Makefile
==
--- head/sys/modules/Makefile   Mon Jan  4 18:34:27 2016(r293170)
+++ head/sys/modules/Makefile   Mon Jan  4 19:04:33 2016(r293171)
@@ -312,7 +312,7 @@ SUBDIR= \
reiserfs \
rl \
rtwn \
-   rtwnfw \
+   ${_rtwnfw} \
${_s3} \
${_safe} \
${_sbni} \
@@ -484,6 +484,7 @@ _fxp=   fxp
 _ispfw=ispfw
 _mwlfw=mwlfw
 _ralfw=ralfw
+_rtwnfw=   rtwnfw
 _sf=   sf
 _ti=   ti
 _txp=  txp
___
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: r293173 - head/release

2016-01-04 Thread Glen Barber
Author: gjb
Date: Mon Jan  4 19:38:44 2016
New Revision: 293173
URL: https://svnweb.freebsd.org/changeset/base/293173

Log:
  Fix path to include .OBJDIR to avoid polluting the source
  tree during 'make release'.
  
  MFC after:3 days
  Sponsored by: The FreeBSD Foundation

Modified:
  head/release/Makefile

Modified: head/release/Makefile
==
--- head/release/Makefile   Mon Jan  4 19:19:48 2016(r293172)
+++ head/release/Makefile   Mon Jan  4 19:38:44 2016(r293173)
@@ -281,7 +281,7 @@ ftp: packagesystem
cp *.txz MANIFEST ftp
 
 release:   real-release vm-release cloudware-release
-   touch ${.TARGET}
+   touch ${.OBJDIR}/${.TARGET}
 
 real-release:
${MAKE} -C ${.CURDIR} ${.MAKEFLAGS} obj
___
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: r293115 - head/etc

2016-01-04 Thread Warner Losh
On Mon, Jan 4, 2016 at 10:41 AM, Colin Percival 
wrote:

> On 01/04/16 09:09, Warner Losh wrote:
> > On Mon, Jan 4, 2016 at 10:00 AM, Colin Percival  > > wrote:
> > On 01/03/16 11:18, Warner Losh wrote:
> > >   Fix the read-only
> > >   root case with horrible kludge of mounting rw removing the
> files, then
> > >   mounting ro.
> >
> > The solution I intended when I introduced this (and used elsewhere)
> was to
> > set $firstboot_sentinel in /etc(/defaults)?/rc.conf.  This case is
> precisely
> > why it's a shell variable, in fact.
> >
> > Except that's not exactly useful. NanoBSD boots with no filesystems
> writable
> > that are permanent.  So I could set it to /var/firstboot or something
> like that,
> > and the error would go away. However, that wouldn't solve the problem
> > because /var is repopulated from base seed files every boot with NanoBSD
> > so we'd get firstboot behavior on every single boot. Or, we could remount
> > / rw and remove the file and remount it ro when a read-only root was
> > requested.
>
> Huh, ok.  I assumed that you had a /conf/ or something like that for
> storing
> persistent configuration data.
>

It does. But all that's mirrored in a MFS and it takes an explicit command
to
write it all back. This is poorly matched with where the firstboot files are
actually removed.


> > I wondered to myself why we didn't use the same mechanism as nextboot
> > for this feature. Do you know?
>
> Doesn't that still write to the filesystem?
>

So it does. I thought it mucked about with flags and such.

Warner
___
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: r293176 - head/sys/netinet

2016-01-04 Thread Michael Tuexen
Author: tuexen
Date: Mon Jan  4 20:34:40 2016
New Revision: 293176
URL: https://svnweb.freebsd.org/changeset/base/293176

Log:
  Get struct sctp_net_route in sync with struct route again.

Modified:
  head/sys/netinet/sctp_structs.h

Modified: head/sys/netinet/sctp_structs.h
==
--- head/sys/netinet/sctp_structs.h Mon Jan  4 20:31:09 2016
(r293175)
+++ head/sys/netinet/sctp_structs.h Mon Jan  4 20:34:40 2016
(r293176)
@@ -189,9 +189,11 @@ struct iterator_control {
 
 struct sctp_net_route {
sctp_rtentry_t *ro_rt;
-   void *ro_lle;
-   void *ro_ia;
-   int ro_flags;
+   char *ro_prepend;
+   uint16_t ro_plen;
+   uint16_t ro_flags;
+   uint16_t ro_mtu;
+   uint16_t spare;
union sctp_sockstore _l_addr;   /* remote peer addr */
struct sctp_ifa *_s_addr;   /* our selected src addr */
 };
___
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: r293177 - head/sys/dev/iwm

2016-01-04 Thread Andriy Voskoboinyk
Author: avos
Date: Mon Jan  4 21:03:01 2016
New Revision: 293177
URL: https://svnweb.freebsd.org/changeset/base/293177

Log:
  iwm: store pointer for 'struct firmware' instead of
  'size_t' and 'void *' pair.
  
  Approved by:  adrian (mentor)
  Obtained from:DragonFlyBSD
  Differential Revision:https://reviews.freebsd.org/D4765

Modified:
  head/sys/dev/iwm/if_iwm.c
  head/sys/dev/iwm/if_iwmvar.h

Modified: head/sys/dev/iwm/if_iwm.c
==
--- head/sys/dev/iwm/if_iwm.c   Mon Jan  4 20:34:40 2016(r293176)
+++ head/sys/dev/iwm/if_iwm.c   Mon Jan  4 21:03:01 2016(r293177)
@@ -423,9 +423,8 @@ iwm_set_default_calib(struct iwm_softc *
 static void
 iwm_fw_info_free(struct iwm_fw_info *fw)
 {
-   firmware_put(fw->fw_rawdata, FIRMWARE_UNLOAD);
-   fw->fw_rawdata = NULL;
-   fw->fw_rawsize = 0;
+   firmware_put(fw->fw_fp, FIRMWARE_UNLOAD);
+   fw->fw_fp = NULL;
/* don't touch fw->fw_status */
memset(fw->fw_sects, 0, sizeof(fw->fw_sects));
 }
@@ -450,32 +449,30 @@ iwm_read_firmware(struct iwm_softc *sc, 
msleep(&sc->sc_fw, &sc->sc_mtx, 0, "iwmfwp", 0);
fw->fw_status = IWM_FW_STATUS_INPROGRESS;
 
-   if (fw->fw_rawdata != NULL)
+   if (fw->fw_fp != NULL)
iwm_fw_info_free(fw);
 
/*
 * Load firmware into driver memory.
-* fw_rawdata and fw_rawsize will be set.
+* fw_fp will be set.
 */
IWM_UNLOCK(sc);
fwp = firmware_get(sc->sc_fwname);
+   IWM_LOCK(sc);
if (fwp == NULL) {
device_printf(sc->sc_dev,
"could not read firmware %s (error %d)\n",
sc->sc_fwname, error);
-   IWM_LOCK(sc);
goto out;
}
-   IWM_LOCK(sc);
-   fw->fw_rawdata = fwp->data;
-   fw->fw_rawsize = fwp->datasize;
+   fw->fw_fp = fwp;
 
/*
 * Parse firmware contents
 */
 
-   uhdr = (const void *)fw->fw_rawdata;
-   if (*(const uint32_t *)fw->fw_rawdata != 0
+   uhdr = (const void *)fw->fw_fp->data;
+   if (*(const uint32_t *)fw->fw_fp->data != 0
|| le32toh(uhdr->magic) != IWM_TLV_UCODE_MAGIC) {
device_printf(sc->sc_dev, "invalid firmware %s\n",
sc->sc_fwname);
@@ -485,7 +482,7 @@ iwm_read_firmware(struct iwm_softc *sc, 
 
sc->sc_fwver = le32toh(uhdr->ver);
data = uhdr->data;
-   len = fw->fw_rawsize - sizeof(*uhdr);
+   len = fw->fw_fp->datasize - sizeof(*uhdr);
 
while (len >= sizeof(tlv)) {
size_t tlv_len;
@@ -684,7 +681,7 @@ iwm_read_firmware(struct iwm_softc *sc, 
  out:
if (error) {
fw->fw_status = IWM_FW_STATUS_NONE;
-   if (fw->fw_rawdata != NULL)
+   if (fw->fw_fp != NULL)
iwm_fw_info_free(fw);
} else
fw->fw_status = IWM_FW_STATUS_DONE;
@@ -4957,7 +4954,7 @@ iwm_detach_local(struct iwm_softc *sc, i
iwm_free_tx_ring(sc, &sc->txq[i]);
 
/* Free firmware */
-   if (fw->fw_rawdata != NULL)
+   if (fw->fw_fp != NULL)
iwm_fw_info_free(fw);
 
/* free scheduler */

Modified: head/sys/dev/iwm/if_iwmvar.h
==
--- head/sys/dev/iwm/if_iwmvar.hMon Jan  4 20:34:40 2016
(r293176)
+++ head/sys/dev/iwm/if_iwmvar.hMon Jan  4 21:03:01 2016
(r293177)
@@ -159,8 +159,7 @@ enum iwm_ucode_type {
 };
 
 struct iwm_fw_info {
-   const void *fw_rawdata;
-   size_t fw_rawsize;
+   const struct firmware *fw_fp;
int fw_status;
 
struct iwm_fw_sects {
___
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: r293178 - head/sys/dev/iwm

2016-01-04 Thread Andriy Voskoboinyk
Author: avos
Date: Mon Jan  4 21:07:08 2016
New Revision: 293178
URL: https://svnweb.freebsd.org/changeset/base/293178

Log:
  iwm: free firmware related resources after uploading it to the hardware
  
  iwn(4) / wpi(4) works in the same way
  (read_firmware() -> hw_init() -> firmware_put())
  
  Approved by:  adrian (mentor)
  Differential Revision:https://reviews.freebsd.org/D4766

Modified:
  head/sys/dev/iwm/if_iwm.c

Modified: head/sys/dev/iwm/if_iwm.c
==
--- head/sys/dev/iwm/if_iwm.c   Mon Jan  4 21:03:01 2016(r293177)
+++ head/sys/dev/iwm/if_iwm.c   Mon Jan  4 21:07:08 2016(r293178)
@@ -2041,6 +2041,7 @@ iwm_mvm_load_ucode_wait_alive(struct iwm
 
sc->sc_uc_current = ucode_type;
error = iwm_start_fw(sc, ucode_type);
+   iwm_fw_info_free(&sc->sc_fw);
if (error) {
sc->sc_uc_current = old_type;
return error;
@@ -4936,7 +4937,6 @@ iwm_suspend(device_t dev)
 static int
 iwm_detach_local(struct iwm_softc *sc, int do_net80211)
 {
-   struct iwm_fw_info *fw = &sc->sc_fw;
device_t dev = sc->sc_dev;
int i;
 
@@ -4953,11 +4953,7 @@ iwm_detach_local(struct iwm_softc *sc, i
for (i = 0; i < nitems(sc->txq); i++)
iwm_free_tx_ring(sc, &sc->txq[i]);
 
-   /* Free firmware */
-   if (fw->fw_fp != NULL)
-   iwm_fw_info_free(fw);
-
-   /* free scheduler */
+   /* Free scheduler */
iwm_free_sched(sc);
if (sc->ict_dma.vaddr != NULL)
iwm_free_ict(sc);
___
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: r293179 - head/sys/dev/iwn

2016-01-04 Thread Andriy Voskoboinyk
Author: avos
Date: Mon Jan  4 21:11:27 2016
New Revision: 293179
URL: https://svnweb.freebsd.org/changeset/base/293179

Log:
  iwn: reduce code duplication in iwn_read_firmware()
  
  - Separate 'firmware_put(sc->fw_fp, FIRMWARE_UNLOAD); sc->fw_fp = NULL;'
  into iwn_unload_firmware().
  - Move error handling to the end of iwn_read_firmware().
  
  No functional changes.
  
  Approved by:  adrian (mentor)
  Differential Revision:https://reviews.freebsd.org/D4768

Modified:
  head/sys/dev/iwn/if_iwn.c

Modified: head/sys/dev/iwn/if_iwn.c
==
--- head/sys/dev/iwn/if_iwn.c   Mon Jan  4 21:07:08 2016(r293178)
+++ head/sys/dev/iwn/if_iwn.c   Mon Jan  4 21:11:27 2016(r293179)
@@ -318,6 +318,7 @@ static int  iwn_read_firmware_leg(struct 
 static int iwn_read_firmware_tlv(struct iwn_softc *,
struct iwn_fw_info *, uint16_t);
 static int iwn_read_firmware(struct iwn_softc *);
+static voidiwn_unload_firmware(struct iwn_softc *);
 static int iwn_clock_wait(struct iwn_softc *);
 static int iwn_apm_init(struct iwn_softc *);
 static voidiwn_apm_stop_master(struct iwn_softc *);
@@ -8200,9 +8201,8 @@ iwn_read_firmware(struct iwn_softc *sc)
if (fw->size < sizeof (uint32_t)) {
device_printf(sc->sc_dev, "%s: firmware too short: %zu bytes\n",
__func__, fw->size);
-   firmware_put(sc->fw_fp, FIRMWARE_UNLOAD);
-   sc->fw_fp = NULL;
-   return EINVAL;
+   error = EINVAL;
+   goto fail;
}
 
/* Retrieve text and data sections. */
@@ -8214,9 +8214,7 @@ iwn_read_firmware(struct iwn_softc *sc)
device_printf(sc->sc_dev,
"%s: could not read firmware sections, error %d\n",
__func__, error);
-   firmware_put(sc->fw_fp, FIRMWARE_UNLOAD);
-   sc->fw_fp = NULL;
-   return error;
+   goto fail;
}
 
device_printf(sc->sc_dev, "%s: ucode rev=0x%08x\n", __func__, 
sc->ucode_rev);
@@ -8230,13 +8228,22 @@ iwn_read_firmware(struct iwn_softc *sc)
(fw->boot.textsz & 3) != 0) {
device_printf(sc->sc_dev, "%s: firmware sections too large\n",
__func__);
-   firmware_put(sc->fw_fp, FIRMWARE_UNLOAD);
-   sc->fw_fp = NULL;
-   return EINVAL;
+   error = EINVAL;
+   goto fail;
}
 
/* We can proceed with loading the firmware. */
return 0;
+
+fail:  iwn_unload_firmware(sc);
+   return error;
+}
+
+static void
+iwn_unload_firmware(struct iwn_softc *sc)
+{
+   firmware_put(sc->fw_fp, FIRMWARE_UNLOAD);
+   sc->fw_fp = NULL;
 }
 
 static int
@@ -8724,8 +8731,7 @@ iwn_init_locked(struct iwn_softc *sc)
 
/* Initialize hardware and upload firmware. */
error = iwn_hw_init(sc);
-   firmware_put(sc->fw_fp, FIRMWARE_UNLOAD);
-   sc->fw_fp = NULL;
+   iwn_unload_firmware(sc);
if (error != 0) {
device_printf(sc->sc_dev,
"%s: could not initialize hardware, error %d\n", __func__,
___
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: r293180 - head/sys/dev/usb/wlan

2016-01-04 Thread Andriy Voskoboinyk
Author: avos
Date: Mon Jan  4 21:16:49 2016
New Revision: 293180
URL: https://svnweb.freebsd.org/changeset/base/293180

Log:
  urtwn: add bits for R92C_HWSEQ_CTRL and R92C_TXPAUSE registers
  
  Reviewed by:  kevlo
  Approved by:  adrian (mentor)
  Differential Revision:https://reviews.freebsd.org/D4770

Modified:
  head/sys/dev/usb/wlan/if_urtwn.c
  head/sys/dev/usb/wlan/if_urtwnreg.h

Modified: head/sys/dev/usb/wlan/if_urtwn.c
==
--- head/sys/dev/usb/wlan/if_urtwn.cMon Jan  4 21:11:27 2016
(r293179)
+++ head/sys/dev/usb/wlan/if_urtwn.cMon Jan  4 21:16:49 2016
(r293180)
@@ -2277,7 +2277,7 @@ urtwn_newstate(struct ieee80211vap *vap,
case IEEE80211_S_SCAN:
/* Pause AC Tx queues. */
urtwn_write_1(sc, R92C_TXPAUSE,
-   urtwn_read_1(sc, R92C_TXPAUSE) | 0x0f);
+   urtwn_read_1(sc, R92C_TXPAUSE) | R92C_TX_QUEUE_AC);
break;
case IEEE80211_S_AUTH:
urtwn_set_chan(sc, ic->ic_curchan, NULL);
@@ -4425,7 +4425,7 @@ urtwn_lc_calib(struct urtwn_softc *sc)
}
} else {
/* Block all Tx queues. */
-   urtwn_write_1(sc, R92C_TXPAUSE, 0xff);
+   urtwn_write_1(sc, R92C_TXPAUSE, R92C_TX_QUEUE_ALL);
}
/* Start calibration. */
urtwn_rf_write(sc, 0, R92C_RF_CHNLBW,
@@ -4640,7 +4640,7 @@ urtwn_init(struct urtwn_softc *sc)
ieee80211_runtask(ic, &sc->cmdq_task);
 
/* Enable hardware sequence numbering. */
-   urtwn_write_1(sc, R92C_HWSEQ_CTRL, 0xff);
+   urtwn_write_1(sc, R92C_HWSEQ_CTRL, R92C_TX_QUEUE_ALL);
 
/* Enable per-packet TX report. */
if (sc->chip & URTWN_CHIP_88E) {

Modified: head/sys/dev/usb/wlan/if_urtwnreg.h
==
--- head/sys/dev/usb/wlan/if_urtwnreg.h Mon Jan  4 21:11:27 2016
(r293179)
+++ head/sys/dev/usb/wlan/if_urtwnreg.h Mon Jan  4 21:16:49 2016
(r293180)
@@ -496,6 +496,24 @@
 #define R92C_EDCA_PARAM_TXOP_M 0x
 #define R92C_EDCA_PARAM_TXOP_S 16
 
+/* Bits for R92C_HWSEQ_CTRL / R92C_TXPAUSE. */
+#define R92C_TX_QUEUE_VO   0x01
+#define R92C_TX_QUEUE_VI   0x02
+#define R92C_TX_QUEUE_BE   0x04
+#define R92C_TX_QUEUE_BK   0x08
+#define R92C_TX_QUEUE_MGT  0x10
+#define R92C_TX_QUEUE_HIGH 0x20
+#define R92C_TX_QUEUE_BCN  0x40
+
+/* Shortcuts. */
+#define R92C_TX_QUEUE_AC   \
+   (R92C_TX_QUEUE_VO | R92C_TX_QUEUE_VI |  \
+R92C_TX_QUEUE_BE | R92C_TX_QUEUE_BK)
+
+#define R92C_TX_QUEUE_ALL  \
+   (R92C_TX_QUEUE_AC | R92C_TX_QUEUE_MGT | \
+R92C_TX_QUEUE_HIGH | R92C_TX_QUEUE_BCN | 0x80) /* XXX */
+
 /* Bits for R92C_BCN_CTRL. */
 #define R92C_BCN_CTRL_EN_MBSSID0x02
 #define R92C_BCN_CTRL_TXBCN_RPT0x04
___
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: r293183 - head/contrib/llvm/projects/libunwind/src

2016-01-04 Thread Ed Maste
Author: emaste
Date: Mon Jan  4 21:41:02 2016
New Revision: 293183
URL: https://svnweb.freebsd.org/changeset/base/293183

Log:
  Merge LLVM libunwind revision 256779

Modified:
  head/contrib/llvm/projects/libunwind/src/AddressSpace.hpp
  head/contrib/llvm/projects/libunwind/src/DwarfParser.hpp
  head/contrib/llvm/projects/libunwind/src/UnwindCursor.hpp
  head/contrib/llvm/projects/libunwind/src/UnwindRegistersSave.S
  head/contrib/llvm/projects/libunwind/src/config.h
  head/contrib/llvm/projects/libunwind/src/libunwind.cpp

Modified: head/contrib/llvm/projects/libunwind/src/AddressSpace.hpp
==
--- head/contrib/llvm/projects/libunwind/src/AddressSpace.hpp   Mon Jan  4 
21:31:59 2016(r293182)
+++ head/contrib/llvm/projects/libunwind/src/AddressSpace.hpp   Mon Jan  4 
21:41:02 2016(r293183)
@@ -35,7 +35,11 @@ namespace libunwind {
 #include "Registers.hpp"
 
 #if _LIBUNWIND_ARM_EHABI
-#ifdef __linux__
+#if defined(__FreeBSD__)
+
+typedef void *_Unwind_Ptr;
+
+#elif defined(__linux__)
 
 typedef long unsigned int *_Unwind_Ptr;
 extern "C" _Unwind_Ptr __gnu_Unwind_Find_exidx(_Unwind_Ptr addr, int *len);

Modified: head/contrib/llvm/projects/libunwind/src/DwarfParser.hpp
==
--- head/contrib/llvm/projects/libunwind/src/DwarfParser.hppMon Jan  4 
21:31:59 2016(r293182)
+++ head/contrib/llvm/projects/libunwind/src/DwarfParser.hppMon Jan  4 
21:41:02 2016(r293183)
@@ -380,7 +380,9 @@ bool CFI_Parser::parseInstructions(A 
 uint64_t length;
 uint8_t opcode = addressSpace.get8(p);
 uint8_t operand;
+#if !defined(_LIBUNWIND_NO_HEAP)
 PrologInfoStackEntry *entry;
+#endif
 ++p;
 switch (opcode) {
 case DW_CFA_nop:
@@ -492,6 +494,7 @@ bool CFI_Parser::parseInstructions(A 
 fprintf(stderr, "DW_CFA_register(reg=%" PRIu64 ", reg2=%" PRIu64 ")\n",
 reg, reg2);
   break;
+#if !defined(_LIBUNWIND_NO_HEAP)
 case DW_CFA_remember_state:
   // avoid operator new, because that would be an upward dependency
   entry = (PrologInfoStackEntry *)malloc(sizeof(PrologInfoStackEntry));
@@ -517,6 +520,7 @@ bool CFI_Parser::parseInstructions(A 
   if (logDwarf)
 fprintf(stderr, "DW_CFA_restore_state\n");
   break;
+#endif
 case DW_CFA_def_cfa:
   reg = addressSpace.getULEB128(p, instructionsEnd);
   offset = (int64_t)addressSpace.getULEB128(p, instructionsEnd);

Modified: head/contrib/llvm/projects/libunwind/src/UnwindCursor.hpp
==
--- head/contrib/llvm/projects/libunwind/src/UnwindCursor.hpp   Mon Jan  4 
21:31:59 2016(r293182)
+++ head/contrib/llvm/projects/libunwind/src/UnwindCursor.hpp   Mon Jan  4 
21:41:02 2016(r293183)
@@ -114,6 +114,7 @@ typename A::pint_t DwarfFDECache::fin
 template 
 void DwarfFDECache::add(pint_t mh, pint_t ip_start, pint_t ip_end,
pint_t fde) {
+#if !defined(_LIBUNWIND_NO_HEAP)
   _LIBUNWIND_LOG_NON_ZERO(::pthread_rwlock_wrlock(&_lock));
   if (_bufferUsed >= _bufferEnd) {
 size_t oldSize = (size_t)(_bufferEnd - _buffer);
@@ -139,6 +140,7 @@ void DwarfFDECache::add(pint_t mh, pi
   }
 #endif
   _LIBUNWIND_LOG_NON_ZERO(::pthread_rwlock_unlock(&_lock));
+#endif
 }
 
 template 

Modified: head/contrib/llvm/projects/libunwind/src/UnwindRegistersSave.S
==
--- head/contrib/llvm/projects/libunwind/src/UnwindRegistersSave.S  Mon Jan 
 4 21:31:59 2016(r293182)
+++ head/contrib/llvm/projects/libunwind/src/UnwindRegistersSave.S  Mon Jan 
 4 21:41:02 2016(r293183)
@@ -87,6 +87,15 @@ DEFINE_LIBUNWIND_FUNCTION(unw_getcontext
   xorl  %eax, %eax# return UNW_ESUCCESS
   ret
 
+# elif defined(__mips__)
+
+#
+# extern int unw_getcontext(unw_context_t* thread_state)
+#
+# Just trap for the time being.
+DEFINE_LIBUNWIND_FUNCTION(unw_getcontext)
+  teq $0, $0
+
 #elif defined(__ppc__)
 
 ;

Modified: head/contrib/llvm/projects/libunwind/src/config.h
==
--- head/contrib/llvm/projects/libunwind/src/config.h   Mon Jan  4 21:31:59 
2016(r293182)
+++ head/contrib/llvm/projects/libunwind/src/config.h   Mon Jan  4 21:41:02 
2016(r293183)
@@ -41,7 +41,8 @@
 
   #define _LIBUNWIND_BUILD_ZERO_COST_APIS (defined(__i386__) || \
defined(__x86_64__) || \
-   defined(__arm64__))
+   defined(__arm64__) || \
+   defined(__mips__))
   #define _LIBUNWIND_BUILD_SJLJ_APIS  defined(__arm__)
   #define _LIBUNWIND_SUPPORT_FRAME_APIS   (defined(__i386__) || \
  

Re: svn commit: r293112 - head/sys/dev/ixl

2016-01-04 Thread NGie Cooper
On Sun, Jan 3, 2016 at 2:23 PM, John Baldwin  wrote:

...

> FWIW, it is probably simpler to do something like this in an ixl header 
> instead:
>
> #if __FreeBSD_version <= 1100022
> #define if_getdrvflags(ifp) (ifp)->if_drv_flags
> #endif
>
> In the past when the Intel drivers have used compat shims they have preferred 
> this
> method (defining compat macros for "new" APIs on old OS versions) instead of 
> using
> #ifdef's in the code itself.

You're right. What I did was incredibly ugly and only fixes one
potential instance (of which more might appear later).. I'll send out
a CR moving the definition to a header file and commit the change.
Thanks!
-NGie
___
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: r292809 - head/lib/libc/stdio

2016-01-04 Thread Warner Losh
Be my guest to implement these things. I don't think it matters much, and
adds a lot of
complexity to avoid a single roundup call. And if we have more-strict
alignment for
glue than ALIGNBYTES, we're already doomed. We don't do that today.

Warner

On Tue, Dec 29, 2015 at 3:51 PM, Ian Lepore  wrote:

> On Tue, 2015-12-29 at 11:37 -0800, John Baldwin wrote:
> > On Monday, December 28, 2015 01:01:26 PM Warner Losh wrote:
> > > I'll look at that, but I don't think posix_memalign is the right
> > > way to go.
> > > The alignment of FILE is more strict than posix_memalign will
> > > return. Ian's
> > > idea of __alignof__ is the way to go. We allocate them in one block
> > > on
> > > purpose for performance, and posix_memalign would be a one at a
> > > time affair.
> >
> > posix_memalign gives you whatever alignment you ask for.  Using
> > __alignof__
> > to determine the alignment instead of hardcoding sizeof(int64_t)
> > would
> > certainly be an improvement.  If you move the glue after the FILE
> > objects
> > then you can use posix_memalign() directly as so:
> >
> >   void *mem;
> >   int error;
> >
> >   error = posix_memalign(&mem, MAX(ALIGNBYTES,
> > __alignof__(mbstate_t)),
> >   n * sizeof(FILE) + sizeof(*g));
> >   if (error)
> >   return (NULL);
> >   p = (FILE *)mem;
> >   g = (struct glue *)(p + n);
> >   g->next = NULL;
> >   g->niobs = n;
> >   g->iobs = p;
> >   ...
> >
> > (This presumes that the requested alignment of 'struct glue' is less
> > than
> > the alignment needed by FILE which should be true.)
> >
>
> If there's going to be an assumption that __alignof__(glue) <=
> __alignof__(FILE), it might be nice to have a static_assert() of that
> to prevent a future time bomb similar to the one that exploded on arm
> when it turned out the opposite assumption was wrong.
>
> -- Ian
>
>
___
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: r292472 - in head/sys: amd64/amd64 sys

2016-01-04 Thread Warner Losh
On Mon, Dec 21, 2015 at 1:38 PM, John Baldwin  wrote:

> On Saturday, December 19, 2015 07:01:43 PM Warner Losh wrote:
> > Author: imp
> > Date: Sat Dec 19 19:01:43 2015
> > New Revision: 292472
> > URL: https://svnweb.freebsd.org/changeset/base/292472
> >
> > Log:
> >   Save the physical address passed into the kernel of the UEFI system
> >   table.
> >
> > Modified:
> >   head/sys/amd64/amd64/machdep.c
> >   head/sys/sys/efi.h
> >
> > Modified: head/sys/amd64/amd64/machdep.c
> >
> ==
> > --- head/sys/amd64/amd64/machdep.cSat Dec 19 19:01:42 2015
> (r292471)
> > +++ head/sys/amd64/amd64/machdep.cSat Dec 19 19:01:43 2015
> (r292472)
> > @@ -1615,6 +1622,8 @@ hammer_time(u_int64_t modulep, u_int64_t
> >   /*
> >* Use vt(4) by default for UEFI boot (during the sc(4)/vt(4)
> >* transition).
> > +  * Once bootblocks have updated, we can test directly for
> > +  * efi_systbl != NULL here...
> >*/
> >   if (preload_search_info(kmdp, MODINFO_METADATA | MODINFOMD_EFI_MAP)
> >   != NULL)
>
> This part doesn't seem worth changing since the EFI map is always going to
> be
> there and works for both old and new loaders?
>

Just a simpler test. This code suffers from too much complexity, but maybe
compat
will keep us from doing this for a long time.

Warner
___
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: r292644 - head/tools/tools/nanobsd/embedded

2016-01-04 Thread Warner Losh
Thanks Ian. I'll adjust. The dtb files don't hurt anything, and it would be
extra config to have
some platforms do it and not others (something I'm trying to avoid). I'll
document it for later.
However, if there's no point to the uenv file, that's easy to just remove.

Warner

On Wed, Dec 23, 2015 at 1:41 PM, Ian Lepore  wrote:

> On Wed, 2015-12-23 at 06:49 +, Warner Losh wrote:
> > Author: imp
> > Date: Wed Dec 23 06:49:18 2015
> > New Revision: 292644
> > URL: https://svnweb.freebsd.org/changeset/base/292644
> >
> > Log:
> >   Copy all the dtb files that we build as part of the kernel build
> > from
> >   boot/dtb to the fat partition. They seem to be needed.
> >   Create an empty uEnv.txt file
>
> Of all the arm platforms we support, only RPi and RPi2 require the dtb
> files to be in the fat partition.
>
> The only advantage to an empty uEnv.txt file is that it will suppress a
> warning about not being able to read it.  There's no way to suppress a
> similar warning about a bad saved-environment checksum that u-boot
> emits if you've never changed anything and done a saveenv.
>
> -- Ian
>
>
___
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: r293185 - head/sys/dev/cxgbe/iw_cxgbe

2016-01-04 Thread Navdeep Parhar
Author: np
Date: Tue Jan  5 01:32:40 2016
New Revision: 293185
URL: https://svnweb.freebsd.org/changeset/base/293185

Log:
  iw_cxgbe: Shut down the socket but do not close the fd in case of error.
  The fd is closed later in this case.  This fixes a "SS_NOFDREF on enter"
  panic.
  
  Submitted by: Krishnamraju Eraparaju @ Chelsio
  Reviewed by:  Steve Wise @ Open Grid Computing

Modified:
  head/sys/dev/cxgbe/iw_cxgbe/cm.c

Modified: head/sys/dev/cxgbe/iw_cxgbe/cm.c
==
--- head/sys/dev/cxgbe/iw_cxgbe/cm.cMon Jan  4 22:32:37 2016
(r293184)
+++ head/sys/dev/cxgbe/iw_cxgbe/cm.cTue Jan  5 01:32:40 2016
(r293185)
@@ -474,7 +474,7 @@ process_conn_error(struct c4iw_ep *ep)
if (state != ABORTING) {
 
CTR2(KTR_IW_CXGBE, "%s:pce1 %p", __func__, ep);
-   close_socket(&ep->com, 1);
+   close_socket(&ep->com, 0);
state_set(&ep->com, DEAD);
c4iw_put_ep(&ep->com);
}
___
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: r293186 - head/sys/contrib/rdma/krping

2016-01-04 Thread Navdeep Parhar
Author: np
Date: Tue Jan  5 01:58:30 2016
New Revision: 293186
URL: https://svnweb.freebsd.org/changeset/base/293186

Log:
  Have krping use IB_ACCESS_LOCAL_WRITE because it's required for remote
  write or remote atomic operations.
  
  Submitted by: Krishnamraju Eraparaju @ Chelsio

Modified:
  head/sys/contrib/rdma/krping/krping.c

Modified: head/sys/contrib/rdma/krping/krping.c
==
--- head/sys/contrib/rdma/krping/krping.c   Tue Jan  5 01:32:40 2016
(r293185)
+++ head/sys/contrib/rdma/krping/krping.c   Tue Jan  5 01:58:30 2016
(r293186)
@@ -640,6 +640,7 @@ static int krping_setup_buffers(struct k
buf.size = cb->size;
iovbase = cb->rdma_dma_addr;
cb->rdma_mr = ib_reg_phys_mr(cb->pd, &buf, 1, 
+IB_ACCESS_LOCAL_WRITE|
 IB_ACCESS_REMOTE_READ| 
 IB_ACCESS_REMOTE_WRITE, 
 &iovbase);
@@ -675,8 +676,10 @@ static int krping_setup_buffers(struct k
if (cb->mem == MR || cb->mem == MW) {
unsigned flags = IB_ACCESS_REMOTE_READ;
 
-   if (cb->wlat || cb->rlat || cb->bw)
-   flags |= IB_ACCESS_REMOTE_WRITE;
+   if (cb->wlat || cb->rlat || cb->bw) {
+   flags |= IB_ACCESS_LOCAL_WRITE |
+   IB_ACCESS_REMOTE_WRITE;
+   }
 
buf.addr = cb->start_dma_addr;
buf.size = cb->size;
___
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: r293187 - head/libexec/rtld-elf/amd64

2016-01-04 Thread Ed Maste
Author: emaste
Date: Tue Jan  5 02:21:57 2016
New Revision: 293187
URL: https://svnweb.freebsd.org/changeset/base/293187

Log:
  rtld: wrap a comment to 80 columns

Modified:
  head/libexec/rtld-elf/amd64/reloc.c

Modified: head/libexec/rtld-elf/amd64/reloc.c
==
--- head/libexec/rtld-elf/amd64/reloc.c Tue Jan  5 01:58:30 2016
(r293186)
+++ head/libexec/rtld-elf/amd64/reloc.c Tue Jan  5 02:21:57 2016
(r293187)
@@ -228,8 +228,8 @@ reloc_non_plt(Obj_Entry *obj, Obj_Entry 
/*
 * These are deferred until all other relocations have
 * been done.  All we do here is make sure that the COPY
-* relocation is not in a shared library.  They are 
allowed
-* only in executable files.
+* relocation is not in a shared library.  They are
+* allowed only in executable files.
 */
if (!obj->mainprog) {
_rtld_error("%s: Unexpected R_X86_64_COPY "
___
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: r293188 - in head/release: amd64 arm64 i386 powerpc

2016-01-04 Thread Glen Barber
Author: gjb
Date: Tue Jan  5 03:20:45 2016
New Revision: 293188
URL: https://svnweb.freebsd.org/changeset/base/293188

Log:
  Prevent memstick installation medium from attempting to mount
  the root filesystem read-write.  This causes problems booting
  the memstick installation medium from write-protected USB flash
  drives.
  
  Submitted by: A.J. Kehoe IV [1], Oliver Jones [2]
  PR:   187161 [1], 205886 [2]
  MFC after:1 week
  Sponsored by: The FreeBSD Foundation

Modified:
  head/release/amd64/make-memstick.sh
  head/release/arm64/make-memstick.sh
  head/release/i386/make-memstick.sh
  head/release/powerpc/make-memstick.sh

Modified: head/release/amd64/make-memstick.sh
==
--- head/release/amd64/make-memstick.sh Tue Jan  5 02:21:57 2016
(r293187)
+++ head/release/amd64/make-memstick.sh Tue Jan  5 03:20:45 2016
(r293188)
@@ -29,12 +29,14 @@ if [ -e ${2} ]; then
 fi
 
 echo '/dev/ufs/FreeBSD_Install / ufs ro,noatime 1 1' > ${1}/etc/fstab
+echo 'root_rw_mount="NO"' > ${1}/etc/rc.conf.local
 makefs -B little -o label=FreeBSD_Install ${2}.part ${1}
 if [ $? -ne 0 ]; then
echo "makefs failed"
exit 1
 fi
 rm ${1}/etc/fstab
+rm ${1}/etc/rc.conf.local
 
 mkimg -s gpt -b ${1}/boot/pmbr -p efi:=${1}/boot/boot1.efifat -p 
freebsd-boot:=${1}/boot/gptboot -p freebsd-ufs:=${2}.part -p freebsd-swap::1M 
-o ${2}
 rm ${2}.part

Modified: head/release/arm64/make-memstick.sh
==
--- head/release/arm64/make-memstick.sh Tue Jan  5 02:21:57 2016
(r293187)
+++ head/release/arm64/make-memstick.sh Tue Jan  5 03:20:45 2016
(r293188)
@@ -29,12 +29,14 @@ if [ -e ${2} ]; then
 fi
 
 echo '/dev/ufs/FreeBSD_Install / ufs ro,noatime 1 1' > ${1}/etc/fstab
+echo 'root_rw_mount="NO"' > ${1}/etc/rc.conf.local
 makefs -B little -o label=FreeBSD_Install ${2}.part ${1}
 if [ $? -ne 0 ]; then
echo "makefs failed"
exit 1
 fi
 rm ${1}/etc/fstab
+rm ${1}/etc/rc.conf.local
 
 mkimg -s mbr -p efi:=${1}/boot/boot1.efifat -p freebsd:=${2}.part -o ${2}
 rm ${2}.part

Modified: head/release/i386/make-memstick.sh
==
--- head/release/i386/make-memstick.sh  Tue Jan  5 02:21:57 2016
(r293187)
+++ head/release/i386/make-memstick.sh  Tue Jan  5 03:20:45 2016
(r293188)
@@ -29,12 +29,14 @@ if [ -e ${2} ]; then
 fi
 
 echo '/dev/ufs/FreeBSD_Install / ufs ro,noatime 1 1' > ${1}/etc/fstab
+echo 'root_rw_mount="NO"' > ${1}/etc/rc.conf.local
 makefs -B little -o label=FreeBSD_Install ${2}.part ${1}
 if [ $? -ne 0 ]; then
echo "makefs failed"
exit 1
 fi
 rm ${1}/etc/fstab
+rm ${1}/etc/rc.conf.local
 
 mkimg -s gpt -b ${1}/boot/pmbr -p freebsd-boot:=${1}/boot/gptboot -p 
freebsd-ufs:=${2}.part -p freebsd-swap::1M -o ${2}
 rm ${2}.part

Modified: head/release/powerpc/make-memstick.sh
==
--- head/release/powerpc/make-memstick.sh   Tue Jan  5 02:21:57 2016
(r293187)
+++ head/release/powerpc/make-memstick.sh   Tue Jan  5 03:20:45 2016
(r293188)
@@ -33,6 +33,7 @@ if [ -e ${2} ]; then
 fi
 
 echo '/dev/da0s3 / ufs ro,noatime 1 1' > ${1}/etc/fstab
+echo 'root_rw_mount="NO"' > ${1}/etc/rc.conf.local
 rm -f ${tempfile}
 makefs -B big ${tempfile} ${1}
 if [ $? -ne 0 ]; then
@@ -40,6 +41,7 @@ if [ $? -ne 0 ]; then
   exit 1
 fi
 rm ${1}/etc/fstab
+rm ${1}/etc/rc.conf.local
 
 mkimg -s apm -p freebsd-boot:=${1}/boot/boot1.hfs -p 
freebsd-ufs/FreeBSD_Install:=${tempfile} -o ${2}
 
___
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: r293190 - in head: contrib/less usr.bin/less

2016-01-04 Thread Xin LI
Author: delphij
Date: Tue Jan  5 05:25:16 2016
New Revision: 293190
URL: https://svnweb.freebsd.org/changeset/base/293190

Log:
  MFV r293125: less v481.
  
  MFC after:1 month
  Relnotes: yes

Added:
  head/contrib/less/compose.uni
 - copied unchanged from r293126, vendor/less/dist/compose.uni
  head/contrib/less/mkutable
 - copied unchanged from r293126, vendor/less/dist/mkutable
  head/contrib/less/ubin.uni
 - copied unchanged from r293126, vendor/less/dist/ubin.uni
  head/contrib/less/wide.uni
 - copied unchanged from r293126, vendor/less/dist/wide.uni
Modified:
  head/contrib/less/LICENSE
  head/contrib/less/NEWS
  head/contrib/less/README
  head/contrib/less/brac.c
  head/contrib/less/ch.c
  head/contrib/less/charset.c
  head/contrib/less/charset.h
  head/contrib/less/cmd.h
  head/contrib/less/cmdbuf.c
  head/contrib/less/command.c
  head/contrib/less/cvt.c
  head/contrib/less/decode.c
  head/contrib/less/edit.c
  head/contrib/less/filename.c
  head/contrib/less/forwback.c
  head/contrib/less/funcs.h
  head/contrib/less/help.c
  head/contrib/less/ifile.c
  head/contrib/less/input.c
  head/contrib/less/jump.c
  head/contrib/less/less.h
  head/contrib/less/less.hlp
  head/contrib/less/less.nro
  head/contrib/less/lessecho.c
  head/contrib/less/lessecho.nro
  head/contrib/less/lesskey.c
  head/contrib/less/lesskey.h
  head/contrib/less/lesskey.nro
  head/contrib/less/lglob.h
  head/contrib/less/line.c
  head/contrib/less/linenum.c
  head/contrib/less/lsystem.c
  head/contrib/less/main.c
  head/contrib/less/mark.c
  head/contrib/less/mkhelp.c
  head/contrib/less/optfunc.c
  head/contrib/less/option.c
  head/contrib/less/option.h
  head/contrib/less/opttbl.c
  head/contrib/less/os.c
  head/contrib/less/output.c
  head/contrib/less/pattern.c
  head/contrib/less/pattern.h
  head/contrib/less/pckeys.h
  head/contrib/less/position.c
  head/contrib/less/position.h
  head/contrib/less/prompt.c
  head/contrib/less/regexp.c
  head/contrib/less/screen.c
  head/contrib/less/scrsize.c
  head/contrib/less/search.c
  head/contrib/less/signal.c
  head/contrib/less/tags.c
  head/contrib/less/ttyin.c
  head/contrib/less/version.c
  head/usr.bin/less/defines.h
Directory Properties:
  head/contrib/less/   (props changed)

Modified: head/contrib/less/LICENSE
==
--- head/contrib/less/LICENSE   Tue Jan  5 03:22:10 2016(r293189)
+++ head/contrib/less/LICENSE   Tue Jan  5 05:25:16 2016(r293190)
@@ -2,7 +2,7 @@
   
 
 Less
-Copyright (C) 1984-2012  Mark Nudelman
+Copyright (C) 1984-2015  Mark Nudelman
 
 Redistribution and use in source and binary forms, with or without
 modification, are permitted provided that the following conditions

Modified: head/contrib/less/NEWS
==
--- head/contrib/less/NEWS  Tue Jan  5 03:22:10 2016(r293189)
+++ head/contrib/less/NEWS  Tue Jan  5 05:25:16 2016(r293190)
@@ -7,7 +7,44 @@
   http://www.greenwoodsoftware.com/less
   You can also download the latest version of less from there.
 
-  To report bugs, suggestions or comments, send email to bug-l...@gnu.org.
+  To report bugs, suggestions or comments, send email to bug-l...@gnu.org
+
+==
+
+   Major changes between "less" versions 458 and 481
+
+* Don't overwrite history file; just append to it.
+
+* New command ESC-G goes to end of currently buffered data in a pipe.
+
+* Disable history feature when compiled with LESSHISTFILE set to "-".
+
+* In more-compatible mode, make the -p option apply to every file opened,
+  not just the first one.
+
+* In more-compatible mode, change the -e option to work like -E, not -EF.
+
+* Treat multiple CRs before LF are like one CR (all the CRs are hidden).
+
+* Allow "extra" string in lesskey file to append to a multi-char command
+  (like a search pattern), without executing the command.
+
+* Ignore -u/-U setting while viewing help file, so that 
+  underline and bold chars are displayed correctly.
+
+* Improve detection of "binary" files in UTF-8 mode.
+
+* Fix bug with ++ commands.
+
+* Fix bug where prompt was sometimes not displayed with +G.
+
+* Fix possible memory corruption 
+
+* Fix bugs and improve performance in ampersand filtering.
+
+* Automate construction of Unicode tables from Unicode database.
+
+* Allow %% escape sequence in LESSOPEN variable.
 
 ==
 

Modified: head/contrib/less/README
==
--- head/contrib/less/READMETue Jan  5 03:22:10 2016(r293189)
+++ head/contrib/less/READMETue Jan  5 05:25:16 2016(r293190)
@@ -7,9 +7,9 @@
 **
 *