svn commit: r251837 - in head/sys/cam: . scsi

2013-06-17 Thread Scott Long
Author: scottl
Date: Mon Jun 17 08:57:09 2013
New Revision: 251837
URL: http://svnweb.freebsd.org/changeset/base/251837

Log:
  Add infrastructure for doing compatibility shims, as has been sorely
  needed for the last 10 years.  Far too much of the internal API is
  exposed, and every small adjustment causes applications to stop working.
  To kick this off, bump the API version to 0x17 as should have been done
  with r246713, but add shims to compensate.  Thanks to the shims, there
  should be no visible change in application behavior.
  
  I have plans to do a significant overhaul of the API to harnen it for
  the future, but until then, I welcome others to add shims for older
  versions of the API.
  
  Obtained from:Netflix

Added:
  head/sys/cam/cam_compat.c   (contents, props changed)
  head/sys/cam/cam_compat.h   (contents, props changed)
Modified:
  head/sys/cam/cam_ccb.h
  head/sys/cam/cam_xpt.c
  head/sys/cam/scsi/scsi_pass.c

Modified: head/sys/cam/cam_ccb.h
==
--- head/sys/cam/cam_ccb.h  Mon Jun 17 08:53:55 2013(r251836)
+++ head/sys/cam/cam_ccb.h  Mon Jun 17 08:57:09 2013(r251837)
@@ -541,7 +541,7 @@ struct ccb_dev_match {
 /*
  * Definitions for the path inquiry CCB fields.
  */
-#define CAM_VERSION0x16/* Hex value for current version */
+#define CAM_VERSION0x17/* Hex value for current version */
 
 typedef enum {
PI_MDP_ABLE = 0x80, /* Supports MDP message */

Added: head/sys/cam/cam_compat.c
==
--- /dev/null   00:00:00 1970   (empty, because file is newly added)
+++ head/sys/cam/cam_compat.c   Mon Jun 17 08:57:09 2013(r251837)
@@ -0,0 +1,89 @@
+/*-
+ * CAM ioctl compatibility shims
+ *
+ * Copyright (c) 2013 Scott Long
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *notice, this list of conditions, and the following disclaimer,
+ *without modification, immediately at the beginning of the file.
+ * 2. The name of the author may not be used to endorse or promote products
+ *derived from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE FOR
+ * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ *
+ */
+
+#include sys/cdefs.h
+__FBSDID($FreeBSD$);
+
+#include sys/param.h
+#include sys/systm.h
+#include sys/types.h
+#include sys/kernel.h
+#include sys/conf.h
+#include sys/fcntl.h
+
+#include sys/lock.h
+#include sys/mutex.h
+#include sys/sysctl.h
+#include sys/kthread.h
+
+#include cam/cam.h
+#include cam/cam_ccb.h
+#include cam/cam_compat.h
+
+#include cam/scsi/scsi_pass.h
+
+#include opt_cam.h
+
+int
+cam_compat_ioctl(struct cdev *dev, u_long *cmd, caddr_t *addr, int *flag, 
struct thread *td)
+{
+   int error;
+
+   switch (*cmd) {
+   case CAMIOCOMMAND_0x16:
+   {
+   union ccb *ccb;
+
+   ccb = (union ccb *)*addr;
+   if (ccb-ccb_h.flags  CAM_SG_LIST_PHYS_0x16) {
+   ccb-ccb_h.flags = ~CAM_SG_LIST_PHYS_0x16;
+   ccb-ccb_h.flags |= CAM_DATA_SG_PADDR;
+   }
+   if (ccb-ccb_h.flags  CAM_DATA_PHYS_0x16) {
+   ccb-ccb_h.flags = ~CAM_DATA_PHYS_0x16;
+   ccb-ccb_h.flags |= CAM_DATA_PADDR;
+   }
+   if (ccb-ccb_h.flags  CAM_SCATTER_VALID_0x16) {
+   ccb-ccb_h.flags = CAM_SCATTER_VALID_0x16;
+   ccb-ccb_h.flags |= CAM_DATA_SG;
+   }
+   *cmd = CAMIOCOMMAND;
+   error = EAGAIN;
+   break;
+   }
+   case CAMGETPASSTHRU_0x16:
+   *cmd = CAMGETPASSTHRU;
+   error = EAGAIN;
+   break;
+   default:
+   error = ENOTTY;
+   }
+
+   return (error);
+}

Added: head/sys/cam/cam_compat.h
==
--- /dev/null   00:00:00 1970   (empty, because file is newly 

svn commit: r251838 - head/sys/kern

2013-06-17 Thread Lawrence Stewart
Author: lstewart
Date: Mon Jun 17 09:49:07 2013
New Revision: 251838
URL: http://svnweb.freebsd.org/changeset/base/251838

Log:
  The fix committed in r250951 replaced the reported panic with a deadlock... 
gold
  star for me. EVENTHANDLER_DEREGISTER() attempts to acquire the lock which is
  held by the event handler framework while executing event handler functions,
  leading to deadlock.
  
  Move EVENTHANDLER_DEREGISTER() to alq_load_handler() and thus deregister the 
ALQ
  shutdown_pre_sync handler at module unload time, which takes care of the
  originally reported panic and fixes the deadlock introduced in r250951.
  
  Reported by:  Luiz Otavio O Souza
  MFC after:3 days
  X-MFC with:   250951

Modified:
  head/sys/kern/kern_alq.c

Modified: head/sys/kern/kern_alq.c
==
--- head/sys/kern/kern_alq.cMon Jun 17 08:57:09 2013(r251837)
+++ head/sys/kern/kern_alq.cMon Jun 17 09:49:07 2013(r251838)
@@ -229,8 +229,6 @@ ald_shutdown(void *arg, int howto)
 {
struct alq *alq;
 
-   EVENTHANDLER_DEREGISTER(shutdown_pre_sync, alq_eventhandler_tag);
-
ALD_LOCK();
 
/* Ensure no new queues can be created. */
@@ -938,6 +936,8 @@ alq_load_handler(module_t mod, int what,
if (LIST_FIRST(ald_queues) == NULL) {
ald_shutingdown = 1;
ALD_UNLOCK();
+   EVENTHANDLER_DEREGISTER(shutdown_pre_sync,
+   alq_eventhandler_tag);
ald_shutdown(NULL, 0);
mtx_destroy(ald_mtx);
} else {
___
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to svn-src-head-unsubscr...@freebsd.org


svn commit: r251842 - in head/sys: conf modules/cam

2013-06-17 Thread Scott Long
Author: scottl
Date: Mon Jun 17 10:21:38 2013
New Revision: 251842
URL: http://svnweb.freebsd.org/changeset/base/251842

Log:
  This is an addendum to r251837.
  Missed adding the new references to cam_compat.c to the various makefiles.
  
  Obtained from:Netflix

Modified:
  head/sys/conf/files
  head/sys/modules/cam/Makefile

Modified: head/sys/conf/files
==
--- head/sys/conf/files Mon Jun 17 10:14:08 2013(r251841)
+++ head/sys/conf/files Mon Jun 17 10:21:38 2013(r251842)
@@ -103,6 +103,7 @@ usbdevs_data.h  optional usb
   \
no-obj no-implicit-rule before-depend  \
clean   usbdevs_data.h
 cam/cam.c  optional scbus
+cam/cam_compat.c   optional scbus
 cam/cam_periph.c   optional scbus
 cam/cam_queue.coptional scbus
 cam/cam_sim.c  optional scbus

Modified: head/sys/modules/cam/Makefile
==
--- head/sys/modules/cam/Makefile   Mon Jun 17 10:14:08 2013
(r251841)
+++ head/sys/modules/cam/Makefile   Mon Jun 17 10:21:38 2013
(r251842)
@@ -15,6 +15,7 @@ SRCS+=opt_pt.h
 SRCS+= opt_sa.h
 SRCS+= device_if.h bus_if.h vnode_if.h
 SRCS+= cam.c
+SRCS+= cam_compat.c
 .if exists($S/${MACHINE}/${MACHINE}/cam_machdep.c)
 SRCS+= cam_machdep.c
 .endif
___
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to svn-src-head-unsubscr...@freebsd.org


svn commit: r251843 - in head: contrib/dialog contrib/dialog/package contrib/dialog/package/debian contrib/dialog/po contrib/dialog/samples contrib/dialog/samples/copifuncs contrib/dialog/samples/i...

2013-06-17 Thread Baptiste Daroussin
Author: bapt
Date: Mon Jun 17 10:28:55 2013
New Revision: 251843
URL: http://svnweb.freebsd.org/changeset/base/251843

Log:
  Update dialog to 1.2-20130523
  Level up WARNS

Added:
  head/contrib/dialog/buildlist.c
 - copied unchanged from r251840, vendor/dialog/dist/buildlist.c
  head/contrib/dialog/po/an.po
 - copied unchanged from r251840, vendor/dialog/dist/po/an.po
  head/contrib/dialog/po/ia.po
 - copied unchanged from r251840, vendor/dialog/dist/po/ia.po
  head/contrib/dialog/rangebox.c
 - copied unchanged from r251840, vendor/dialog/dist/rangebox.c
  head/contrib/dialog/samples/buildlist
 - copied unchanged from r251840, vendor/dialog/dist/samples/buildlist
  head/contrib/dialog/samples/buildlist2
 - copied unchanged from r251840, vendor/dialog/dist/samples/buildlist2
  head/contrib/dialog/samples/checklist12
 - copied unchanged from r251840, vendor/dialog/dist/samples/checklist12
  head/contrib/dialog/samples/dft-cancel
 - copied unchanged from r251840, vendor/dialog/dist/samples/dft-cancel
  head/contrib/dialog/samples/dft-extra
 - copied unchanged from r251840, vendor/dialog/dist/samples/dft-extra
  head/contrib/dialog/samples/dft-help
 - copied unchanged from r251840, vendor/dialog/dist/samples/dft-help
  head/contrib/dialog/samples/dft-no
 - copied unchanged from r251840, vendor/dialog/dist/samples/dft-no
  head/contrib/dialog/samples/fselect0
 - copied unchanged from r251840, vendor/dialog/dist/samples/fselect0
  head/contrib/dialog/samples/menubox12
 - copied unchanged from r251840, vendor/dialog/dist/samples/menubox12
  head/contrib/dialog/samples/rangebox
 - copied unchanged from r251840, vendor/dialog/dist/samples/rangebox
  head/contrib/dialog/samples/rangebox2
 - copied unchanged from r251840, vendor/dialog/dist/samples/rangebox2
  head/contrib/dialog/samples/rangebox3
 - copied unchanged from r251840, vendor/dialog/dist/samples/rangebox3
  head/contrib/dialog/samples/rangebox4
 - copied unchanged from r251840, vendor/dialog/dist/samples/rangebox4
  head/contrib/dialog/samples/treeview
 - copied unchanged from r251840, vendor/dialog/dist/samples/treeview
  head/contrib/dialog/samples/treeview2
 - copied unchanged from r251840, vendor/dialog/dist/samples/treeview2
  head/contrib/dialog/samples/with-dquotes
 - copied unchanged from r251840, vendor/dialog/dist/samples/with-dquotes
  head/contrib/dialog/samples/with-squotes
 - copied unchanged from r251840, vendor/dialog/dist/samples/with-squotes
  head/contrib/dialog/treeview.c
 - copied unchanged from r251840, vendor/dialog/dist/treeview.c
Deleted:
  head/contrib/dialog/samples/copifuncs/admin.funcs
  head/contrib/dialog/samples/copifuncs/common.funcs
  head/contrib/dialog/samples/copifuncs/copi.funcs
  head/contrib/dialog/samples/copifuncs/copi.ifman1
  head/contrib/dialog/samples/copifuncs/copi.ifman2
  head/contrib/dialog/samples/copifuncs/copi.ifmcfg2
  head/contrib/dialog/samples/copifuncs/copi.ifmcfg4
  head/contrib/dialog/samples/copifuncs/copi.ifmcfg5
  head/contrib/dialog/samples/copifuncs/copi.ifpoll1
  head/contrib/dialog/samples/copifuncs/copi.ifpoll2
  head/contrib/dialog/samples/copifuncs/copi.ifreq1
  head/contrib/dialog/samples/copifuncs/copi.ifreq2
  head/contrib/dialog/samples/copifuncs/copi.rcnews
  head/contrib/dialog/samples/copifuncs/copi.sendifm1
  head/contrib/dialog/samples/copifuncs/copi.sendifm2
  head/contrib/dialog/samples/copifuncs/copi.trnrc
  head/contrib/dialog/samples/copifuncs/copi.wheel
  head/contrib/dialog/samples/copifuncs/ifpatch
  head/contrib/dialog/samples/copismall
  head/contrib/dialog/samples/dselect
  head/contrib/dialog/samples/install/FDISK.TEST
  head/contrib/dialog/samples/install/makefile.in
  head/contrib/dialog/samples/install/setup.c
  head/contrib/dialog/samples/install/setup.help
  head/contrib/dialog/samples/valgrind.log
Modified:
  head/contrib/dialog/CHANGES
  head/contrib/dialog/VERSION
  head/contrib/dialog/aclocal.m4
  head/contrib/dialog/argv.c
  head/contrib/dialog/arrows.c
  head/contrib/dialog/buttons.c
  head/contrib/dialog/calendar.c
  head/contrib/dialog/checklist.c
  head/contrib/dialog/columns.c
  head/contrib/dialog/config.guess
  head/contrib/dialog/config.sub
  head/contrib/dialog/configure
  head/contrib/dialog/configure.in
  head/contrib/dialog/dialog-config.in
  head/contrib/dialog/dialog.1
  head/contrib/dialog/dialog.3
  head/contrib/dialog/dialog.c
  head/contrib/dialog/dialog.h
  head/contrib/dialog/dlg_colors.h
  head/contrib/dialog/dlg_keys.c
  head/contrib/dialog/dlg_keys.h
  head/contrib/dialog/editbox.c
  head/contrib/dialog/formbox.c
  head/contrib/dialog/fselect.c
  head/contrib/dialog/guage.c
  head/contrib/dialog/headers-sh.in
  head/contrib/dialog/help.c
  head/contrib/dialog/inputbox.c
  head/contrib/dialog/inputstr.c
  head/contrib/dialog/makefile.in
  head/contrib/dialog/menubox.c
  head/contrib/dialog/mixedform.c
  head/contrib/dialog/mixedgauge.c
  

svn commit: r251844 - head/contrib/gdb/gdb

2013-06-17 Thread Ed Maste
Author: emaste
Date: Mon Jun 17 12:49:26 2013
New Revision: 251844
URL: http://svnweb.freebsd.org/changeset/base/251844

Log:
  Include die tag in error message

Modified:
  head/contrib/gdb/gdb/dwarf2read.c

Modified: head/contrib/gdb/gdb/dwarf2read.c
==
--- head/contrib/gdb/gdb/dwarf2read.c   Mon Jun 17 10:28:55 2013
(r251843)
+++ head/contrib/gdb/gdb/dwarf2read.c   Mon Jun 17 12:49:26 2013
(r251844)
@@ -6082,8 +6082,8 @@ tag_type_to_type (struct die_info *die, 
   if (!die-type)
{
  dump_die (die);
- error (Dwarf Error: Cannot find type of die [in module %s], 
- cu-objfile-name);
+ error (Dwarf Error: Cannot find type of die 0x%x [in module %s], 
+ die-tag, cu-objfile-name);
}
   return die-type;
 }
___
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to svn-src-head-unsubscr...@freebsd.org


svn commit: r251845 - head/gnu/lib/libdialog

2013-06-17 Thread Baptiste Daroussin
Author: bapt
Date: Mon Jun 17 13:02:39 2013
New Revision: 251845
URL: http://svnweb.freebsd.org/changeset/base/251845

Log:
  lower the WARNS to 1 again until I have more time to figure out the problems 
with WARNS=4
  
  Reported by:  gavin

Modified:
  head/gnu/lib/libdialog/Makefile

Modified: head/gnu/lib/libdialog/Makefile
==
--- head/gnu/lib/libdialog/Makefile Mon Jun 17 12:49:26 2013
(r251844)
+++ head/gnu/lib/libdialog/Makefile Mon Jun 17 13:02:39 2013
(r251845)
@@ -15,6 +15,6 @@ MAN=  dialog.3
 
 CFLAGS+=   -I${.CURDIR} -I${DIALOG} -D_XOPEN_SOURCE_EXTENDED 
-DGCC_UNUSED=__unused
 .PATH: ${DIALOG}
-WARNS?=4
+WARNS?=1
 
 .include bsd.lib.mk
___
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to svn-src-head-unsubscr...@freebsd.org


Re: svn commit: r251843 - in head: contrib/dialog contrib/dialog/package contrib/dialog/package/debian contrib/dialog/po contrib/dialog/samples contrib/dialog/samples/copifuncs contrib/dialog/samples/

2013-06-17 Thread Nathan Whitehorn

On 06/17/13 05:28, Baptiste Daroussin wrote:

Author: bapt
Date: Mon Jun 17 10:28:55 2013
New Revision: 251843
URL: http://svnweb.freebsd.org/changeset/base/251843

Log:
   Update dialog to 1.2-20130523
   Level up WARNS


This seems to have broken bsdinstall. In particular, it is no longer 
possible to get focus in the text input boxes in the partition editor's 
(sade/bsdinstall partedit) Add Partition or Modify Partition 
dialogs. Any chance you could try to figure out why? My Ncurses 
debugging skills are unfortunately not great.

-Nathan

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


Re: svn commit: r251843 - in head: contrib/dialog contrib/dialog/package contrib/dialog/package/debian contrib/dialog/po contrib/dialog/samples contrib/dialog/samples/copifuncs contrib/dialog/samples/

2013-06-17 Thread Baptiste Daroussin
On Mon, Jun 17, 2013 at 08:28:47AM -0500, Nathan Whitehorn wrote:
 On 06/17/13 05:28, Baptiste Daroussin wrote:
  Author: bapt
  Date: Mon Jun 17 10:28:55 2013
  New Revision: 251843
  URL: http://svnweb.freebsd.org/changeset/base/251843
 
  Log:
 Update dialog to 1.2-20130523
 Level up WARNS
 
 This seems to have broken bsdinstall. In particular, it is no longer 
 possible to get focus in the text input boxes in the partition editor's 
 (sade/bsdinstall partedit) Add Partition or Modify Partition 
 dialogs. Any chance you could try to figure out why? My Ncurses 
 debugging skills are unfortunately not great.

I'm on it, yes, it seems like the dlg_forms is leaking the bindings from the
diskeditors form.

I have a working patch but it is ugly. I'm trying to figure out the clean way to
do so.

regards,
Bapt


pgpKc7MQaon_u.pgp
Description: PGP signature


Re: svn commit: r251843 - in head: contrib/dialog contrib/dialog/package contrib/dialog/package/debian contrib/dialog/po contrib/dialog/samples contrib/dialog/samples/copifuncs contrib/dialog/samples/

2013-06-17 Thread Nathan Whitehorn

On 06/17/13 08:36, Baptiste Daroussin wrote:

On Mon, Jun 17, 2013 at 08:28:47AM -0500, Nathan Whitehorn wrote:

On 06/17/13 05:28, Baptiste Daroussin wrote:

Author: bapt
Date: Mon Jun 17 10:28:55 2013
New Revision: 251843
URL: http://svnweb.freebsd.org/changeset/base/251843

Log:
Update dialog to 1.2-20130523
Level up WARNS

This seems to have broken bsdinstall. In particular, it is no longer
possible to get focus in the text input boxes in the partition editor's
(sade/bsdinstall partedit) Add Partition or Modify Partition
dialogs. Any chance you could try to figure out why? My Ncurses
debugging skills are unfortunately not great.

I'm on it, yes, it seems like the dlg_forms is leaking the bindings from the
diskeditors form.

I have a working patch but it is ugly. I'm trying to figure out the clean way to
do so.

regards,
Bapt


Thanks much! Please let me know if I can do anything to help.
-Nathan
___
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to svn-src-head-unsubscr...@freebsd.org


svn commit: r251848 - head/contrib/wpa/src/utils

2013-06-17 Thread Sergey Kandaurov
Author: pluknet
Date: Mon Jun 17 14:46:54 2013
New Revision: 251848
URL: http://svnweb.freebsd.org/changeset/base/251848

Log:
  Import change e4ac6417c7504e1c55ec556ce908974c04e29e3c from upstream wpa:
  
From: Guy Eilam g...@wizery.com
Date: Mon, 21 Feb 2011 20:44:46 + (+0200)
Subject: utils: Corrected a typo in header's name definition
  
utils: Corrected a typo in header's name definition
  
Corrected a typo in the BASE64_H definition that
might cause the header file to be included more than once.
  
Signed-off-by: Guy Eilam g...@wizery.com
  
  Submitted by: d...@gmx.com
  MFC after:3 days

Modified:
  head/contrib/wpa/src/utils/base64.h

Modified: head/contrib/wpa/src/utils/base64.h
==
--- head/contrib/wpa/src/utils/base64.h Mon Jun 17 14:41:39 2013
(r251847)
+++ head/contrib/wpa/src/utils/base64.h Mon Jun 17 14:46:54 2013
(r251848)
@@ -13,7 +13,7 @@
  */
 
 #ifndef BASE64_H
-#define BASE64_h
+#define BASE64_H
 
 unsigned char * base64_encode(const unsigned char *src, size_t len,
  size_t *out_len);
___
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to svn-src-head-unsubscr...@freebsd.org


Re: svn commit: r251843 - in head: contrib/dialog contrib/dialog/package contrib/dialog/package/debian contrib/dialog/po contrib/dialog/samples contrib/dialog/samples/copifuncs contrib/dialog/samples/

2013-06-17 Thread Baptiste Daroussin
On Mon, Jun 17, 2013 at 08:37:37AM -0500, Nathan Whitehorn wrote:
 On 06/17/13 08:36, Baptiste Daroussin wrote:
  On Mon, Jun 17, 2013 at 08:28:47AM -0500, Nathan Whitehorn wrote:
  On 06/17/13 05:28, Baptiste Daroussin wrote:
  Author: bapt
  Date: Mon Jun 17 10:28:55 2013
  New Revision: 251843
  URL: http://svnweb.freebsd.org/changeset/base/251843
 
  Log:
  Update dialog to 1.2-20130523
  Level up WARNS
  This seems to have broken bsdinstall. In particular, it is no longer
  possible to get focus in the text input boxes in the partition editor's
  (sade/bsdinstall partedit) Add Partition or Modify Partition
  dialogs. Any chance you could try to figure out why? My Ncurses
  debugging skills are unfortunately not great.
  I'm on it, yes, it seems like the dlg_forms is leaking the bindings from the
  diskeditors form.
 
  I have a working patch but it is ugly. I'm trying to figure out the clean 
  way to
  do so.
 
  regards,
  Bapt
 
 Thanks much! Please let me know if I can do anything to help.

I committed a workaround, I dicovered that the key on the Partition Editor
window are not the one we expect to be, I see no errors yet in libdialog code,
I'll continue investigating, but waiting for a proper fix, it is usable again.

regards,
Bapt


pgpcWa7DOT57_.pgp
Description: PGP signature


svn commit: r251856 - head/usr.bin/dtc

2013-06-17 Thread David Chisnall
Author: theraven
Date: Mon Jun 17 15:34:22 2013
New Revision: 251856
URL: http://svnweb.freebsd.org/changeset/base/251856

Log:
  Add a checker to dtc, based on a feature request from rwatson / brooks.
  This checks that every node that has children specifies their register sizes.
  This is not enabled by default, as the default sizes are sometimes required
  (including by some DTS in the tree), but can help when writing new device
  trees so that you can check that you actually meant the defaults.

Modified:
  head/usr.bin/dtc/checking.cc
  head/usr.bin/dtc/dtc.1

Modified: head/usr.bin/dtc/checking.cc
==
--- head/usr.bin/dtc/checking.ccMon Jun 17 15:30:47 2013
(r251855)
+++ head/usr.bin/dtc/checking.ccMon Jun 17 15:34:22 2013
(r251856)
@@ -33,6 +33,8 @@
 #include checking.hh
 #include stdio.h
 
+
+
 namespace dtc
 {
 namespace fdt
@@ -40,6 +42,54 @@ namespace fdt
 namespace checking
 {
 
+namespace
+{
+   /**
+* Checker that verifies that every node that has children has
+* #address-cells and #size-cells properties.
+*/
+   struct address_cells_checker : public checker
+   {
+   address_cells_checker(const char *name) : checker(name) {}
+   virtual bool check_node(device_tree *tree, node *n)
+   {
+   // If this has no children, it trivially meets the
+   // conditions.
+   if (n-child_begin() == n-child_end())
+   {
+   return true;
+   }
+   bool found_address = false;
+   bool found_size = false;
+   for (node::property_iterator i=n-property_begin(),
+e=n-property_end() ; i!=e ; ++i)
+   {
+   if (!found_address)
+   {
+   found_address = ((*i)-get_key() == 
#address-cells);
+   }
+   if (!found_size)
+   {
+   found_size = ((*i)-get_key() == 
#size-cells);
+   }
+   if (found_size  found_address)
+   {
+   break;
+   }
+   }
+   if (!found_address)
+   {
+   report_error(Missing #address-cells 
property);
+   }
+   if (!found_size)
+   {
+   report_error(Missing #size-cells 
property);
+   }
+   return found_address  found_size;
+   }
+   };
+} // anonymous namespace
+
 bool
 checker::visit_node(device_tree *tree, node *n)
 {
@@ -157,6 +207,8 @@ check_manager::check_manager()
add_property_type_checkerproperty_value::STRING(
type-model, string(model));
add_property_size_checker(type-phandle, string(phandle), 4);
+   disabled_checkers.insert(std::make_pair(string(cells-attributes),
+   new address_cells_checker(cells-attributes)));
 }
 
 bool

Modified: head/usr.bin/dtc/dtc.1
==
--- head/usr.bin/dtc/dtc.1  Mon Jun 17 15:30:47 2013(r251855)
+++ head/usr.bin/dtc/dtc.1  Mon Jun 17 15:34:22 2013(r251856)
@@ -214,6 +214,12 @@ property.
 Checks the type of the
 .Va compatible
 property.
+.It cells-attributes
+Checks that all nodes with children have both
+.Va #address-cells
+and
+.Va #size-cells
+properties.
 .El
 .Sh EXAMPLES
 The command:
___
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to svn-src-head-unsubscr...@freebsd.org


Re: svn commit: r251507 - head/usr.sbin/portsnap/portsnap

2013-06-17 Thread Alfred Perlstein

On 6/17/13 11:59 AM, Dmitry Morozovsky wrote:

On Sun, 16 Jun 2013, Gavin Atkinson wrote:


   Make 'portsnap alfred' overwrite ports tree if it's not created by a
   portsnap.

FWIW, the 'alfred' command is poorly named and is used by other
projects (ISTR portshaker uses it).  It should also be documented.

I would love to see this renamed - unfortunately the most obvious name for
it update is already taken.  I wonder if it should be named auto?

Hmm, 'forceupdate' maybe, in brief mimic to /etc/rc.d/* ?



I've already told MANY people that it's easy to use when they just run 
portsnap alfred.


I think we need to leave it as this point.  An alias is fine.

--
Alfred Perlstein
VP Software Engineering, iXsystems

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


svn commit: r251858 - in head: contrib/gdb/gdb gnu/usr.bin/gdb/libgdb

2013-06-17 Thread Ed Maste
Author: emaste
Date: Mon Jun 17 18:34:34 2013
New Revision: 251858
URL: http://svnweb.freebsd.org/changeset/base/251858

Log:
  Fold in frame-unwind patch
  
  After moving to svn there's no need to avoid pulling files off a vendor
  branch.

Deleted:
  head/gnu/usr.bin/gdb/libgdb/frame-unwind.diff
Modified:
  head/contrib/gdb/gdb/frame-unwind.c
  head/gnu/usr.bin/gdb/libgdb/Makefile

Modified: head/contrib/gdb/gdb/frame-unwind.c
==
--- head/contrib/gdb/gdb/frame-unwind.c Mon Jun 17 15:42:21 2013
(r251857)
+++ head/contrib/gdb/gdb/frame-unwind.c Mon Jun 17 18:34:34 2013
(r251858)
@@ -27,6 +27,8 @@
 
 static struct gdbarch_data *frame_unwind_data;
 
+frame_unwind_sniffer_ftype *kgdb_sniffer_kluge;
+
 struct frame_unwind_table
 {
   frame_unwind_sniffer_ftype **sniffer;
@@ -49,6 +51,8 @@ frame_unwind_init (struct gdbarch *gdbar
 {
   struct frame_unwind_table *table = XCALLOC (1, struct frame_unwind_table);
   append_predicate (table, dummy_frame_sniffer);
+  if (kgdb_sniffer_kluge != NULL)
+append_predicate (table, kgdb_sniffer_kluge);
   return table;
 }
 

Modified: head/gnu/usr.bin/gdb/libgdb/Makefile
==
--- head/gnu/usr.bin/gdb/libgdb/MakefileMon Jun 17 15:42:21 2013
(r251857)
+++ head/gnu/usr.bin/gdb/libgdb/MakefileMon Jun 17 18:34:34 2013
(r251858)
@@ -26,7 +26,7 @@ SRCS= annotate.c arch-utils.c auxv.c ax-
elfread.c environ.c eval.c event-loop.c event-top.c exec.c \
expprint.c \
f-exp.y f-lang.c f-typeprint.c f-valprint.c findvar.c \
-   ${_fork_child} frame-base.c frame-unwind-kluge.c frame.c \
+   ${_fork_child} frame-base.c frame-unwind.c frame.c \
gdb-events.c gdbarch.c gdbtypes.c gnu-v2-abi.c gnu-v3-abi.c \
hpacc-abi.c \
inf-loop.c infcall.c infcmd.c inflow.c ${_infptrace} infrun.c \
@@ -67,13 +67,7 @@ _infptrace= infptrace.c
 _inftarg= inftarg.c
 .endif
 
-GENSRCS= frame-unwind-kluge.c version.c
-
-frame-unwind-kluge.c: frame-unwind.diff
-   cat ${CNTRB_GDB}/gdb/frame-unwind.c  ${.TARGET}
-   patch ${.TARGET} ${.ALLSRC}
-
-CLEANFILES= frame-unwind-kluge.c.orig
+GENSRCS= version.c
 
 version.c:
echo '#include version.h'   ${.TARGET}
___
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to svn-src-head-unsubscr...@freebsd.org


svn commit: r251859 - head/sys/net

2013-06-17 Thread Xin LI
Author: delphij
Date: Mon Jun 17 19:31:03 2013
New Revision: 251859
URL: http://svnweb.freebsd.org/changeset/base/251859

Log:
  Return ENETDOWN instead of ENOENT when all lagg(4) links are
  inactive when upper layer tries to transmit packet.  This
  gives better feedback and meaningful errors for applications.
  
  MFC after:2 weeks
  Reviewed by:  thompsa

Modified:
  head/sys/net/if_lagg.c

Modified: head/sys/net/if_lagg.c
==
--- head/sys/net/if_lagg.c  Mon Jun 17 18:34:34 2013(r251858)
+++ head/sys/net/if_lagg.c  Mon Jun 17 19:31:03 2013(r251859)
@@ -1608,7 +1608,7 @@ lagg_rr_start(struct lagg_softc *sc, str
 */
if ((lp = lagg_link_active(sc, lp)) == NULL) {
m_freem(m);
-   return (ENOENT);
+   return (ENETDOWN);
}
 
/* Send mbuf */
@@ -1656,7 +1656,7 @@ lagg_fail_start(struct lagg_softc *sc, s
/* Use the master port if active or the next available port */
if ((lp = lagg_link_active(sc, sc-sc_primary)) == NULL) {
m_freem(m);
-   return (ENOENT);
+   return (ENETDOWN);
}
 
/* Send mbuf */
@@ -1785,7 +1785,7 @@ lagg_lb_start(struct lagg_softc *sc, str
 */
if ((lp = lagg_link_active(sc, lp)) == NULL) {
m_freem(m);
-   return (ENOENT);
+   return (ENETDOWN);
}
 
/* Send mbuf */
___
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to svn-src-head-unsubscr...@freebsd.org


svn commit: r251863 - head/usr.bin/sort

2013-06-17 Thread Eitan Adler
Author: eadler
Date: Mon Jun 17 20:15:39 2013
New Revision: 251863
URL: http://svnweb.freebsd.org/changeset/base/251863

Log:
  Fix header guards.
  
  This was ready about the same time as r251862 so just make one final cleanup
  
  Submitted by: d...@gmx.com

Modified:
  head/usr.bin/sort/vsort.h

Modified: head/usr.bin/sort/vsort.h
==
--- head/usr.bin/sort/vsort.h   Mon Jun 17 20:11:04 2013(r251862)
+++ head/usr.bin/sort/vsort.h   Mon Jun 17 20:15:39 2013(r251863)
@@ -27,8 +27,8 @@
  * SUCH DAMAGE.
  */
 
-#if !defined(__VSORT_H__)
-#define __VSORT_H__
+#ifndef _VSORT_H_
+#define _VSORT_H_
 
 #include bwstring.h
 
___
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to svn-src-head-unsubscr...@freebsd.org


svn commit: r251867 - head/tools/regression/lib/libc/nss

2013-06-17 Thread Eitan Adler
Author: eadler
Date: Mon Jun 17 20:27:20 2013
New Revision: 251867
URL: http://svnweb.freebsd.org/changeset/base/251867

Log:
  Restore all rights reserved (spelled correctly).  This was actually part of 
the standard text of the license which I did not realize prior.
  
  Approved by:  bushman

Modified:
  head/tools/regression/lib/libc/nss/test-getaddr.c
  head/tools/regression/lib/libc/nss/test-getgr.c
  head/tools/regression/lib/libc/nss/test-gethostby.c
  head/tools/regression/lib/libc/nss/test-getproto.c
  head/tools/regression/lib/libc/nss/test-getpw.c
  head/tools/regression/lib/libc/nss/test-getrpc.c
  head/tools/regression/lib/libc/nss/test-getserv.c
  head/tools/regression/lib/libc/nss/test-getusershell.c

Modified: head/tools/regression/lib/libc/nss/test-getaddr.c
==
--- head/tools/regression/lib/libc/nss/test-getaddr.c   Mon Jun 17 20:26:19 
2013(r251866)
+++ head/tools/regression/lib/libc/nss/test-getaddr.c   Mon Jun 17 20:27:20 
2013(r251867)
@@ -1,5 +1,6 @@
 /*-
  * Copyright (c) 2006 Michael Bushkov bush...@freebsd.org
+ * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions

Modified: head/tools/regression/lib/libc/nss/test-getgr.c
==
--- head/tools/regression/lib/libc/nss/test-getgr.c Mon Jun 17 20:26:19 
2013(r251866)
+++ head/tools/regression/lib/libc/nss/test-getgr.c Mon Jun 17 20:27:20 
2013(r251867)
@@ -1,5 +1,6 @@
 /*-
  * Copyright (c) 2006 Michael Bushkov bush...@freebsd.org
+ * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions

Modified: head/tools/regression/lib/libc/nss/test-gethostby.c
==
--- head/tools/regression/lib/libc/nss/test-gethostby.c Mon Jun 17 20:26:19 
2013(r251866)
+++ head/tools/regression/lib/libc/nss/test-gethostby.c Mon Jun 17 20:27:20 
2013(r251867)
@@ -1,5 +1,6 @@
 /*-
  * Copyright (c) 2006 Michael Bushkov bush...@freebsd.org
+ * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions

Modified: head/tools/regression/lib/libc/nss/test-getproto.c
==
--- head/tools/regression/lib/libc/nss/test-getproto.c  Mon Jun 17 20:26:19 
2013(r251866)
+++ head/tools/regression/lib/libc/nss/test-getproto.c  Mon Jun 17 20:27:20 
2013(r251867)
@@ -1,5 +1,6 @@
 /*-
  * Copyright (c) 2006 Michael Bushkov bush...@freebsd.org
+ * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions

Modified: head/tools/regression/lib/libc/nss/test-getpw.c
==
--- head/tools/regression/lib/libc/nss/test-getpw.c Mon Jun 17 20:26:19 
2013(r251866)
+++ head/tools/regression/lib/libc/nss/test-getpw.c Mon Jun 17 20:27:20 
2013(r251867)
@@ -1,5 +1,6 @@
 /*-
  * Copyright (c) 2006 Michael Bushkov bush...@freebsd.org
+ * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions

Modified: head/tools/regression/lib/libc/nss/test-getrpc.c
==
--- head/tools/regression/lib/libc/nss/test-getrpc.cMon Jun 17 20:26:19 
2013(r251866)
+++ head/tools/regression/lib/libc/nss/test-getrpc.cMon Jun 17 20:27:20 
2013(r251867)
@@ -1,5 +1,6 @@
 /*-
  * Copyright (c) 2006 Michael Bushkov bush...@freebsd.org
+ * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions

Modified: head/tools/regression/lib/libc/nss/test-getserv.c
==
--- head/tools/regression/lib/libc/nss/test-getserv.c   Mon Jun 17 20:26:19 
2013(r251866)
+++ head/tools/regression/lib/libc/nss/test-getserv.c   Mon Jun 17 20:27:20 
2013(r251867)
@@ -1,5 +1,6 @@
 /*-
  * Copyright (c) 2006 Michael Bushkov bush...@freebsd.org
+ * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions

Modified: head/tools/regression/lib/libc/nss/test-getusershell.c
==
--- 

Re: svn commit: r251803 - head/sys/kern

2013-06-17 Thread Ed Schouten
Hi Nathan,

2013/6/16 Nathan Whitehorn nwhiteh...@freebsd.org:
 I'm a little worried about these kinds of changes from a performance
 standpoint when using GCC 4.2. In particular, from the GCC manual: In most
 cases, these builtins are considered a full barrier. This is much more
 synchronization that many of the atomic ops in machine/atomic.h actually
 require. I'm worried this could lead to serious performance regressions on
 e.g. PowerPC. gcc mostly seems to do the right thing, but I'm not completely
 sure and it probably needs extensive testing. One way to accomplish that
 could be to implement atomic(9) in terms of stdatomic. If nothing breaks or
 becomes slow, then we will know we are in the clear permanently.
 -Nathan

Agreed. I did indeed implement machine/atomic.h on top of
stdatomic.h as a test a couple of weeks ago. What is nice, is that
if I look at amd64/i386, the emitted machine code is almost identical,
with the exception that in certain cases, stdatomic.h generates more
compact instructions (e.g. lock inc instead of adding an immediate
1).

On armv6 the trend is similar, with the exception that in some cases
Clang manages to emit slightly more intelligent code. It seems that
one of our pieces of inline assembly causes the compiler to zero out
certain registers before inserting the inline assembly, even though
these registers tend to be overwritten by the assembly anyway. Weird.

Replacement of machine/atomic.h used on amd64:

http://80386.nl/pub/machine-atomic-wrapped.txt

Still, you were actually interested in knowing the difference in
performance when using GCC 4.2. I have to confess, I don't have any
numbers on this, but I suspect there will be a dip, of course. But let
me be clear on this; I am not proposing that we migrate our existing
codebase to C11 atomics within the nearby future. This is something
that should be considered by the time most of the platforms use Clang
(or, unlikely GCC 4.6+).

The reason why I made this chance, was that I at least want to have
some coverage of the C11 atomics both in kernelspace and userspace. My
goal is that C11 atomics work correctly on FreeBSD 10.0. My fear is
that this likely cannot be achieved if there are exactly 0 pieces of
code in our tree that use this. By not doing so, breakage of
stdatomic.h could go by unnoticed, maybe already when someone makes
a tiny harmless modification to sys/cdefs.h or sys/_types.h.

Correct me if I'm wrong, but I think it's extremely unlikely that this
specific change will noticeably regress performance of the system as a
whole. If I wanted to cripple performance on these architectures, I
would have changed mtx(9) to use C11 atomics instead.

Unrelated to this, there is something about this specific piece of
code that is actually very interesting if you look at it into more
detail. Notice how I took the liberty of changing filt_timerattach()
to use a compare-and-exchange, instead of the two successive atomic
operations it used to do. Maybe a smart compiler could consider
rewriting this piece of code to something along the lines of this (on
armv6):

ldr r0, [kq_calloutmax]
ldrex r1, [kq_ncallouts]
cmp r0, r1
blt ...
add r2, r1, #1
strex r1, r2, [kq_ncallouts]

In other words, convert this to a compare-less-than-and-increment,
which is not offered by machine/atomic.h. It'll be interesting to
see whether Clang will reach such a level of code quality.

--
Ed Schouten e...@80386.nl
___
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to svn-src-head-unsubscr...@freebsd.org


svn commit: r251869 - head/sys/modules/linux

2013-06-17 Thread Eitan Adler
Author: eadler
Date: Mon Jun 17 21:30:46 2013
New Revision: 251869
URL: http://svnweb.freebsd.org/changeset/base/251869

Log:
  Add missing dependency to linux${SFX}_genassym.c
  
  Submitted by: nox
  MFC After:3 days

Modified:
  head/sys/modules/linux/Makefile

Modified: head/sys/modules/linux/Makefile
==
--- head/sys/modules/linux/Makefile Mon Jun 17 20:40:16 2013
(r251868)
+++ head/sys/modules/linux/Makefile Mon Jun 17 21:30:46 2013
(r251869)
@@ -52,7 +52,7 @@ linux${SFX}_support.o: linux${SFX}_suppo
${CC} -c -x assembler-with-cpp -DLOCORE ${CFLAGS} \
${.IMPSRC} -o ${.TARGET}
 
-linux${SFX}_genassym.o: linux${SFX}_genassym.c linux.h @ machine
+linux${SFX}_genassym.o: linux${SFX}_genassym.c linux.h @ machine x86
${CC} -c ${CFLAGS:N-fno-common} ${.IMPSRC}
 
 .if !defined(KERNBUILDDIR)
___
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to svn-src-head-unsubscr...@freebsd.org


Re: svn commit: r251855 - head/sys/sys

2013-06-17 Thread Bruce Evans

On Mon, 17 Jun 2013, David Chisnall wrote:


Log:
 Rename a parameter in sys/time.h so that you don't get warnings for things
 like libdialog that include both this header and math.h.


All the bintime stuff has similar namespace errors, starting with the
field names 'sec' and 'frac' not having a prefix, despite the good example
set by struct tm and good style requiring a prefix.  'sec' and 'frac' are
paticularly bad field names since they are close to both English words
and to good names for application variables.


Modified: head/sys/sys/time.h
==
--- head/sys/sys/time.h Mon Jun 17 15:16:14 2013(r251854)
+++ head/sys/sys/time.h Mon Jun 17 15:30:47 2013(r251855)
@@ -103,17 +103,17 @@ bintime_mul(struct bintime *bt, u_int x)
}

static __inline void
-bintime_shift(struct bintime *bt, int exp)
+bintime_shift(struct bintime *__bt, int __exp)


The new names have excessive underscores and are thus now just style
bugs.  Single underscores are ugly enough.

'exp' us only reserved by system headers when math.h is included, and
even then it is not normally a problem since it is not a macro.

But bt is in the application namespace.

#define bt  bintime variables should be named _bt in inline functions
#include sys/time.h

This is now fixed, but only for this function.


{

-   if (exp  0) {
-   bt-sec = exp;
-   bt-sec |= bt-frac  (64 - exp);
-   bt-frac = exp;
-   } else if (exp  0) {
-   bt-frac = -exp;
-   bt-frac |= (uint64_t)bt-sec  (64 + exp);
-   bt-sec = -exp;
+   if (__exp  0) {
+   __bt-sec = __exp;
+   __bt-sec |= __bt-frac  (64 - __exp);
+   __bt-frac = __exp;
+   } else if (__exp  0) {
+   __bt-frac = -__exp;
+   __bt-frac |= (uint64_t)__bt-sec  (64 + __exp);
+   __bt-sec = -__exp;
}
}


__bt has another naming error.  It is not a bintime variable, but a pointer
to one.  It should be named _btp.  This style bug is everywhere dense in
bintime code.

'sec' and 'frac' are in the application namespace.

#define sec namespace errors in bintime bite me if I do this
#define fracthe errors are just as undocumented as the namespace
#include sys/time.h

This is not fixed.

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


Re: svn commit: r251862 - in head: sys/dev/puc sys/dev/vxge usr.bin/csup usr.bin/sort

2013-06-17 Thread Bruce Evans

On Mon, 17 Jun 2013, Sergey Kandaurov wrote:


Log:
 Clean up -Wheader-guard warnings.


An interesting feature.  It seems to be missing warnings about style bugs
in header-guard names.


Modified: head/sys/dev/puc/puc_bfe.h
==
--- head/sys/dev/puc/puc_bfe.h  Mon Jun 17 19:54:47 2013(r251861)
+++ head/sys/dev/puc/puc_bfe.h  Mon Jun 17 20:11:04 2013(r251862)
@@ -27,7 +27,7 @@
 */

#ifndef _DEV_PUC_BFE_H_
-#define_DEV_PUC_BFE_H
+#define_DEV_PUC_BFE_H_


Local headers shouldn't have or need header-guards, but the name and
formatting of this header-guard is in normal style.


#define PUC_PCI_BARS6



The name and formatting at the end of the file were already correct, but
the comment on the #endif is still backwards.


Modified: head/sys/dev/puc/puc_cfg.h


Similarly in other puc headers.


Modified: head/sys/dev/vxge/vxge.h
==
--- head/sys/dev/vxge/vxge.hMon Jun 17 19:54:47 2013(r251861)
+++ head/sys/dev/vxge/vxge.hMon Jun 17 20:11:04 2013(r251862)
@@ -31,7 +31,7 @@
/*$FreeBSD$*/

#ifndef _VXGE_H_
-#define__VXGE_H_
+#define_VXGE_H_


This one has more style bugs:
- tab instead of space after ifndef
- no path prefix in header name



#include dev/vxge/vxgehal/vxgehal.h
#include dev/vxge/vxge-osdep.h



And at the end of the file:
- tab instead of space after ifndef
- the comment is backwards of course.


Modified: head/usr.bin/csup/updater.h
==
--- head/usr.bin/csup/updater.h Mon Jun 17 19:54:47 2013(r251861)
+++ head/usr.bin/csup/updater.h Mon Jun 17 20:11:04 2013(r251862)
@@ -26,7 +26,7 @@
 * $FreeBSD$
 */
#ifndef _UPDATER_H_
-#define _UPDATER_H
+#define _UPDATER_H_

void*updater(void *);



Missing blank line before #define.  Space instead of tab after #define.
No path prefix, but application headers are much more local than dev
headers, so a path prefix is less useful for them.

Some dev headers are installed in /usr/include, but the puc ones aren't.

The style of the #endif is normal in this file, but the ifdef section
is so short that it breaks the style(9) rule about not commenting short
ifdefs.

This include file has 1 line of useful code, 5 lines of head-guard and
27 lines of copyright.  csup has header files like this that would be
tiny except for the copyright.  I don't like this organization.  The
1 useful line in this include file consists of a prototype, so it
doesn't need a header-guard.


Modified: head/usr.bin/sort/vsort.h
==
--- head/usr.bin/sort/vsort.h   Mon Jun 17 19:54:47 2013(r251861)
+++ head/usr.bin/sort/vsort.h   Mon Jun 17 20:11:04 2013(r251862)
@@ -28,7 +28,7 @@
 */

#if !defined(__VSORT_H__)
-#define _VSORT_H__
+#define __VSORT_H__

#include bwstring.h



#if !defined() instead of #ifdef.  Excessive underscores in header-guard
name (the old name was half correct).  Space instead of tab after #define.
No comment on the #endif, but this is another header that would be tiny
without its header-guard and copyright.

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


svn commit: r251885 - head/etc/rc.d

2013-06-17 Thread Devin Teske
Author: dteske
Date: Tue Jun 18 02:37:15 2013
New Revision: 251885
URL: http://svnweb.freebsd.org/changeset/base/251885

Log:
  Allow $ntpdate_config to be NULL. Due to a lack of surrounding quotes, when
  ntpdate_config was set to NULL the conditional would (counter to prevailing
  logic) succeed -- leading to awk attempting to redirect from a NULL pathname
  standard-in. While we're here, make the script consistant with itself by
  removing the {curlies} around ntpdate_config (they are unnecessary).

Modified:
  head/etc/rc.d/ntpdate

Modified: head/etc/rc.d/ntpdate
==
--- head/etc/rc.d/ntpdate   Tue Jun 18 02:20:34 2013(r251884)
+++ head/etc/rc.d/ntpdate   Tue Jun 18 02:37:15 2013(r251885)
@@ -16,13 +16,13 @@ start_cmd=ntpdate_start
 
 ntpdate_start()
 {
-   if [ -z $ntpdate_hosts -a -f ${ntpdate_config} ]; then
+   if [ -z $ntpdate_hosts -a -f $ntpdate_config ]; then
ntpdate_hosts=`awk '
/^server[ \t]*127.127/  {next}
/^(server|peer)/{
if ($2 ~/^-/)   {print $3}
else{print $2}}
-   '  ${ntpdate_config}`
+   '  $ntpdate_config`
fi
if [ -n $ntpdate_hosts -o -n $rc_flags ]; then
echo Setting date via ntp.
___
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to svn-src-head-unsubscr...@freebsd.org


svn commit: r251886 - in head: contrib/apr contrib/apr-util contrib/serf contrib/sqlite3 contrib/subversion share/mk usr.bin usr.bin/svn usr.bin/svn/lib usr.bin/svn/lib/libapr usr.bin/svn/lib/libap...

2013-06-17 Thread Peter Wemm
Author: peter
Date: Tue Jun 18 02:53:45 2013
New Revision: 251886
URL: http://svnweb.freebsd.org/changeset/base/251886

Log:
  Introduce svnlite so that we can check out our source code again.
  
  This is actually a fully functional build except:
  * All internal shared libraries are static linked to make sure there
is no interference with ports (and to reduce build time).
  * It does not have the python/perl/etc plugin or API support.
  * By default, it installs as svnlite rather than svn.
  * If WITH_SVN added in make.conf, you get svn.
  * If WITHOUT_SVNLITE is in make.conf, this is completely disabled.
  
  To be absolutely clear, this is not intended for any use other than
  checking out freebsd source and committing, like we once did with cvs.
  
  It should be usable for small scale local repositories that don't
  need the python/perl plugin architecture.

Added:
  head/contrib/apr/
 - copied from r251882, vendor/apr/dist/
  head/contrib/apr-util/
 - copied from r251882, vendor/apr-util/dist/
  head/contrib/serf/
 - copied from r251882, vendor/serf/dist/
  head/contrib/sqlite3/
 - copied from r251884, vendor/sqlite3/dist/
  head/contrib/subversion/
 - copied from r251882, vendor/subversion/dist/
  head/usr.bin/svn/
  head/usr.bin/svn/Makefile   (contents, props changed)
  head/usr.bin/svn/Makefile.inc   (contents, props changed)
  head/usr.bin/svn/expat.h   (contents, props changed)
  head/usr.bin/svn/lib/
  head/usr.bin/svn/lib/Makefile   (contents, props changed)
  head/usr.bin/svn/lib/Makefile.inc   (contents, props changed)
  head/usr.bin/svn/lib/libapr/
  head/usr.bin/svn/lib/libapr/Makefile   (contents, props changed)
  head/usr.bin/svn/lib/libapr/apr.h   (contents, props changed)
  head/usr.bin/svn/lib/libapr/apr_private.h   (contents, props changed)
  head/usr.bin/svn/lib/libapr_util/
  head/usr.bin/svn/lib/libapr_util/Makefile   (contents, props changed)
  head/usr.bin/svn/lib/libapr_util/apr_ldap.h   (contents, props changed)
  head/usr.bin/svn/lib/libapr_util/apu.h   (contents, props changed)
  head/usr.bin/svn/lib/libapr_util/apu_config.h   (contents, props changed)
  head/usr.bin/svn/lib/libapr_util/apu_select_dbm.h   (contents, props changed)
  head/usr.bin/svn/lib/libapr_util/apu_want.h   (contents, props changed)
  head/usr.bin/svn/lib/libapr_util/expat.h   (contents, props changed)
  head/usr.bin/svn/lib/libserf/
  head/usr.bin/svn/lib/libserf/Makefile   (contents, props changed)
  head/usr.bin/svn/lib/libsqlite3/
  head/usr.bin/svn/lib/libsqlite3/Makefile   (contents, props changed)
  head/usr.bin/svn/lib/libsvn_client/
  head/usr.bin/svn/lib/libsvn_client/Makefile   (contents, props changed)
  head/usr.bin/svn/lib/libsvn_delta/
  head/usr.bin/svn/lib/libsvn_delta/Makefile   (contents, props changed)
  head/usr.bin/svn/lib/libsvn_diff/
  head/usr.bin/svn/lib/libsvn_diff/Makefile   (contents, props changed)
  head/usr.bin/svn/lib/libsvn_fs/
  head/usr.bin/svn/lib/libsvn_fs/Makefile   (contents, props changed)
  head/usr.bin/svn/lib/libsvn_fs_fs/
  head/usr.bin/svn/lib/libsvn_fs_fs/Makefile   (contents, props changed)
  head/usr.bin/svn/lib/libsvn_fs_util/
  head/usr.bin/svn/lib/libsvn_fs_util/Makefile   (contents, props changed)
  head/usr.bin/svn/lib/libsvn_ra/
  head/usr.bin/svn/lib/libsvn_ra/Makefile   (contents, props changed)
  head/usr.bin/svn/lib/libsvn_ra_local/
  head/usr.bin/svn/lib/libsvn_ra_local/Makefile   (contents, props changed)
  head/usr.bin/svn/lib/libsvn_ra_serf/
  head/usr.bin/svn/lib/libsvn_ra_serf/Makefile   (contents, props changed)
  head/usr.bin/svn/lib/libsvn_ra_svn/
  head/usr.bin/svn/lib/libsvn_ra_svn/Makefile   (contents, props changed)
  head/usr.bin/svn/lib/libsvn_repos/
  head/usr.bin/svn/lib/libsvn_repos/Makefile   (contents, props changed)
  head/usr.bin/svn/lib/libsvn_subr/
  head/usr.bin/svn/lib/libsvn_subr/Makefile   (contents, props changed)
  head/usr.bin/svn/lib/libsvn_wc/
  head/usr.bin/svn/lib/libsvn_wc/Makefile   (contents, props changed)
  head/usr.bin/svn/svn/
  head/usr.bin/svn/svn/Makefile   (contents, props changed)
  head/usr.bin/svn/svn_private_config.h   (contents, props changed)
  head/usr.bin/svn/svnadmin/
  head/usr.bin/svn/svnadmin/Makefile   (contents, props changed)
  head/usr.bin/svn/svndumpfilter/
  head/usr.bin/svn/svndumpfilter/Makefile   (contents, props changed)
  head/usr.bin/svn/svnlook/
  head/usr.bin/svn/svnlook/Makefile   (contents, props changed)
  head/usr.bin/svn/svnmucc/
  head/usr.bin/svn/svnmucc/Makefile   (contents, props changed)
  head/usr.bin/svn/svnrdump/
  head/usr.bin/svn/svnrdump/Makefile   (contents, props changed)
  head/usr.bin/svn/svnserve/
  head/usr.bin/svn/svnserve/Makefile   (contents, props changed)
  head/usr.bin/svn/svnsync/
  head/usr.bin/svn/svnsync/Makefile   (contents, props changed)
  head/usr.bin/svn/svnversion/
  head/usr.bin/svn/svnversion/Makefile   (contents, props changed)
Modified:
  head/share/mk/bsd.own.mk
  head/usr.bin/Makefile

Modified: 

svn commit: r251887 - in head: share/man/man3 sys/sys

2013-06-17 Thread Lawrence Stewart
Author: lstewart
Date: Tue Jun 18 02:57:56 2013
New Revision: 251887
URL: http://svnweb.freebsd.org/changeset/base/251887

Log:
  Add new FOREACH_FROM variants of the queue(3) FOREACH macros which can
  optionally start the traversal from a previously found element by passing the
  element in as var. Passing a NULL var retains the same semantics as the
  regular FOREACH macros.
  
  Kudos to phk for suggesting the FROM suffix instead of my original proposal.
  
  Reviewed by:  jhb (previous version), rpaulo
  MFC after:1 week

Modified:
  head/share/man/man3/queue.3
  head/sys/sys/queue.h

Modified: head/share/man/man3/queue.3
==
--- head/share/man/man3/queue.3 Tue Jun 18 02:53:45 2013(r251886)
+++ head/share/man/man3/queue.3 Tue Jun 18 02:57:56 2013(r251887)
@@ -32,7 +32,7 @@
 .\@(#)queue.3 8.2 (Berkeley) 1/24/94
 .\ $FreeBSD$
 .\
-.Dd Sep 12, 2012
+.Dd June 17, 2013
 .Dt QUEUE 3
 .Os
 .Sh NAME
@@ -40,7 +40,9 @@
 .Nm SLIST_ENTRY ,
 .Nm SLIST_FIRST ,
 .Nm SLIST_FOREACH ,
+.Nm SLIST_FOREACH_FROM ,
 .Nm SLIST_FOREACH_SAFE ,
+.Nm SLIST_FOREACH_FROM_SAFE ,
 .Nm SLIST_HEAD ,
 .Nm SLIST_HEAD_INITIALIZER ,
 .Nm SLIST_INIT ,
@@ -56,7 +58,9 @@
 .Nm STAILQ_ENTRY ,
 .Nm STAILQ_FIRST ,
 .Nm STAILQ_FOREACH ,
+.Nm STAILQ_FOREACH_FROM ,
 .Nm STAILQ_FOREACH_SAFE ,
+.Nm STAILQ_FOREACH_FROM_SAFE ,
 .Nm STAILQ_HEAD ,
 .Nm STAILQ_HEAD_INITIALIZER ,
 .Nm STAILQ_INIT ,
@@ -73,7 +77,9 @@
 .Nm LIST_ENTRY ,
 .Nm LIST_FIRST ,
 .Nm LIST_FOREACH ,
+.Nm LIST_FOREACH_FROM ,
 .Nm LIST_FOREACH_SAFE ,
+.Nm LIST_FOREACH_FROM_SAFE ,
 .Nm LIST_HEAD ,
 .Nm LIST_HEAD_INITIALIZER ,
 .Nm LIST_INIT ,
@@ -89,9 +95,13 @@
 .Nm TAILQ_ENTRY ,
 .Nm TAILQ_FIRST ,
 .Nm TAILQ_FOREACH ,
+.Nm TAILQ_FOREACH_FROM ,
 .Nm TAILQ_FOREACH_SAFE ,
+.Nm TAILQ_FOREACH_FROM_SAFE ,
 .Nm TAILQ_FOREACH_REVERSE ,
+.Nm TAILQ_FOREACH_REVERSE_FROM ,
 .Nm TAILQ_FOREACH_REVERSE_SAFE ,
+.Nm TAILQ_FOREACH_REVERSE_FROM_SAFE ,
 .Nm TAILQ_HEAD ,
 .Nm TAILQ_HEAD_INITIALIZER ,
 .Nm TAILQ_INIT ,
@@ -113,7 +123,9 @@ lists and tail queues
 .Fn SLIST_ENTRY TYPE
 .Fn SLIST_FIRST SLIST_HEAD *head
 .Fn SLIST_FOREACH TYPE *var SLIST_HEAD *head SLIST_ENTRY NAME
+.Fn SLIST_FOREACH_FROM TYPE *var SLIST_HEAD *head SLIST_ENTRY NAME
 .Fn SLIST_FOREACH_SAFE TYPE *var SLIST_HEAD *head SLIST_ENTRY NAME TYPE 
*temp_var
+.Fn SLIST_FOREACH_FROM_SAFE TYPE *var SLIST_HEAD *head SLIST_ENTRY NAME 
TYPE *temp_var
 .Fn SLIST_HEAD HEADNAME TYPE
 .Fn SLIST_HEAD_INITIALIZER SLIST_HEAD head
 .Fn SLIST_INIT SLIST_HEAD *head
@@ -130,7 +142,9 @@ lists and tail queues
 .Fn STAILQ_ENTRY TYPE
 .Fn STAILQ_FIRST STAILQ_HEAD *head
 .Fn STAILQ_FOREACH TYPE *var STAILQ_HEAD *head STAILQ_ENTRY NAME
+.Fn STAILQ_FOREACH_FROM TYPE *var STAILQ_HEAD *head STAILQ_ENTRY NAME
 .Fn STAILQ_FOREACH_SAFE TYPE *var STAILQ_HEAD *head STAILQ_ENTRY NAME 
TYPE *temp_var
+.Fn STAILQ_FOREACH_FROM_SAFE TYPE *var STAILQ_HEAD *head STAILQ_ENTRY 
NAME TYPE *temp_var
 .Fn STAILQ_HEAD HEADNAME TYPE
 .Fn STAILQ_HEAD_INITIALIZER STAILQ_HEAD head
 .Fn STAILQ_INIT STAILQ_HEAD *head
@@ -148,7 +162,9 @@ lists and tail queues
 .Fn LIST_ENTRY TYPE
 .Fn LIST_FIRST LIST_HEAD *head
 .Fn LIST_FOREACH TYPE *var LIST_HEAD *head LIST_ENTRY NAME
+.Fn LIST_FOREACH_FROM TYPE *var LIST_HEAD *head LIST_ENTRY NAME
 .Fn LIST_FOREACH_SAFE TYPE *var LIST_HEAD *head LIST_ENTRY NAME TYPE 
*temp_var
+.Fn LIST_FOREACH_FROM_SAFE TYPE *var LIST_HEAD *head LIST_ENTRY NAME 
TYPE *temp_var
 .Fn LIST_HEAD HEADNAME TYPE
 .Fn LIST_HEAD_INITIALIZER LIST_HEAD head
 .Fn LIST_INIT LIST_HEAD *head
@@ -165,9 +181,13 @@ lists and tail queues
 .Fn TAILQ_ENTRY TYPE
 .Fn TAILQ_FIRST TAILQ_HEAD *head
 .Fn TAILQ_FOREACH TYPE *var TAILQ_HEAD *head TAILQ_ENTRY NAME
+.Fn TAILQ_FOREACH_FROM TYPE *var TAILQ_HEAD *head TAILQ_ENTRY NAME
 .Fn TAILQ_FOREACH_SAFE TYPE *var TAILQ_HEAD *head TAILQ_ENTRY NAME TYPE 
*temp_var
+.Fn TAILQ_FOREACH_FROM_SAFE TYPE *var TAILQ_HEAD *head TAILQ_ENTRY NAME 
TYPE *temp_var
 .Fn TAILQ_FOREACH_REVERSE TYPE *var TAILQ_HEAD *head HEADNAME 
TAILQ_ENTRY NAME
+.Fn TAILQ_FOREACH_REVERSE_FROM TYPE *var TAILQ_HEAD *head HEADNAME 
TAILQ_ENTRY NAME
 .Fn TAILQ_FOREACH_REVERSE_SAFE TYPE *var TAILQ_HEAD *head HEADNAME 
TAILQ_ENTRY NAME TYPE *temp_var
+.Fn TAILQ_FOREACH_REVERSE_FROM_SAFE TYPE *var TAILQ_HEAD *head HEADNAME 
TAILQ_ENTRY NAME TYPE *temp_var
 .Fn TAILQ_HEAD HEADNAME TYPE
 .Fn TAILQ_HEAD_INITIALIZER TAILQ_HEAD head
 .Fn TAILQ_INIT TAILQ_HEAD *head
@@ -365,6 +385,19 @@ turn to
 .Fa var .
 .Pp
 The macro
+.Nm SLIST_FOREACH_FROM
+behaves identically to
+.Nm SLIST_FOREACH
+when
+.Fa var
+is NULL, else it treats
+.Fa var
+as a previously found SLIST element and begins the loop at
+.Fa var
+instead of the first element in the SLIST referenced by
+.Fa head .
+.Pp
+The macro
 .Nm SLIST_FOREACH_SAFE
 traverses the list referenced by
 .Fa head
@@ -379,6 +412,19 @@ as well as free it from within the loop 
 traversal.
 .Pp
 The macro
+.Nm SLIST_FOREACH_FROM_SAFE
+behaves identically 

svn commit: r251894 - in head: lib/libmemstat sys/vm

2013-06-17 Thread Jeff Roberson
Author: jeff
Date: Tue Jun 18 04:50:20 2013
New Revision: 251894
URL: http://svnweb.freebsd.org/changeset/base/251894

Log:
  Refine UMA bucket allocation to reduce space consumption and improve
  performance.
  
   - Always free to the alloc bucket if there is space.  This gives LIFO
 allocation order to improve hot-cache performance.  This also allows
 for zones with a single bucket per-cpu rather than a pair if the entire
 working set fits in one bucket.
   - Enable per-cpu caches of buckets.  To prevent recursive bucket
 allocation one bucket zone still has per-cpu caches disabled.
   - Pick the initial bucket size based on a table driven maximum size
 per-bucket rather than the number of items per-page.  This gives
 more sane initial sizes.
   - Only grow the bucket size when we face contention on the zone lock, this
 causes bucket sizes to grow more slowly.
   - Adjust the number of items per-bucket to account for the header space.
 This packs the buckets more efficiently per-page while making them
 not quite powers of two.
   - Eliminate the per-zone free bucket list.  Always return buckets back
 to the bucket zone.  This ensures that as zones grow into larger
 bucket sizes they eventually discard the smaller sizes.  It persists
 fewer buckets in the system.  The locking is slightly trickier.
   - Only switch buckets in zalloc, not zfree, this eliminates pathological
 cases where we ping-pong between two buckets.
   - Ensure that the thread that fills a new bucket gets to allocate from
 it to give a better upper bound on allocation time.
  
  Sponsored by: EMC / Isilon Storage Division

Modified:
  head/lib/libmemstat/memstat_uma.c
  head/sys/vm/uma_core.c
  head/sys/vm/uma_int.h

Modified: head/lib/libmemstat/memstat_uma.c
==
--- head/lib/libmemstat/memstat_uma.c   Tue Jun 18 04:11:16 2013
(r251893)
+++ head/lib/libmemstat/memstat_uma.c   Tue Jun 18 04:50:20 2013
(r251894)
@@ -446,7 +446,7 @@ skip_percpu:
kz.uk_ipers;
mtp-mt_byteslimit = mtp-mt_countlimit * mtp-mt_size;
mtp-mt_count = mtp-mt_numallocs - mtp-mt_numfrees;
-   for (ubp = LIST_FIRST(uz.uz_full_bucket); ubp !=
+   for (ubp = LIST_FIRST(uz.uz_buckets); ubp !=
NULL; ubp = LIST_NEXT(ub, ub_link)) {
ret = kread(kvm, ubp, ub, sizeof(ub), 0);
mtp-mt_zonefree += ub.ub_cnt;

Modified: head/sys/vm/uma_core.c
==
--- head/sys/vm/uma_core.c  Tue Jun 18 04:11:16 2013(r251893)
+++ head/sys/vm/uma_core.c  Tue Jun 18 04:50:20 2013(r251894)
@@ -192,27 +192,26 @@ struct uma_kctor_args {
 struct uma_bucket_zone {
uma_zone_t  ubz_zone;
char*ubz_name;
-   int ubz_entries;
+   int ubz_entries;/* Number of items it can hold. */
+   int ubz_maxsize;/* Maximum allocation size per-item. */
 };
 
-#defineBUCKET_MAX  128
+/*
+ * Compute the actual number of bucket entries to pack them in power
+ * of two sizes for more efficient space utilization.
+ */
+#defineBUCKET_SIZE(n)  \
+(((sizeof(void *) * (n)) - sizeof(struct uma_bucket)) / sizeof(void *))
+
+#defineBUCKET_MAX  BUCKET_SIZE(128)
 
 struct uma_bucket_zone bucket_zones[] = {
-   { NULL, 16 Bucket, 16 },
-   { NULL, 32 Bucket, 32 },
-   { NULL, 64 Bucket, 64 },
-   { NULL, 128 Bucket, 128 },
+   { NULL, 32 Bucket, BUCKET_SIZE(32), 512 },
+   { NULL, 64 Bucket, BUCKET_SIZE(64), 256 },
+   { NULL, 128 Bucket, BUCKET_SIZE(128), 128 },
{ NULL, NULL, 0}
 };
-
-#defineBUCKET_SHIFT4
-#defineBUCKET_ZONES((BUCKET_MAX  BUCKET_SHIFT) + 1)
-
-/*
- * bucket_size[] maps requested bucket sizes to zones that allocate a bucket
- * of approximately the right size.
- */
-static uint8_t bucket_size[BUCKET_ZONES];
+static uma_zone_t largebucket;
 
 /*
  * Flags and enumerations to be passed to internal functions.
@@ -250,7 +249,7 @@ static void bucket_init(void);
 static uma_bucket_t bucket_alloc(int, int);
 static void bucket_free(uma_bucket_t);
 static void bucket_zone_drain(void);
-static int zone_alloc_bucket(uma_zone_t zone, int flags);
+static uma_bucket_t zone_alloc_bucket(uma_zone_t zone, int flags);
 static uma_slab_t zone_fetch_slab(uma_zone_t zone, uma_keg_t last, int flags);
 static uma_slab_t zone_fetch_slab_multi(uma_zone_t zone, uma_keg_t last, int 
flags);
 static void *slab_alloc_item(uma_keg_t keg, uma_slab_t slab);
@@ -283,7 +282,6 @@ SYSCTL_INT(_vm, OID_AUTO, zone_warnings,
 /*
  * This routine checks to see whether or not it's safe 

svn commit: r251895 - head/contrib/subversion/subversion/libsvn_wc

2013-06-17 Thread Peter Wemm
Author: peter
Date: Tue Jun 18 04:56:11 2013
New Revision: 251895
URL: http://svnweb.freebsd.org/changeset/base/251895

Log:
  Merge the 3-way merge marker tweak.

Modified:
  head/contrib/subversion/subversion/libsvn_wc/merge.c

Modified: head/contrib/subversion/subversion/libsvn_wc/merge.c
==
--- head/contrib/subversion/subversion/libsvn_wc/merge.cTue Jun 18 
04:50:20 2013(r251894)
+++ head/contrib/subversion/subversion/libsvn_wc/merge.cTue Jun 18 
04:56:11 2013(r251895)
@@ -421,7 +421,7 @@ do_text_merge(svn_boolean_t *contains_co
   target_marker,
   right_marker,
   ===, /* separator */
-  
svn_diff_conflict_display_modified_latest,
+  
svn_diff_conflict_display_modified_original_latest,
   pool));
   SVN_ERR(svn_stream_close(ostream));
 
___
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to svn-src-head-unsubscr...@freebsd.org


svn commit: r251896 - head/contrib/subversion/subversion/svn

2013-06-17 Thread Peter Wemm
Author: peter
Date: Tue Jun 18 04:57:36 2013
New Revision: 251896
URL: http://svnweb.freebsd.org/changeset/base/251896

Log:
  Merge the commit template patch.

Modified:
  head/contrib/subversion/subversion/svn/util.c

Modified: head/contrib/subversion/subversion/svn/util.c
==
--- head/contrib/subversion/subversion/svn/util.c   Tue Jun 18 04:56:11 
2013(r251895)
+++ head/contrib/subversion/subversion/svn/util.c   Tue Jun 18 04:57:36 
2013(r251896)
@@ -66,6 +66,9 @@
 #include private/svn_client_private.h
 #include private/svn_cmdline_private.h
 #include private/svn_string_private.h
+#ifdef HAS_ORGANIZATION_NAME
+#include freebsd-organization.h
+#endif
 
 
 
@@ -322,6 +325,67 @@ truncate_buffer_at_prefix(apr_size_t *ne
 }
 
 
+/*
+ * Since we're adding freebsd-specific tokens to the log message,
+ * clean out any leftovers to avoid accidently sending them to other
+ * projects that won't be expecting them.
+ */
+
+static const char *prefixes[] = {
+  PR:,
+  Submitted by:,
+  Reviewed by:,
+  Approved by:,
+  Obtained from:,
+  MFC after:,
+  Security:,
+  Sponsored by:
+};
+
+void
+cleanmsg(apr_size_t *l, char *s)
+{
+  int i;
+  char *pos;
+  char *kw;
+  char *p;
+  int empty;
+
+  for (i = 0; i  sizeof(prefixes) / sizeof(prefixes[0]); i++) {
+pos = s;
+while ((kw = strstr(pos, prefixes[i])) != NULL) {
+  /* Check to see if keyword is at start of line (or buffer) */
+  if (!(kw == s || kw[-1] == '\r' || kw[-1] == '\n')) {
+   pos = kw + 1;
+   continue;
+  }
+  p = kw + strlen(prefixes[i]);
+  empty = 1;
+  while (1) {
+   if (*p == ' ' || *p == '\t') {
+ p++;
+ continue;
+   }
+   if (*p == '\0' || *p == '\r' || *p == '\n')
+ break;
+   empty = 0;
+   break;
+  }
+  if (empty  (*p == '\r' || *p == '\n')) {
+   memmove(kw, p + 1, strlen(p + 1) + 1);
+   if (l)
+ *l -= (p + 1 - kw);
+  } else if (empty) {
+   *kw = '\0';
+   if (l)
+ *l -= (p - kw);
+  } else {
+   pos = p;
+  }
+}
+  }
+}
+
 #define EDITOR_EOF_PREFIX  _(--This line, and those below, will be ignored--)
 
 svn_error_t *
@@ -337,8 +401,32 @@ svn_cl__get_log_message(const char **log
 
   /* Set default message.  */
   default_msg = svn_stringbuf_create(APR_EOL_STR, pool);
+  svn_stringbuf_appendcstr(default_msg, APR_EOL_STR);
+  svn_stringbuf_appendcstr(default_msg, PR:\t\t APR_EOL_STR);
+  svn_stringbuf_appendcstr(default_msg, Submitted by:\t APR_EOL_STR);
+  svn_stringbuf_appendcstr(default_msg, Reviewed by:\t APR_EOL_STR);
+  svn_stringbuf_appendcstr(default_msg, Approved by:\t APR_EOL_STR);
+  svn_stringbuf_appendcstr(default_msg, Obtained from:\t APR_EOL_STR);
+  svn_stringbuf_appendcstr(default_msg, MFC after:\t APR_EOL_STR);
+  svn_stringbuf_appendcstr(default_msg, Security:\t APR_EOL_STR);
+  svn_stringbuf_appendcstr(default_msg, Sponsored by:\t
+#ifdef HAS_ORGANIZATION_NAME
+  ORGANIZATION_NAME
+#endif
+  APR_EOL_STR);
   svn_stringbuf_appendcstr(default_msg, EDITOR_EOF_PREFIX);
-  svn_stringbuf_appendcstr(default_msg, APR_EOL_STR APR_EOL_STR);
+  svn_stringbuf_appendcstr(default_msg, APR_EOL_STR);
+  svn_stringbuf_appendcstr(default_msg,  Description of fields to fill in 
above: 76 columns --| APR_EOL_STR);
+  svn_stringbuf_appendcstr(default_msg,  PR:If a GNATS PR is 
affected by the change. APR_EOL_STR);
+  svn_stringbuf_appendcstr(default_msg,  Submitted by:  If someone else sent 
in the change. APR_EOL_STR);
+  svn_stringbuf_appendcstr(default_msg,  Reviewed by:   If someone else 
reviewed your modification. APR_EOL_STR);
+  svn_stringbuf_appendcstr(default_msg,  Approved by:   If you needed 
approval for this commit. APR_EOL_STR);
+  svn_stringbuf_appendcstr(default_msg,  Obtained from: If the change is 
from a third party. APR_EOL_STR);
+  svn_stringbuf_appendcstr(default_msg,  MFC after: N 
[day[s]|week[s]|month[s]].  Request a reminder email. APR_EOL_STR);
+  svn_stringbuf_appendcstr(default_msg,  Security:  Vulnerability 
reference (one per line) or description. APR_EOL_STR);
+  svn_stringbuf_appendcstr(default_msg,  Sponsored by:  If the change was 
sponsored by an organization. APR_EOL_STR);
+  svn_stringbuf_appendcstr(default_msg,  Empty fields above will be 
automatically removed. APR_EOL_STR);
+  svn_stringbuf_appendcstr(default_msg, APR_EOL_STR);
 
   *tmp_file = NULL;
   if (lmb-message)
@@ -350,6 +438,7 @@ svn_cl__get_log_message(const char **log
  that follows it.  */
   truncate_buffer_at_prefix((log_msg_buf-len), log_msg_buf-data,
 EDITOR_EOF_PREFIX);
+  cleanmsg(NULL, (char*)log_msg_buf-data);
 
   /* Make a string from a stringbuf, sharing the data allocation. */
   log_msg_str-data = log_msg_buf-data;
@@ -470,6 +559,13 @@ svn_cl__get_log_message(const char **log