svn commit: r270096 - in head: etc etc/autofs etc/defaults etc/mtree etc/rc.d sbin/mount share/man/man5 sys/conf sys/fs/autofs sys/kern sys/libkern sys/modules sys/modules/autofs sys/sys usr.sbin u...

2014-08-17 Thread Edward Tomasz Napierala
Author: trasz
Date: Sun Aug 17 09:44:42 2014
New Revision: 270096
URL: http://svnweb.freebsd.org/changeset/base/270096

Log:
  Bring in the new automounter, similar to what's provided in most other
  UNIX systems, eg. MacOS X and Solaris.  It uses Sun-compatible map format,
  has proper kernel support, and LDAP integration.
  
  There are still a few outstanding problems; they will be fixed shortly.
  
  Reviewed by:  allanjude@, emaste@, kib@, wblock@ (earlier versions)
  Phabric:  D523
  MFC after:2 weeks
  Relnotes: yes
  Sponsored by: The FreeBSD Foundation

Added:
  head/etc/auto_master   (contents, props changed)
  head/etc/autofs/
  head/etc/autofs/Makefile   (contents, props changed)
  head/etc/autofs/include_ldap   (contents, props changed)
  head/etc/autofs/special_hosts   (contents, props changed)
  head/etc/autofs/special_null   (contents, props changed)
  head/etc/rc.d/automount   (contents, props changed)
  head/etc/rc.d/automountd   (contents, props changed)
  head/etc/rc.d/autounmountd   (contents, props changed)
  head/share/man/man5/autofs.5   (contents, props changed)
  head/sys/fs/autofs/
  head/sys/fs/autofs/autofs.c   (contents, props changed)
  head/sys/fs/autofs/autofs.h   (contents, props changed)
  head/sys/fs/autofs/autofs_ioctl.h   (contents, props changed)
  head/sys/fs/autofs/autofs_vfsops.c   (contents, props changed)
  head/sys/fs/autofs/autofs_vnops.c   (contents, props changed)
  head/sys/libkern/strndup.c   (contents, props changed)
  head/sys/modules/autofs/
  head/sys/modules/autofs/Makefile   (contents, props changed)
  head/usr.sbin/autofs/
  head/usr.sbin/autofs/Makefile   (contents, props changed)
  head/usr.sbin/autofs/auto_master.5   (contents, props changed)
  head/usr.sbin/autofs/automount.8   (contents, props changed)
  head/usr.sbin/autofs/automount.c   (contents, props changed)
  head/usr.sbin/autofs/automountd.8   (contents, props changed)
  head/usr.sbin/autofs/automountd.c   (contents, props changed)
  head/usr.sbin/autofs/autounmountd.8   (contents, props changed)
  head/usr.sbin/autofs/autounmountd.c   (contents, props changed)
  head/usr.sbin/autofs/common.c   (contents, props changed)
  head/usr.sbin/autofs/common.h   (contents, props changed)
  head/usr.sbin/autofs/defined.c   (contents, props changed)
  head/usr.sbin/autofs/log.c   (contents, props changed)
  head/usr.sbin/autofs/popen.c   (contents, props changed)
  head/usr.sbin/autofs/token.l   (contents, props changed)
Modified:
  head/etc/Makefile
  head/etc/defaults/rc.conf
  head/etc/mtree/BSD.root.dist
  head/etc/rc.d/Makefile
  head/sbin/mount/mntopts.h
  head/sbin/mount/mount.c
  head/share/man/man5/Makefile
  head/sys/conf/NOTES
  head/sys/conf/files
  head/sys/conf/options
  head/sys/kern/vfs_mount.c
  head/sys/modules/Makefile
  head/sys/sys/libkern.h
  head/sys/sys/mount.h
  head/usr.sbin/Makefile

Modified: head/etc/Makefile
==
--- head/etc/Makefile   Sun Aug 17 09:07:21 2014(r270095)
+++ head/etc/Makefile   Sun Aug 17 09:44:42 2014(r270096)
@@ -11,7 +11,8 @@ SUBDIR=   sendmail
 SUBDIR+=tests
 .endif
 
-BIN1=  crontab \
+BIN1=  auto_master \
+   crontab \
devd.conf \
devfs.conf \
ddb.conf \
@@ -225,6 +226,7 @@ distribution:
echo "./etc/spwd.db type=file mode=0600 uname=root 
gname=wheel"; \
) | ${METALOG.add}
 .endif
+   ${_+_}cd ${.CURDIR}/autofs; ${MAKE} install
 .if ${MK_BLUETOOTH} != "no"
${_+_}cd ${.CURDIR}/bluetooth; ${MAKE} install
 .endif

Added: head/etc/auto_master
==
--- /dev/null   00:00:00 1970   (empty, because file is newly added)
+++ head/etc/auto_masterSun Aug 17 09:44:42 2014(r270096)
@@ -0,0 +1,5 @@
+# $FreeBSD$
+#
+# Automounter master map, see auto_master(5) for details.
+#
+/net   -hosts  -nosuid

Added: head/etc/autofs/Makefile
==
--- /dev/null   00:00:00 1970   (empty, because file is newly added)
+++ head/etc/autofs/MakefileSun Aug 17 09:44:42 2014(r270096)
@@ -0,0 +1,9 @@
+# $FreeBSD$
+
+FILES= include_ldap special_hosts special_null
+
+NO_OBJ=
+FILESDIR=  /etc/autofs
+FILESMODE= 755
+
+.include 

Added: head/etc/autofs/include_ldap
==
--- /dev/null   00:00:00 1970   (empty, because file is newly added)
+++ head/etc/autofs/include_ldapSun Aug 17 09:44:42 2014
(r270096)
@@ -0,0 +1,38 @@
+#!/bin/sh
+#
+# $FreeBSD$
+#
+
+# Modify this to suit your needs.  The "$1" is the map name, eg. "auto_master".
+# To debug, simply run this script with map name as the only parameter.  It's
+# supposed to output map contents ("key location" pairs) to standard output.
+SEARCHBASE="ou=$1,dc=example,dc=com"
+ENTR

Re: svn commit: r270096 - in head: etc etc/autofs etc/defaults etc/mtree etc/rc.d sbin/mount share/man/man5 sys/conf sys/fs/autofs sys/kern sys/libkern sys/modules sys/modules/autofs sys/sys usr.sbin

2014-08-17 Thread Bjoern A. Zeeb

On 17 Aug 2014, at 09:44 , Edward Tomasz Napierala  wrote:

> Author: trasz
> Date: Sun Aug 17 09:44:42 2014
> New Revision: 270096
> URL: http://svnweb.freebsd.org/changeset/base/270096
> 
> Log:
>  Bring in the new automounter, similar to what's provided in most other
>  UNIX systems, eg. MacOS X and Solaris.  It uses Sun-compatible map format,
>  has proper kernel support, and LDAP integration.
> 
>  There are still a few outstanding problems; they will be fixed shortly.
> 
>  Reviewed by: allanjude@, emaste@, kib@, wblock@ (earlier versions)
>  Phabric: D523
>  MFC after:   2 weeks
>  Relnotes:yes
>  Sponsored by:The FreeBSD Foundation


Yabadabad!   Thanks a lot!


— 
Bjoern A. Zeeb "Come on. Learn, goddamn it.", WarGames, 1983

___
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: r270097 - head/sys/dev/netmap

2014-08-17 Thread Luigi Rizzo
Author: luigi
Date: Sun Aug 17 10:25:27 2014
New Revision: 270097
URL: http://svnweb.freebsd.org/changeset/base/270097

Log:
  staticize two functions, and use proper format for a struct sglist
  (reported by bz)

Modified:
  head/sys/dev/netmap/if_vtnet_netmap.h

Modified: head/sys/dev/netmap/if_vtnet_netmap.h
==
--- head/sys/dev/netmap/if_vtnet_netmap.h   Sun Aug 17 09:44:42 2014
(r270096)
+++ head/sys/dev/netmap/if_vtnet_netmap.h   Sun Aug 17 10:25:27 2014
(r270097)
@@ -42,7 +42,7 @@
  *   and need to be freed;
  * - buffers queued by netmap return the txq/rxq, and do not need work
  */
-void
+static void
 vtnet_netmap_free_bufs(struct SOFTC_T* sc)
 {
int i, nmb = 0, n = 0, last;
@@ -80,7 +80,7 @@ vtnet_netmap_free_bufs(struct SOFTC_T* s
 }
 
 /* Register and unregister. */
-int
+static int
 vtnet_netmap_reg(struct netmap_adapter *na, int onoff)
 {
 struct ifnet *ifp = na->ifp;
@@ -237,7 +237,7 @@ vtnet_refill_rxq(struct netmap_kring *kr
 
/* use a local sglist, default might be short */
struct sglist_seg ss[2];
-   struct sglist sg[1] = { ss, 0, 0, 2};
+   struct sglist sg = { ss, 0, 0, 2 };
 
for (n = 0; nm_i != head; n++) {
static struct virtio_net_hdr_mrg_rxbuf hdr;
@@ -252,11 +252,11 @@ vtnet_refill_rxq(struct netmap_kring *kr
}
 
slot->flags &= ~NS_BUF_CHANGED;
-   sglist_reset(sg); // cheap
-   err = sglist_append(sg, &hdr, sc->vtnet_hdr_size);
-   err = sglist_append_phys(sg, paddr, NETMAP_BUF_SIZE(na));
+   sglist_reset(&sg); // cheap
+   err = sglist_append(&sg, &hdr, sc->vtnet_hdr_size);
+   err = sglist_append_phys(&sg, paddr, NETMAP_BUF_SIZE(na));
/* writable for the host */
-   err = virtqueue_enqueue(vq, rxq, sg, 0, sg->sg_nseg);
+   err = virtqueue_enqueue(vq, rxq, &sg, 0, sg.sg_nseg);
if (err < 0) {
D("virtqueue_enqueue failed");
break;
___
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: r270098 - head/share/syscons/keymaps

2014-08-17 Thread Stefan Esser
Author: se
Date: Sun Aug 17 11:59:23 2014
New Revision: 270098
URL: http://svnweb.freebsd.org/changeset/base/270098

Log:
  Add a few missing entries and fix entries that are obviously wrong.
  The use of the old ISO language code "iw" for Hebrew was inconsistent
  and it is replaced by the new language code "he" (which was already
  used for the keyboard menu entry, but not for the menu heading or the
  default font).
  
  These changes are in preparation of the conversion of this file and
  the keymap definitions to Unicode for use with NEWCONS.

Modified:
  head/share/syscons/keymaps/INDEX.keymaps

Modified: head/share/syscons/keymaps/INDEX.keymaps
==
--- head/share/syscons/keymaps/INDEX.keymapsSun Aug 17 10:25:27 2014
(r270097)
+++ head/share/syscons/keymaps/INDEX.keymapsSun Aug 17 11:59:23 2014
(r270098)
@@ -4,7 +4,7 @@
 #
 # Format ::
 #
-# lang: ar bg cs da de el en es fi fr hr hu hy is it iw ja kk ko nl no pl
+# lang: ar bg cs da de el en es fi fr he hr hu hy is it ja kk ko nl no pl
 #   pt ro ru sh sk sl sv tr uk zh
 # lang: lang,lang
 #
@@ -27,7 +27,7 @@ MENU:fr:Choisissez la nationalit� de vot
 MENU:pl:Wybierz uk�ad klawiatury
 MENU:pt:Escolha o layout do teclado
 MENU:es:Seleccione el idioma de su teclado
-MENU:iw:��� �� ��� �� ���
+MENU:he:��� �� ��� �� ���
 MENU:uk:B���Ҧ�� � ���צ�
 MENU:el: ��  ��� 
 MENU:hy:�� ݳ߳�� ���
@@ -36,7 +36,7 @@ FONT:en:cp437-8x16.fnt
 FONT:de,fr,da,no,sv,pt,es:iso-8x16.fnt
 FONT:ru:koi8-r-8x16.fnt
 FONT:pl:iso02-8x16.fnt
-FONT:iw:iso08-8x16.fnt
+FONT:he:iso08-8x16.fnt
 FONT:uk:koi8-u-8x16.fnt
 FONT:el:iso07-8x16.fnt
 FONT:hy:haik8-8x16.fnt
@@ -52,8 +52,10 @@ be.iso.acc.kbd:fr:Belge ISO-8859-1 (avec
 be.iso.acc.kbd:pt:Belga ISO-8859-1 (com acentos)
 be.iso.acc.kbd:es:Belga ISO-8859-1 (con acentos)
 
-bg.bds.ctrlcaps.kbd:bg:Bulgarian BDS
-bg.phonetic.ctrlcaps.kbd:bg:Bulgarian Phonetic
+bg.bds.ctrlcaps.kbd:en:Bulgarian (BDS)
+bg.bds.ctrlcaps.kbd:de:Bulgarisch (BDS)
+bg.phonetic.ctrlcaps.kbd:en:Bulgarian (Phonetic)
+bg.phonetic.ctrlcaps.kbd:de:Bulgarisch (phonetisch)
 
 br275.iso.kbd:en:Brazilian 275 ISO-8859-1
 br275.iso.kbd:de:Brasilianisch 275 ISO-8859-1
@@ -74,10 +76,13 @@ br275.cp850.kbd:pt:Brasileiro 275 Codepa
 br275.cp850.kbd:es:Brasile�o 275 Codepage 850
 
 by.cp1131.kbd:en:Belarusian Codepage 1131
+by.cp1131.kbd:de:Wei�russisch Code page 1131
 by.cp1131.kbd:fr:Bi�lorusse Code page 1131
+by.cp1251.kbd:de:Wei�russisch Codepage 1251
 by.cp1251.kbd:en:Belarusian Codepage 1251
 by.cp1251.kbd:fr:Bi�lorusse Code page 1251
 by.iso5.kbd:en:Belarusian ISO-8859-5
+by.iso5.kbd:de:Wei�russisch ISO-8859-5
 by.iso5.kbd:fr:Bi�lorusse ISO-8859-5
 
 ce.iso2.kbd:en:Central European ISO-8859-2
@@ -88,6 +93,7 @@ ce.iso2.kbd:es:Centroeuropeo ISO-8859-2
 colemak.iso15.acc.kbd:en:Colemak ergonomic alternative
 
 cs.latin2.qwertz.kbd:en:Czech ISO-8859-2 (QWERTZ, accent keys)
+cs.latin2.qwertz.kbd:de:Tschechisch ISO-8859-2 (QWERTZ, mit Akzenten)
 cs.latin2.qwertz.kbd:fr:Tch�que ISO-8859-2 (QWERTZ, avec accents)
 cs.latin2.qwertz.kbd:es:Checo ISO-8859-2 (QWERTZ, con acentos)
 
@@ -118,8 +124,14 @@ danish.cp865.kbd:pt:Dinamarqu�s Codepage
 danish.cp865.kbd:es:Dan�s Codepage 865
 
 danish.iso.macbook.kbd:da:Danish ISO-8859-1 (macbook)
+danish.iso.macbook.kbd:da:Dansk ISO-8859-1 (macbook)
+danish.iso.macbook.kbd:de:D�nisch ISO-8859-1 (Macbook)
+danish.iso.macbook.kbd:fr:Danois ISO-8859-1 (macbook)
+danish.iso.macbook.kbd:pt:Dinamarqu�s ISO-8859-1 (macbook)
+danish.iso.macbook.kbd:es:Dan�s ISO-8859-1 (macbook)
 
 dutch.iso.acc.kbd:en:Dutch ISO keymap (accent keys)
+dutch.iso.acc.kbd:de:Holl�ndisch (mit Akzenten)
 
 eee_nordic.kbd:en:Nordic layout on Asus eeePC
 eee_nordic.kbd:fr:Norv�gien phon�tique sur Asus eeePC
@@ -193,19 +205,19 @@ fr_CA.iso.acc.kbd:fr:Fran�ais Canadien I
 fr_CA.iso.acc.kbd:es:Francocanadiense ISO-8859-1 (con acentos)
 fr_CA.iso.acc.kbd:uk:��-� ISO-8859-1 (accent keys)
 
-german.iso.kbd:en:German ISO-8859-1
-german.iso.kbd:de:Deutsch ISO-8859-1
-german.iso.kbd:fr:Allemand ISO-8859-1
-german.iso.kbd:pt:Alem�o ISO-8859-1
-german.iso.kbd:es:Alem�n ISO-8859-1
-german.iso.kbd:uk: ISO-8859-1
-
-german.iso.acc.kbd:en:German ISO-8859-1 (accent keys)
-german.iso.acc.kbd:de:Deutsch ISO-8859-1 (mit Akzenten)
-german.iso.acc.kbd:fr:Allemand ISO-8859-1 (avec accents)
-german.iso.acc.kbd:pt:Alem�o ISO-8859-1 (com acentos)
-german.iso.acc.kbd:es:Alem�n ISO-8859-1 (con acentos)
-german.iso.acc.kbd:uk: ISO-8859-1 (accent keys)
+german.iso.kbd:en:German ISO-8859-15
+german.iso.kbd:de:Deutsch ISO-8859-15
+german.iso.kbd:fr:Allemand ISO-8859-15
+german.iso.kbd:pt:Alem�o ISO-8859-15
+german.iso.kbd:es:Alem�n ISO-8859-15
+german.iso.kbd:uk: ISO-8859-15
+
+german.iso.acc.kbd:en:German ISO-8859-15 (accent keys)
+german.iso.acc.kbd:de:Deutsch ISO-8859-15 (mit Akzenten)
+german.iso.acc.k

svn commit: r270101 - in head/bin/sh/tests: . errors

2014-08-17 Thread Jilles Tjoelker
Author: jilles
Date: Sun Aug 17 14:26:12 2014
New Revision: 270101
URL: http://svnweb.freebsd.org/changeset/base/270101

Log:
  sh: Don't hardcode relative paths in the tests stderr files.
  
  These paths have had to be adjusted to changes in the testsuite runner
  several times, so modify the tests to remove the need for such adjustment.
  
  A cp in functional_test.sh is now unneeded, but this matters little in
  performance.

Modified:
  head/bin/sh/tests/errors/bad-parm-exp2.2
  head/bin/sh/tests/errors/bad-parm-exp2.2.stderr
  head/bin/sh/tests/errors/bad-parm-exp3.2
  head/bin/sh/tests/errors/bad-parm-exp3.2.stderr
  head/bin/sh/tests/errors/bad-parm-exp4.2
  head/bin/sh/tests/errors/bad-parm-exp4.2.stderr
  head/bin/sh/tests/errors/bad-parm-exp5.2
  head/bin/sh/tests/errors/bad-parm-exp5.2.stderr
  head/bin/sh/tests/errors/bad-parm-exp6.2
  head/bin/sh/tests/errors/bad-parm-exp6.2.stderr
  head/bin/sh/tests/functional_test.sh

Modified: head/bin/sh/tests/errors/bad-parm-exp2.2
==
--- head/bin/sh/tests/errors/bad-parm-exp2.2Sun Aug 17 13:12:07 2014
(r270100)
+++ head/bin/sh/tests/errors/bad-parm-exp2.2Sun Aug 17 14:26:12 2014
(r270101)
@@ -1,2 +1,2 @@
 # $FreeBSD$
-${}
+eval '${}'

Modified: head/bin/sh/tests/errors/bad-parm-exp2.2.stderr
==
--- head/bin/sh/tests/errors/bad-parm-exp2.2.stderr Sun Aug 17 13:12:07 
2014(r270100)
+++ head/bin/sh/tests/errors/bad-parm-exp2.2.stderr Sun Aug 17 14:26:12 
2014(r270101)
@@ -1 +1 @@
-./bad-parm-exp2.2: ${}: Bad substitution
+eval: ${}: Bad substitution

Modified: head/bin/sh/tests/errors/bad-parm-exp3.2
==
--- head/bin/sh/tests/errors/bad-parm-exp3.2Sun Aug 17 13:12:07 2014
(r270100)
+++ head/bin/sh/tests/errors/bad-parm-exp3.2Sun Aug 17 14:26:12 2014
(r270101)
@@ -1,2 +1,2 @@
 # $FreeBSD$
-${foo/}
+eval '${foo/}'

Modified: head/bin/sh/tests/errors/bad-parm-exp3.2.stderr
==
--- head/bin/sh/tests/errors/bad-parm-exp3.2.stderr Sun Aug 17 13:12:07 
2014(r270100)
+++ head/bin/sh/tests/errors/bad-parm-exp3.2.stderr Sun Aug 17 14:26:12 
2014(r270101)
@@ -1 +1 @@
-./bad-parm-exp3.2: ${foo/}: Bad substitution
+eval: ${foo/}: Bad substitution

Modified: head/bin/sh/tests/errors/bad-parm-exp4.2
==
--- head/bin/sh/tests/errors/bad-parm-exp4.2Sun Aug 17 13:12:07 2014
(r270100)
+++ head/bin/sh/tests/errors/bad-parm-exp4.2Sun Aug 17 14:26:12 2014
(r270101)
@@ -1,2 +1,2 @@
 # $FreeBSD$
-${foo:@abc}
+eval '${foo:@abc}'

Modified: head/bin/sh/tests/errors/bad-parm-exp4.2.stderr
==
--- head/bin/sh/tests/errors/bad-parm-exp4.2.stderr Sun Aug 17 13:12:07 
2014(r270100)
+++ head/bin/sh/tests/errors/bad-parm-exp4.2.stderr Sun Aug 17 14:26:12 
2014(r270101)
@@ -1 +1 @@
-./bad-parm-exp4.2: ${foo:@...}: Bad substitution
+eval: ${foo:@...}: Bad substitution

Modified: head/bin/sh/tests/errors/bad-parm-exp5.2
==
--- head/bin/sh/tests/errors/bad-parm-exp5.2Sun Aug 17 13:12:07 2014
(r270100)
+++ head/bin/sh/tests/errors/bad-parm-exp5.2Sun Aug 17 14:26:12 2014
(r270101)
@@ -1,2 +1,2 @@
 # $FreeBSD$
-${/}
+eval '${/}'

Modified: head/bin/sh/tests/errors/bad-parm-exp5.2.stderr
==
--- head/bin/sh/tests/errors/bad-parm-exp5.2.stderr Sun Aug 17 13:12:07 
2014(r270100)
+++ head/bin/sh/tests/errors/bad-parm-exp5.2.stderr Sun Aug 17 14:26:12 
2014(r270101)
@@ -1 +1 @@
-./bad-parm-exp5.2: ${/}: Bad substitution
+eval: ${/}: Bad substitution

Modified: head/bin/sh/tests/errors/bad-parm-exp6.2
==
--- head/bin/sh/tests/errors/bad-parm-exp6.2Sun Aug 17 13:12:07 2014
(r270100)
+++ head/bin/sh/tests/errors/bad-parm-exp6.2Sun Aug 17 14:26:12 2014
(r270101)
@@ -1,2 +1,2 @@
 # $FreeBSD$
-${#foo^}
+eval '${#foo^}'

Modified: head/bin/sh/tests/errors/bad-parm-exp6.2.stderr
==
--- head/bin/sh/tests/errors/bad-parm-exp6.2.stderr Sun Aug 17 13:12:07 
2014(r270100)
+++ head/bin/sh/tests/errors/bad-parm-exp6.2.stderr Sun Aug 17 14:26:12 
2014(r270101)
@@ -1 +1 @@
-./bad-parm-exp6.2: ${foo...}: Bad substitution
+eval: ${foo...}: Bad substitution

Modified: head/bin/sh/tests/functional_test.sh
===

svn commit: r270102 - head/bin/sh

2014-08-17 Thread Jilles Tjoelker
Author: jilles
Date: Sun Aug 17 16:40:29 2014
New Revision: 270102
URL: http://svnweb.freebsd.org/changeset/base/270102

Log:
  sh: Reject integer overflow in number and is_number.

Modified:
  head/bin/sh/mystring.c

Modified: head/bin/sh/mystring.c
==
--- head/bin/sh/mystring.c  Sun Aug 17 14:26:12 2014(r270101)
+++ head/bin/sh/mystring.c  Sun Aug 17 16:40:29 2014(r270102)
@@ -82,9 +82,17 @@ number(const char *s)
 int
 is_number(const char *p)
 {
-   do {
-   if (! is_digit(*p))
+   const char *q;
+
+   if (*p == '\0')
+   return 0;
+   while (*p == '0')
+   p++;
+   for (q = p; *q != '\0'; q++)
+   if (! is_digit(*q))
return 0;
-   } while (*++p != '\0');
+   if (q - p > 10 ||
+   (q - p == 10 && memcmp(p, "2147483647", 10) > 0))
+   return 0;
return 1;
 }
___
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: r270103 - head/sys/arm/conf

2014-08-17 Thread Warner Losh
Author: imp
Date: Sun Aug 17 16:53:10 2014
New Revision: 270103
URL: http://svnweb.freebsd.org/changeset/base/270103

Log:
  Convert the HL201 config file to use FDT.

Modified:
  head/sys/arm/conf/HL201

Modified: head/sys/arm/conf/HL201
==
--- head/sys/arm/conf/HL201 Sun Aug 17 16:40:29 2014(r270102)
+++ head/sys/arm/conf/HL201 Sun Aug 17 16:53:10 2014(r270103)
@@ -23,8 +23,6 @@ ident HL201
 
 include "../at91/std.hl201"
 
-#To statically compile in device wiring instead of /boot/device.hints
-hints  "HL201.hints"
 makeoptionsMODULES_OVERRIDE=""
 
 makeoptionsDEBUG=-g# Build kernel with gdb(1) debug symbols
@@ -76,8 +74,14 @@ device   loop
 device ether
 device uart
 device ate
+device at91_wdt
 device mii
-#devicelxtphy
+device lxtphy
+
+# I2C
+device at91_twi# Atmel AT91 Two-wire Interface
+device iic # I2C generic I/O device driver
+device iicbus  # I2C bus system
 
 # Debugging for use in -current
 #options   INVARIANTS  # Enable calls of extra sanity checking
@@ -105,7 +109,7 @@ device  miibus
 #devicecue # CATC USB Ethernet
 #devicekue # Kawasaki LSI USB Ethernet
 #devicerue # RealTek RTL8150 USB Ethernet
-device udav# Davicom DM9601E USB
+#deviceudav# Davicom DM9601E USB
 # USB Wireless
 #devicerum # Ralink Technology RT2501USB 
wireless NICs
 #deviceuath# Atheros AR5523 wireless NICs
@@ -127,10 +131,16 @@ options   ROOTDEVNAME=\"ufs:da0s1a\"
 # NAND Flash - my board as 128MB Samsung part, YMMV.
 device nand# NAND interface on CS3
 
+# SPI: Data Flash
+device at91_spi# SPI:
+device spibus
+device at45d   # at45db642 and maybe others
+
+
 # Coming soon, but not yet
-#options   FDT
-#options   FDT_DTB_STATIC
-#makeoptions   FDT_DTS_FILE=hl201.dts
+optionsFDT
+optionsFDT_DTB_STATIC
+makeoptionsFDT_DTS_FILE=hl201.dts
 
 optionsEARLY_PRINTF
 optionsSOCDEV_PA=0xfc00
___
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: r270104 - head/sys/arm/at91

2014-08-17 Thread Warner Losh
Author: imp
Date: Sun Aug 17 16:53:14 2014
New Revision: 270104
URL: http://svnweb.freebsd.org/changeset/base/270104

Log:
  Define at91_master_clock in only one file to eliminate warnings about
  it multiply defined commons.

Modified:
  head/sys/arm/at91/at91_machdep.c

Modified: head/sys/arm/at91/at91_machdep.c
==
--- head/sys/arm/at91/at91_machdep.cSun Aug 17 16:53:10 2014
(r270103)
+++ head/sys/arm/at91/at91_machdep.cSun Aug 17 16:53:14 2014
(r270104)
@@ -117,7 +117,7 @@ extern struct bus_space at91_bs_tag;
 
 struct pv_addr kernel_pt_table[NUM_KERNEL_PTS];
 
-uint32_t at91_master_clock;
+extern uint32_t at91_master_clock;
 
 /* Static device mappings. */
 const struct arm_devmap_entry at91_devmap[] = {
___
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: r270105 - head/sys/arm/at91

2014-08-17 Thread Warner Losh
Author: imp
Date: Sun Aug 17 16:53:19 2014
New Revision: 270105
URL: http://svnweb.freebsd.org/changeset/base/270105

Log:
  Add missing license to at91_common.c. It was committed w/o a license.
  
  Pointy hat to: imp@

Modified:
  head/sys/arm/at91/at91_common.c

Modified: head/sys/arm/at91/at91_common.c
==
--- head/sys/arm/at91/at91_common.c Sun Aug 17 16:53:14 2014
(r270104)
+++ head/sys/arm/at91/at91_common.c Sun Aug 17 16:53:19 2014
(r270105)
@@ -1,3 +1,28 @@
+/*-
+ * Copyright (c) 2014 M. Warner Losh. 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.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *notice, this list of conditions and the following disclaimer in the
+ *documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY 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 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 
 __FBSDID("$FreeBSD$");
 
@@ -39,7 +64,7 @@ fdt_aic_decode_ic(phandle_t node, pcell_
*pol = INTR_POLARITY_CONFORM;
 
return (0);
-}
+u}
 
 fdt_pic_decode_t fdt_pic_table[] = {
&fdt_aic_decode_ic,
___
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: r270105 - head/sys/arm/at91

2014-08-17 Thread Ian Lepore
On Sun, 2014-08-17 at 16:53 +, Warner Losh wrote:
> Author: imp
> Date: Sun Aug 17 16:53:19 2014
> New Revision: 270105
> URL: http://svnweb.freebsd.org/changeset/base/270105
> 
> Log:
>   Add missing license to at91_common.c. It was committed w/o a license.
>   
>   Pointy hat to: imp@
> 
> Modified:
>   head/sys/arm/at91/at91_common.c
> 
> Modified: head/sys/arm/at91/at91_common.c
> ==
> --- head/sys/arm/at91/at91_common.c   Sun Aug 17 16:53:14 2014
> (r270104)
> +++ head/sys/arm/at91/at91_common.c   Sun Aug 17 16:53:19 2014
> (r270105)
> @@ -1,3 +1,28 @@
> +/*-
> + * Copyright (c) 2014 M. Warner Losh. 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.
> + * 2. Redistributions in binary form must reproduce the above copyright
> + *notice, this list of conditions and the following disclaimer in the
> + *documentation and/or other materials provided with the distribution.
> + *
> + * THIS SOFTWARE IS PROVIDED BY 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 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 
>  __FBSDID("$FreeBSD$");
>  
> @@ -39,7 +64,7 @@ fdt_aic_decode_ic(phandle_t node, pcell_
>   *pol = INTR_POLARITY_CONFORM;
>  
>   return (0);
> -}
> +u}
>  

This looks like a bit of keyboard entropy.

-- Ian

>  fdt_pic_decode_t fdt_pic_table[] = {
>   &fdt_aic_decode_ic,
> 


___
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: r270110 - head/sys/arm/at91

2014-08-17 Thread Bjoern A. Zeeb
Author: bz
Date: Sun Aug 17 18:27:02 2014
New Revision: 270110
URL: http://svnweb.freebsd.org/changeset/base/270110

Log:
  Remove keyboard entropy [1] from r270105.
  
  Reported by:  ian [1]
  (Pointy hat)^2 to:imp

Modified:
  head/sys/arm/at91/at91_common.c

Modified: head/sys/arm/at91/at91_common.c
==
--- head/sys/arm/at91/at91_common.c Sun Aug 17 18:26:34 2014
(r270109)
+++ head/sys/arm/at91/at91_common.c Sun Aug 17 18:27:02 2014
(r270110)
@@ -64,7 +64,7 @@ fdt_aic_decode_ic(phandle_t node, pcell_
*pol = INTR_POLARITY_CONFORM;
 
return (0);
-u}
+}
 
 fdt_pic_decode_t fdt_pic_table[] = {
&fdt_aic_decode_ic,
___
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: r270111 - in head: libexec/getty libexec/rshd sbin/init usr.bin/lock usr.bin/login usr.sbin/timed/timedc

2014-08-17 Thread Neel Natu
Author: neel
Date: Sun Aug 17 19:06:26 2014
New Revision: 270111
URL: http://svnweb.freebsd.org/changeset/base/270111

Log:
  Remove LOG_ODELAY because it does nothing.
  
  Reviewed by:  jilles
  CR:   https://reviews.freebsd.org/D611

Modified:
  head/libexec/getty/main.c
  head/libexec/rshd/rshd.c
  head/sbin/init/init.c
  head/usr.bin/lock/lock.c
  head/usr.bin/login/login.c
  head/usr.sbin/timed/timedc/timedc.c

Modified: head/libexec/getty/main.c
==
--- head/libexec/getty/main.c   Sun Aug 17 18:27:02 2014(r270110)
+++ head/libexec/getty/main.c   Sun Aug 17 19:06:26 2014(r270111)
@@ -187,7 +187,7 @@ main(int argc, char *argv[])
signal(SIGINT, SIG_IGN);
signal(SIGQUIT, SIG_IGN);
 
-   openlog("getty", LOG_ODELAY|LOG_CONS|LOG_PID, LOG_AUTH);
+   openlog("getty", LOG_CONS|LOG_PID, LOG_AUTH);
gethostname(hostname, sizeof(hostname) - 1);
hostname[sizeof(hostname) - 1] = '\0';
if (hostname[0] == '\0')

Modified: head/libexec/rshd/rshd.c
==
--- head/libexec/rshd/rshd.cSun Aug 17 18:27:02 2014(r270110)
+++ head/libexec/rshd/rshd.cSun Aug 17 19:06:26 2014(r270111)
@@ -127,7 +127,7 @@ main(int argc, char *argv[])
int ch, on = 1;
struct sockaddr_storage from;
 
-   openlog("rshd", LOG_PID | LOG_ODELAY, LOG_DAEMON);
+   openlog("rshd", LOG_PID, LOG_DAEMON);
 
opterr = 0;
while ((ch = getopt(argc, argv, OPTIONS)) != -1)

Modified: head/sbin/init/init.c
==
--- head/sbin/init/init.c   Sun Aug 17 18:27:02 2014(r270110)
+++ head/sbin/init/init.c   Sun Aug 17 19:06:26 2014(r270111)
@@ -242,7 +242,7 @@ invalid:
 * Note that this does NOT open a file...
 * Does 'init' deserve its own facility number?
 */
-   openlog("init", LOG_CONS|LOG_ODELAY, LOG_AUTH);
+   openlog("init", LOG_CONS, LOG_AUTH);
 
/*
 * Create an initial session.

Modified: head/usr.bin/lock/lock.c
==
--- head/usr.bin/lock/lock.cSun Aug 17 18:27:02 2014(r270110)
+++ head/usr.bin/lock/lock.cSun Aug 17 19:06:26 2014(r270111)
@@ -97,7 +97,7 @@ main(int argc, char **argv)
char *ap, *cryptpw, *mypw, *ttynam, *tzn;
char hostname[MAXHOSTNAMELEN], s[BUFSIZ], s1[BUFSIZ];
 
-   openlog("lock", LOG_ODELAY, LOG_AUTH);
+   openlog("lock", 0, LOG_AUTH);
 
sectimeout = TIMEOUT;
pw = NULL;

Modified: head/usr.bin/login/login.c
==
--- head/usr.bin/login/login.c  Sun Aug 17 18:27:02 2014(r270110)
+++ head/usr.bin/login/login.c  Sun Aug 17 19:06:26 2014(r270111)
@@ -198,7 +198,7 @@ main(int argc, char *argv[])
(void)alarm(timeout);
(void)setpriority(PRIO_PROCESS, 0, 0);
 
-   openlog("login", LOG_ODELAY, LOG_AUTH);
+   openlog("login", 0, LOG_AUTH);
 
uid = getuid();
euid = geteuid();

Modified: head/usr.sbin/timed/timedc/timedc.c
==
--- head/usr.sbin/timed/timedc/timedc.c Sun Aug 17 18:27:02 2014
(r270110)
+++ head/usr.sbin/timed/timedc/timedc.c Sun Aug 17 19:06:26 2014
(r270111)
@@ -66,7 +66,7 @@ main(int argc, char *argv[])
 {
register struct cmd *c;
 
-   openlog("timedc", LOG_ODELAY, LOG_AUTH);
+   openlog("timedc", 0, LOG_AUTH);
 
/*
 * security dictates!
___
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: r269505 - head/libexec/rtld-elf/tests/target

2014-08-17 Thread yaneurabeya

On Aug 4, 2014, at 10:24 AM, Garrett Cooper  wrote:

> Hi Bruce!
> 
> On Aug 4, 2014, at 2:23 AM, Bruce Evans  wrote:
> 
>> On Mon, 4 Aug 2014, Garrett Cooper wrote:
> 
> ...
> 
>> I hope this fixes the error found by "make checkdpadd".  -L is too hard
>> for the current "make checkdpadd" to handle.  Old aout versions worked
>> better using linker support.  They also found the correct dependencies
>> (on shared libraries for shared linkage, not the pseudo-dependenci on
>> the hard-coded static librar for shared linkage).
> 
> Thank you for the reminder about that make target :).

And this still fails make checkdpadd :(...

>> "make checkdpadd" currently finds broken 143 makefiles with inconsistent
>> DPADD.  62 of them are for clang.  Most of these misuse DPADD for
>> headers.  The next largest source of errors is libtermcapw.  LIBTERMCAPW
>> is missing in bsd.libnames.mk.  This breaks about 29 makefiles where
>> LIBTERMCAP was blindly replaced by LIBTERMCAPW.  bsd.libnames.mk and
>> DPADD were unnecessary with the old aout versions.
> 
> I’ll file bugs for any issues I find and work with maintainers to fix the 
> issues. I’m not sure if you’re on Phabricator, but I’d be happy to add you to 
> the reviews if you would like.

I filed bugs for the bulk majority of the issues I found with make checkdpadd.

Thanks!
-Garrett


signature.asc
Description: Message signed with OpenPGP using GPGMail


svn commit: r270113 - head/bin/sh

2014-08-17 Thread Jilles Tjoelker
Author: jilles
Date: Sun Aug 17 19:36:56 2014
New Revision: 270113
URL: http://svnweb.freebsd.org/changeset/base/270113

Log:
  sh: Avoid overflow in atoi() when parsing HISTSIZE.
  
  Side effect: a non-numeric HISTSIZE now results in the default size (100)
  instead of 0.

Modified:
  head/bin/sh/histedit.c

Modified: head/bin/sh/histedit.c
==
--- head/bin/sh/histedit.c  Sun Aug 17 19:24:26 2014(r270112)
+++ head/bin/sh/histedit.c  Sun Aug 17 19:36:56 2014(r270113)
@@ -166,9 +166,10 @@ sethistsize(const char *hs)
HistEvent he;
 
if (hist != NULL) {
-   if (hs == NULL || *hs == '\0' ||
-  (histsize = atoi(hs)) < 0)
+   if (hs == NULL || !is_number(hs))
histsize = 100;
+   else
+   histsize = atoi(hs);
history(hist, &he, H_SETSIZE, histsize);
history(hist, &he, H_SETUNIQUE, 1);
}
___
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: r270114 - head/share/vt/keymaps

2014-08-17 Thread Stefan Esser
Author: se
Date: Sun Aug 17 19:54:21 2014
New Revision: 270114
URL: http://svnweb.freebsd.org/changeset/base/270114

Log:
  Attempt at converting the SYSCONS keymaps to Unicode for use with NEWCONS.
  I have spent many hours comparing source and destination formats, and hope
  to have caught the most severe conversion errors.
  
  Files were converted with a Perl script which I'll shortly commit to the
  tools directory. This script is a much enhanced version of the one
  provided by ray@ and is expected to support the full kbdmap(5) syntax.
  
  The naming convention used is:
  
   <2-letter country code>..kbd
  
  Only if there are multiple layouts for different languages:
  
   <2-letter country code>-<2-letter language code>..kbd
  
  In nearly all cases, the keyboards are country specific, only. Currently
  there is only one case where the language was added ("ch-fr.kbd" for
  the Swiss-French keyboard layout).
  
  I choose to write Unicode character codes as hex numbers. While this
  increases the diff to the SYSCONS keymap files for the trivial cases
  (conversion from ISO8859-1), it really helps to verify the more complex
  cases against a Unicode table (which is indexed by hex numbers).
  
  This commit does not cover all files that have been converted, since I
  need to sort out which ones to use, if there were several with different
  source encodings to choose from.
  
  Review and test of the keymap files is highly desirable before 10.1 is
  released. I'd also appreciate educated opinions regarding the optimum
  variant (to be made available as the default for each language).
  
  Since there are no NEWCONS keymaps in 10-STABLE, I plan to MFC after
  the minimum allowed delay of 3 days, to allow at least a few weeks to
  test and improve what will be in the next release.
  
  MFC after:3 days

Added:
  head/share/vt/keymaps/INDEX.keymaps   (contents, props changed)
  head/share/vt/keymaps/am.kbd   (contents, props changed)
 - copied, changed from r270082, head/share/syscons/keymaps/hy.armscii-8.kbd
  head/share/vt/keymaps/be.acc.kbd   (contents, props changed)
 - copied, changed from r270082, head/share/syscons/keymaps/be.iso.acc.kbd
  head/share/vt/keymaps/bg.bds.ctrlcaps.kbd   (contents, props changed)
 - copied, changed from r270082, 
head/share/syscons/keymaps/bg.phonetic.ctrlcaps.kbd
  head/share/vt/keymaps/bg.bds.kbd   (contents, props changed)
 - copied, changed from r270082, 
head/share/syscons/keymaps/bg.bds.ctrlcaps.kbd
  head/share/vt/keymaps/br.acc.kbd   (contents, props changed)
 - copied, changed from r270082, 
head/share/syscons/keymaps/br275.iso.acc.kbd
  head/share/vt/keymaps/br.kbd   (contents, props changed)
 - copied, changed from r270082, head/share/syscons/keymaps/br275.iso.kbd
  head/share/vt/keymaps/ca.kbd   (contents, props changed)
 - copied, changed from r270082, 
head/share/syscons/keymaps/fr_CA.iso.acc.kbd
  head/share/vt/keymaps/centraleuropean.kbd   (contents, props changed)
 - copied, changed from r270082, head/share/syscons/keymaps/ce.iso2.kbd
  head/share/vt/keymaps/ch-fr.acc.kbd   (contents, props changed)
 - copied, changed from r270082, 
head/share/syscons/keymaps/swissfrench.iso.acc.kbd
  head/share/vt/keymaps/ch-fr.kbd   (contents, props changed)
 - copied, changed from r270082, 
head/share/syscons/keymaps/swissfrench.iso.kbd
  head/share/vt/keymaps/ch.acc.kbd   (contents, props changed)
 - copied, changed from r270082, 
head/share/syscons/keymaps/swissgerman.iso.acc.kbd
  head/share/vt/keymaps/ch.kbd   (contents, props changed)
 - copied, changed from r270082, 
head/share/syscons/keymaps/swissgerman.iso.kbd
  head/share/vt/keymaps/ch.macbook.acc.kbd   (contents, props changed)
 - copied, changed from r270082, 
head/share/syscons/keymaps/swissgerman.macbook.acc.kbd
  head/share/vt/keymaps/colemak.kbd   (contents, props changed)
 - copied, changed from r270082, 
head/share/syscons/keymaps/colemak.iso15.acc.kbd
  head/share/vt/keymaps/cz.kbd   (contents, props changed)
 - copied, changed from r270082, 
head/share/syscons/keymaps/cs.latin2.qwertz.kbd
  head/share/vt/keymaps/de.acc.kbd   (contents, props changed)
 - copied, changed from r270082, 
head/share/syscons/keymaps/german.iso.acc.kbd
  head/share/vt/keymaps/de.kbd   (contents, props changed)
 - copied, changed from r270082, head/share/syscons/keymaps/german.iso.kbd
  head/share/vt/keymaps/dk.acc.kbd   (contents, props changed)
 - copied, changed from r270082, 
head/share/syscons/keymaps/danish.iso.acc.kbd
  head/share/vt/keymaps/dk.kbd   (contents, props changed)
 - copied, changed from r270082, head/share/syscons/keymaps/danish.iso.kbd
  head/share/vt/keymaps/dk.macbook.kbd   (contents, props changed)
 - copied, changed from r270082, 
head/share/syscons/keymaps/danish.iso.macbook.kbd
  head/share/vt/keymaps/ee.kbd   (contents, props changed)
 - copied, changed from r270082, 
head/share/syscons/keymaps/estonian.is

svn commit: r270115 - head/sbin/ifconfig

2014-08-17 Thread Alexander V. Chernikov
Author: melifaro
Date: Sun Aug 17 20:06:47 2014
New Revision: 270115
URL: http://svnweb.freebsd.org/changeset/base/270115

Log:
  Add forgotten DPADD to ifconfig(8).
  
  PR:   192760
  Submitted by: yaneurabeya at gmail.com
  MFC after:2 weeks

Modified:
  head/sbin/ifconfig/Makefile

Modified: head/sbin/ifconfig/Makefile
==
--- head/sbin/ifconfig/Makefile Sun Aug 17 19:54:21 2014(r270114)
+++ head/sbin/ifconfig/Makefile Sun Aug 17 20:06:47 2014(r270115)
@@ -34,6 +34,7 @@ SRCS+=ifgre.c # GRE keys etc
 SRCS+= ifgif.c # GIF reversed header workaround
 
 SRCS+= sfp.c   # SFP/SFP+ information
+DPADD+=${LIBM}
 LDADD+=-lm
 
 SRCS+= ifieee80211.c regdomain.c # SIOC[GS]IEEE80211 support
___
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: r270114 - head/share/vt/keymaps

2014-08-17 Thread Pedro Giffuni


On 08/17/14 14:54, Stefan Esser wrote:

Author: se
Date: Sun Aug 17 19:54:21 2014
New Revision: 270114
URL: http://svnweb.freebsd.org/changeset/base/270114

Log:
   Attempt at converting the SYSCONS keymaps to Unicode for use with NEWCONS.
   I have spent many hours comparing source and destination formats, and hope
   to have caught the most severe conversion errors.
   
   Files were converted with a Perl script which I'll shortly commit to the

   tools directory. This script is a much enhanced version of the one
   provided by ray@ and is expected to support the full kbdmap(5) syntax.
   
   The naming convention used is:
   
<2-letter country code>..kbd
   
   Only if there are multiple layouts for different languages:
   
<2-letter country code>-<2-letter language code>..kbd
   
   In nearly all cases, the keyboards are country specific, only. Currently

   there is only one case where the language was added ("ch-fr.kbd" for
   the Swiss-French keyboard layout).


My $0.02
I think es-la could/should  be used for the latin-american keyboard.
es is basically used only in Spain so it should be es-es

This is just IMHO, and could easily divert into a bikeshed though.

   
   I choose to write Unicode character codes as hex numbers. While this

   increases the diff to the SYSCONS keymap files for the trivial cases
   (conversion from ISO8859-1), it really helps to verify the more complex
   cases against a Unicode table (which is indexed by hex numbers).
   
   This commit does not cover all files that have been converted, since I

   need to sort out which ones to use, if there were several with different
   source encodings to choose from.
   
   Review and test of the keymap files is highly desirable before 10.1 is

   released. I'd also appreciate educated opinions regarding the optimum
   variant (to be made available as the default for each language).
   
   Since there are no NEWCONS keymaps in 10-STABLE, I plan to MFC after

   the minimum allowed delay of 3 days, to allow at least a few weeks to
   test and improve what will be in the next release.
   
   MFC after:	3 days





Regards,

Pedro.
___
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: r270114 - head/share/vt/keymaps

2014-08-17 Thread Aleksandr Rybalko
On Sun, 17 Aug 2014 19:54:21 + (UTC)
Stefan Esser  wrote:

> Author: se
> Date: Sun Aug 17 19:54:21 2014
> New Revision: 270114
> URL: http://svnweb.freebsd.org/changeset/base/270114
> 
> Log:
>   Attempt at converting the SYSCONS keymaps to Unicode for use with NEWCONS.
>   I have spent many hours comparing source and destination formats, and hope
>   to have caught the most severe conversion errors.
>   
>   Files were converted with a Perl script which I'll shortly commit to the
>   tools directory. This script is a much enhanced version of the one
>   provided by ray@ and is expected to support the full kbdmap(5) syntax.
>   
>   The naming convention used is:
>   
><2-letter country code>..kbd
>   
>   Only if there are multiple layouts for different languages:
>   
><2-letter country code>-<2-letter language code>..kbd
>   
>   In nearly all cases, the keyboards are country specific, only. Currently
>   there is only one case where the language was added ("ch-fr.kbd" for
>   the Swiss-French keyboard layout).
>   
>   I choose to write Unicode character codes as hex numbers. While this
>   increases the diff to the SYSCONS keymap files for the trivial cases
>   (conversion from ISO8859-1), it really helps to verify the more complex
>   cases against a Unicode table (which is indexed by hex numbers).
>   
>   This commit does not cover all files that have been converted, since I
>   need to sort out which ones to use, if there were several with different
>   source encodings to choose from.
>   
>   Review and test of the keymap files is highly desirable before 10.1 is
>   released. I'd also appreciate educated opinions regarding the optimum
>   variant (to be made available as the default for each language).
>   
>   Since there are no NEWCONS keymaps in 10-STABLE, I plan to MFC after
>   the minimum allowed delay of 3 days, to allow at least a few weeks to
>   test and improve what will be in the next release.
>   
>   MFC after:  3 days
> 

Thank you very much Stefan for such great help!!!

WBW
-- 
Aleksandr Rybalko 
___
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: r270114 - head/share/vt/keymaps

2014-08-17 Thread Stefan Esser
Am 17.08.2014 um 22:20 schrieb Pedro Giffuni:
> 
> On 08/17/14 14:54, Stefan Esser wrote:
>> Author: se
>> Date: Sun Aug 17 19:54:21 2014
>> New Revision: 270114
>> URL: http://svnweb.freebsd.org/changeset/base/270114
>>
>> Log:
>>Attempt at converting the SYSCONS keymaps to Unicode for use with
>> NEWCONS.
>>I have spent many hours comparing source and destination formats,
>> and hope
>>to have caught the most severe conversion errors.
>>   Files were converted with a Perl script which I'll shortly
>> commit to the
>>tools directory. This script is a much enhanced version of the one
>>provided by ray@ and is expected to support the full kbdmap(5) syntax.
>>   The naming convention used is:
>><2-letter country code>..kbd
>>   Only if there are multiple layouts for different languages:
>><2-letter country code>-<2-letter language code>..kbd
>>   In nearly all cases, the keyboards are country specific, only.
>> Currently
>>there is only one case where the language was added ("ch-fr.kbd" for
>>the Swiss-French keyboard layout).
> 
> My $0.02
> I think es-la could/should  be used for the latin-american keyboard.
> es is basically used only in Spain so it should be es-es

This has been discussed in the mail-list over quite a few days,
and in the end I think that Ed Maste was right with his suggestion
to just use country codes.

My idea was to use the locale IDs, which are of the form
_. But keyboard maps depend more on national
standards than on languages. If you start with the language,
then you need to add the country, but if you start with the
country, you hardly ever need to support language specific
layouts. (The Swiss-French keyboard differs only in two keys
which have the shifted and unshifted characters exchanged.)

> This is just IMHO, and could easily divert into a bikeshed
> though.

It already kind of did, over the last few days ;-)

I spent quite some time discussing the naming scheme and that
time could have been spent on the conversion and review process,
instead ... But I really think that the scheme suggested be Ed
is a good one - it is simple and uses the selector everybody
knows (the country code as used in domain names), while the
language codes are often hard to remember (and SYSCONS keymaps
existed with either one used to name them, as a result).

Therefore, what you'd name "es_LA" (or es-la) is now latinamerican
(it could be "latinamerican-es" if you wanted to make the language
visible in the name). The country comes first, and if there is no
country code (e.g. because the keymap is used in many countries),
a longer name is used.


Sorry, if this is not what you'd have used. Up until two days
ago, I also was in favour of the locale based names. But (just)
the country is much more intuitive selector (and it works for
nearly all countries - and it is easy to support those few that
need both country and language ...)

Best regards, STefan
___
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: r270114 - head/share/vt/keymaps

2014-08-17 Thread Pedro Giffuni

Il giorno 17/ago/2014, alle ore 16:09, Stefan Esser  ha 
scritto:

> Am 17.08.2014 um 22:20 schrieb Pedro Giffuni:
>> 
>> On 08/17/14 14:54, Stefan Esser wrote:
>>> Author: se
>>> Date: Sun Aug 17 19:54:21 2014
>>> New Revision: 270114
>>> URL: http://svnweb.freebsd.org/changeset/base/270114
>>> 
>>> Log:
>>>   Attempt at converting the SYSCONS keymaps to Unicode for use with
>>> NEWCONS.
>>>   I have spent many hours comparing source and destination formats,
>>> and hope
>>>   to have caught the most severe conversion errors.
>>>  Files were converted with a Perl script which I'll shortly
>>> commit to the
>>>   tools directory. This script is a much enhanced version of the one
>>>   provided by ray@ and is expected to support the full kbdmap(5) syntax.
>>>  The naming convention used is:
>>>   <2-letter country code>..kbd
>>>  Only if there are multiple layouts for different languages:
>>>   <2-letter country code>-<2-letter language code>..kbd
>>>  In nearly all cases, the keyboards are country specific, only.
>>> Currently
>>>   there is only one case where the language was added ("ch-fr.kbd" for
>>>   the Swiss-French keyboard layout).
>> 
>> My $0.02
>> I think es-la could/should  be used for the latin-american keyboard.
>> es is basically used only in Spain so it should be es-es
> 
> This has been discussed in the mail-list over quite a few days,
> and in the end I think that Ed Maste was right with his suggestion
> to just use country codes.
> 
> My idea was to use the locale IDs, which are of the form
> _. But keyboard maps depend more on national
> standards than on languages. If you start with the language,
> then you need to add the country, but if you start with the
> country, you hardly ever need to support language specific
> layouts. (The Swiss-French keyboard differs only in two keys
> which have the shifted and unshifted characters exchanged.)
> 
>> This is just IMHO, and could easily divert into a bikeshed
>> though.
> 
> It already kind of did, over the last few days ;-)
> 
> I spent quite some time discussing the naming scheme and that
> time could have been spent on the conversion and review process,
> instead ... But I really think that the scheme suggested be Ed
> is a good one - it is simple and uses the selector everybody
> knows (the country code as used in domain names), while the
> language codes are often hard to remember (and SYSCONS keymaps
> existed with either one used to name them, as a result).
> 
> Therefore, what you'd name "es_LA" (or es-la) is now latinamerican
> (it could be "latinamerican-es" if you wanted to make the language
> visible in the name). The country comes first, and if there is no
> country code (e.g. because the keymap is used in many countries),
> a longer name is used.
> 

That would, IMHO, be fine. What I dislike is that all other files are using
two letter codes and meanwhile the latinamerican thing has the long
name :-P.

FWIW, I tried to change that in syscons but the reduced nomenclature
came too late and changing names caused too much trouble in
sysinstall..

Pedro.


> 
> Sorry, if this is not what you'd have used. Up until two days
> ago, I also was in favour of the locale based names. But (just)
> the country is much more intuitive selector (and it works for
> nearly all countries - and it is easy to support those few that
> need both country and language ...)
> 
> Best regards, STefan

___
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: r270116 - head/lib/atf/libatf-c++

2014-08-17 Thread Garrett Cooper
Author: ngie
Date: Sun Aug 17 23:30:45 2014
New Revision: 270116
URL: http://svnweb.freebsd.org/changeset/base/270116

Log:
  Fix typo in lib/atf/libatfc++/Makefile
  
  LIBATFC should be LIBATF_C; this was missed in the initial import
  (r241823)
  
  PR: 192731
  MFC after: 3 days
  Phabric: D619
  Approved by: rpaulo (mentor)

Modified:
  head/lib/atf/libatf-c++/Makefile

Modified: head/lib/atf/libatf-c++/Makefile
==
--- head/lib/atf/libatf-c++/MakefileSun Aug 17 20:06:47 2014
(r270115)
+++ head/lib/atf/libatf-c++/MakefileSun Aug 17 23:30:45 2014
(r270116)
@@ -33,7 +33,7 @@ PRIVATELIB=   true
 SHLIB_MAJOR=   1
 
 # libatf-c++ depends on the C version of the ATF library to build.
-DPADD= ${LIBATFC}
+DPADD= ${LIBATF_C}
 LDADD= -latf-c
 
 LDFLAGS+=  -L${.OBJDIR}/../libatf-c
___
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: r270117 - head/sbin/hastd

2014-08-17 Thread Garrett Cooper
Author: ngie
Date: Mon Aug 18 00:50:09 2014
New Revision: 270117
URL: http://svnweb.freebsd.org/changeset/base/270117

Log:
  Add -ll to LDADD to fix "make checkdpadd"
  
  Phabric: D622
  MFC after: 2 weeks
  Approved by: rpaulo (mentor)

Modified:
  head/sbin/hastd/Makefile

Modified: head/sbin/hastd/Makefile
==
--- head/sbin/hastd/MakefileSun Aug 17 23:30:45 2014(r270116)
+++ head/sbin/hastd/MakefileMon Aug 18 00:50:09 2014(r270117)
@@ -31,7 +31,7 @@ CFLAGS+=-DINET6
 .endif
 
 DPADD= ${LIBGEOM} ${LIBBSDXML} ${LIBSBUF} ${LIBL} ${LIBPTHREAD} ${LIBUTIL}
-LDADD= -lgeom -lbsdxml -lsbuf -lpthread -lutil
+LDADD= -lgeom -lbsdxml -lsbuf -ll -lpthread -lutil
 .if ${MK_OPENSSL} != "no"
 DPADD+=${LIBCRYPTO}
 LDADD+=-lcrypto
___
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: r270118 - head/sbin/dhclient/tests

2014-08-17 Thread Garrett Cooper
Author: ngie
Date: Mon Aug 18 01:21:41 2014
New Revision: 270118
URL: http://svnweb.freebsd.org/changeset/base/270118

Log:
  Add LIBUTIL to DPADD
  
  This will fix "make checkdpadd"
  
  MFC after: 5 days
  PR: 192759
  Approved by: rpaulo (mentor)

Modified:
  head/sbin/dhclient/tests/Makefile

Modified: head/sbin/dhclient/tests/Makefile
==
--- head/sbin/dhclient/tests/Makefile   Mon Aug 18 00:50:09 2014
(r270117)
+++ head/sbin/dhclient/tests/Makefile   Mon Aug 18 01:21:41 2014
(r270118)
@@ -8,6 +8,7 @@ PLAIN_TESTS_C=  option-domain-search_t
 SRCS.option-domain-search_test=alloc.c convert.c hash.c 
options.c \
tables.c fake.c option-domain-search.c
 CFLAGS.option-domain-search_test+= -I${.CURDIR}/..
+DPADD.option-domain-search_test=   ${LIBUTIL}
 LDADD.option-domain-search_test=   -lutil
 
 WARNS?=2
___
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: r270119 - head/share/vt/keymaps

2014-08-17 Thread Ed Maste
Author: emaste
Date: Mon Aug 18 01:49:42 2014
New Revision: 270119
URL: http://svnweb.freebsd.org/changeset/base/270119

Log:
  Rename ca keyboard to ca-fr
  
  "ca" will shortly be used for the Canadian Multilingual keyboard.

Added:
  head/share/vt/keymaps/ca-fr.kbd
 - copied unchanged from r270118, head/share/vt/keymaps/ca.kbd
Deleted:
  head/share/vt/keymaps/ca.kbd
Modified:
  head/share/vt/keymaps/INDEX.keymaps
  head/share/vt/keymaps/Makefile

Modified: head/share/vt/keymaps/INDEX.keymaps
==
--- head/share/vt/keymaps/INDEX.keymaps Mon Aug 18 01:21:41 2014
(r270118)
+++ head/share/vt/keymaps/INDEX.keymaps Mon Aug 18 01:49:42 2014
(r270119)
@@ -200,11 +200,11 @@ fr.dvorak.acc.kbd:pt:Francês Dvorak (co
 fr.dvorak.acc.kbd:es:Francés Dvorak (con acentos)
 fr.dvorak.acc.kbd:uk:French Dvorak-like (accent keys)
 
-ca.kbd:en:French Canadian (accent keys)
-ca.kbd:de:Französisch Kanada (mit Akzenten)
-ca.kbd:fr:Français Canadien (avec accents)
-ca.kbd:es:Francocanadiense (con acentos)
-ca.kbd:uk:Французько-канадська (accent keys)
+ca-fr.kbd:en:French Canadian (accent keys)
+ca-fr.kbd:de:Französisch Kanada (mit Akzenten)
+ca-fr.kbd:fr:Français Canadien (avec accents)
+ca-fr.kbd:es:Francocanadiense (con acentos)
+ca-fr.kbd:uk:Французько-канадська (accent keys)
 
 de.kbd:en:German
 de.kbd:de:Deutsch

Modified: head/share/vt/keymaps/Makefile
==
--- head/share/vt/keymaps/Makefile  Mon Aug 18 01:21:41 2014
(r270118)
+++ head/share/vt/keymaps/Makefile  Mon Aug 18 01:49:42 2014
(r270119)
@@ -6,7 +6,7 @@ FILES=  INDEX.keymaps \
bg.bds.kbd \
br.acc.kbd \
br.kbd \
-   ca.kbd \
+   ca-fr.kbd \
centraleuropean.kbd \
ch-fr.acc.kbd \
ch-fr.kbd \

Copied: head/share/vt/keymaps/ca-fr.kbd (from r270118, 
head/share/vt/keymaps/ca.kbd)
==
--- /dev/null   00:00:00 1970   (empty, because file is newly added)
+++ head/share/vt/keymaps/ca-fr.kbd Mon Aug 18 01:49:42 2014
(r270119, copy of r270118, head/share/vt/keymaps/ca.kbd)
@@ -0,0 +1,143 @@
+# French Canadian keyboard
+# by Alexandre Normand (outc...@globetretrotter.net)
+# with the help of Demis (de...@club-internet.fr)
+#
+# July 4, 1999
+#
+# $FreeBSD$
+
+# alt
+# scan   cntrl  altalt   cntrl lock
+# code  base   shift  cntrl  shift  altshift  cntrl  shift state
+  000   nopnopnopnopnopnopnopnop O
+  001   escescescescescescdebug  esc O
+  002   '1''!'nopnop0xb1   '!'nopnop O
+  003   '2''"'nulnul'@''"'nulnul O
+  004   '3''/'nopnop0xa3   '/'nopnop O
+  005   '4''$'nopnop0xa2   '$'nopnop O
+  006   '5''%'nopnop0x20ac '%'nopnop O
+  007   '6''?'nopnop0xac   '?'nopnop O
+  008   '7''&'nopnop'|''&'nopnop O
+  009   '8''*'nopnop0xb2   '*'nopnop O
+  010   '9''('nopnop0xb3   '('nopnop O
+  011   '0'')'nopnop0x0152 ')'nopnop O
+  012   '-''_'nopnop0x0153 '_'nopnop O
+  013   '=''+'nopnop0x0178 '+'nopnop O
+  014   bs bs deldelbs bs deldel O
+  015   ht btab   nopnopht btab   nopnop O
+  016   'q''Q'dc1dc1'q''Q'dc1dc1 C
+  017   'w''W'etbetb'w''W'etbetb C
+  018   'e''E'enqenq0x20ac 'E'enqenq C
+  019   'r''R'dc2dc2'r''R'dc2dc2 C
+  020   't''T'dc4dc4't''T'dc4dc4 C
+  021   'y''Y'em em 'y''Y'em em  C
+  022   'u''U'naknak'u''U'naknak C
+  023   'i''I'ht ht 'i''I'ht ht  C
+  024   'o''O'si si 'o''O'si si  C
+  025   'p''P'dledle'p''P'dledle C
+  026   dcir   dcir   escesc'['dcir   escesc O
+  027   dced   duml   gs gs ']'duml   gs gs  O
+  028   cr cr nl nl cr cr nl nl  O
+  029   lctrl  lctrl  lctrl  lctrl  lctrl  lctrl  lctrl  lctrl   O
+  030   'a''A'sohsoh'a''A'sohsoh C
+  031   's''S'dc3dc3's''S'dc3dc3 C
+  032   'd''D'eoteot'd''D'eoteot C
+  033   'f''F'ackack'f''F'ackack C
+  034   'g''G'bel

Re: svn commit: r270114 - head/share/vt/keymaps

2014-08-17 Thread Ed Maste
On 17 August 2014 15:54, Stefan Esser  wrote:
> Author: se
> Date: Sun Aug 17 19:54:21 2014
> New Revision: 270114
> URL: http://svnweb.freebsd.org/changeset/base/270114
>
> Log:
>   Attempt at converting the SYSCONS keymaps to Unicode for use with NEWCONS.
>   I have spent many hours comparing source and destination formats, and hope
>   to have caught the most severe conversion errors.

Stefan,

Thank you very much for taking this on.

><2-letter country code>..kbd
>
>   Only if there are multiple layouts for different languages:
>
><2-letter country code>-<2-letter language code>..kbd
>
>   In nearly all cases, the keyboards are country specific, only. Currently
>   there is only one case where the language was added ("ch-fr.kbd" for
>   the Swiss-French keyboard layout).

I've just temporarily broken this rule by renaming ca.kbd to
ca-fr.kbd, but will add a "Canadian Multilingual" ca.kbd soon; I think
it's better to get this set up in advance of the MFC.

>   I choose to write Unicode character codes as hex numbers. While this
>   increases the diff to the SYSCONS keymap files for the trivial cases
>   (conversion from ISO8859-1), it really helps to verify the more complex
>   cases against a Unicode table (which is indexed by hex numbers).

Thanks for this too, I agree that being able to look up Unicode code
points directly is much more important than reducing syscons diffs.
___
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: r270124 - head/sys/arm/arm

2014-08-17 Thread Warner Losh
Author: imp
Date: Mon Aug 18 02:45:06 2014
New Revision: 270124
URL: http://svnweb.freebsd.org/changeset/base/270124

Log:
  /usr/libexec/ld.so.1 never was a thing on FreeBSD/arm. This was the
  FreeBSD 3.x and 4.x run time linker. FreeBSD/arm's first release was
  5.0. Retire this long-dead code.

Modified:
  head/sys/arm/arm/elf_machdep.c

Modified: head/sys/arm/arm/elf_machdep.c
==
--- head/sys/arm/arm/elf_machdep.c  Mon Aug 18 02:44:56 2014
(r270123)
+++ head/sys/arm/arm/elf_machdep.c  Mon Aug 18 02:45:06 2014
(r270124)
@@ -100,23 +100,6 @@ SYSINIT(elf32, SI_SUB_EXEC, SI_ORDER_FIR
(sysinit_cfunc_t) elf32_insert_brand_entry,
&freebsd_brand_info);
 
-static Elf32_Brandinfo freebsd_brand_oinfo = {
-   .brand  = ELFOSABI_FREEBSD,
-   .machine= EM_ARM,
-   .compat_3_brand = "FreeBSD",
-   .emul_path  = NULL,
-   .interp_path= "/usr/libexec/ld-elf.so.1",
-   .sysvec = &elf32_freebsd_sysvec,
-   .interp_newpath = NULL,
-   .brand_note = &elf32_freebsd_brandnote,
-   .flags  = BI_CAN_EXEC_DYN | BI_BRAND_NOTE,
-   .header_supported= elf32_arm_abi_supported,
-};
-
-SYSINIT(oelf32, SI_SUB_EXEC, SI_ORDER_ANY,
-   (sysinit_cfunc_t) elf32_insert_brand_entry,
-   &freebsd_brand_oinfo);
-
 static boolean_t
 elf32_arm_abi_supported(struct image_params *imgp)
 {
___
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: r270123 - in head/sys: arm/arm arm/include kern sys

2014-08-17 Thread Warner Losh
Author: imp
Date: Mon Aug 18 02:44:56 2014
New Revision: 270123
URL: http://svnweb.freebsd.org/changeset/base/270123

Log:
  Expand the elf brandelf infrastructure to give access to the whole ELF
  header (Elf_Ehdr) to determine if a particular interpretor wants to
  accept it or not. Use this mechanism to filter EABI arm on OABI arm
  kernels, and vice versa. This method could also be used to implement
  OABI on EABI arm kernels, if desired, or to allow a single mips kernel
  to run o32, n32 and n64 binaries.
  
  Differential Revision: https://reviews.freebsd.org/D609

Modified:
  head/sys/arm/arm/elf_machdep.c
  head/sys/arm/include/elf.h
  head/sys/kern/imgact_elf.c
  head/sys/sys/imgact_elf.h

Modified: head/sys/arm/arm/elf_machdep.c
==
--- head/sys/arm/arm/elf_machdep.c  Mon Aug 18 02:42:23 2014
(r270122)
+++ head/sys/arm/arm/elf_machdep.c  Mon Aug 18 02:44:56 2014
(r270123)
@@ -46,6 +46,8 @@ __FBSDID("$FreeBSD$");
 #include 
 #include 
 
+static boolean_t elf32_arm_abi_supported(struct image_params *);
+
 struct sysentvec elf32_freebsd_sysvec = {
.sv_size= SYS_MAXSYSCALL,
.sv_table   = sysent,
@@ -90,7 +92,8 @@ static Elf32_Brandinfo freebsd_brand_inf
.sysvec = &elf32_freebsd_sysvec,
.interp_newpath = NULL,
.brand_note = &elf32_freebsd_brandnote,
-   .flags  = BI_CAN_EXEC_DYN | BI_BRAND_NOTE
+   .flags  = BI_CAN_EXEC_DYN | BI_BRAND_NOTE,
+   .header_supported= elf32_arm_abi_supported,
 };
 
 SYSINIT(elf32, SI_SUB_EXEC, SI_ORDER_FIRST,
@@ -106,13 +109,42 @@ static Elf32_Brandinfo freebsd_brand_oin
.sysvec = &elf32_freebsd_sysvec,
.interp_newpath = NULL,
.brand_note = &elf32_freebsd_brandnote,
-   .flags  = BI_CAN_EXEC_DYN | BI_BRAND_NOTE
+   .flags  = BI_CAN_EXEC_DYN | BI_BRAND_NOTE,
+   .header_supported= elf32_arm_abi_supported,
 };
 
 SYSINIT(oelf32, SI_SUB_EXEC, SI_ORDER_ANY,
(sysinit_cfunc_t) elf32_insert_brand_entry,
&freebsd_brand_oinfo);
 
+static boolean_t
+elf32_arm_abi_supported(struct image_params *imgp)
+{
+   const Elf_Ehdr *hdr = (const Elf_Ehdr *)imgp->image_header;
+
+#ifdef __ARM_EABI__
+   /*
+* When configured for EABI, FreeBSD supports EABI vesions 4 and 5.
+*/
+   if (EF_ARM_EABI_VERSION(hdr->e_flags) < EF_ARM_EABI_FREEBSD_MIN) {
+   if (bootverbose)
+   uprintf("Attempting to execute non EABI binary (rev %d) 
image %s",
+   EF_ARM_EABI_VERSION(hdr->e_flags), 
imgp->args->fname);
+   return (FALSE);
+   }
+#else
+   /*
+* When configured for OABI, that's all we do, so reject EABI binaries.
+*/
+   if (EF_ARM_EABI_VERSION(hdr->e_flags) != EF_ARM_EABI_VERSION_UNKNOWN) {
+   if (bootverbose)
+   uprintf("Attempting to execute EABI binary (rev %d) 
image %s",
+   EF_ARM_EABI_VERSION(hdr->e_flags), 
imgp->args->fname);
+   return (FALSE);
+   }
+#endif
+   return (TRUE);
+}
 
 void
 elf32_dump_thread(struct thread *td __unused, void *dst __unused,

Modified: head/sys/arm/include/elf.h
==
--- head/sys/arm/include/elf.h  Mon Aug 18 02:42:23 2014(r270122)
+++ head/sys/arm/include/elf.h  Mon Aug 18 02:44:56 2014(r270123)
@@ -103,6 +103,12 @@ __ElfType(Auxinfo);
 #defineELF_TARG_MACH   EM_ARM
 #defineELF_TARG_VER1
 
+/* Defines specific for arm headers */
+#define EF_ARM_EABIMASK  0xff00
+#define EF_ARM_EABI_VERSION(x) (((x) & EF_ARM_EABIMASK) >> 24)
+#define EF_ARM_EABI_VERSION_UNKNOWN 0
+#define EF_ARM_EABI_FREEBSD_MIN 4
+
 /*
  * Magic number for the elf trampoline, chosen wisely to be an immediate
  * value.

Modified: head/sys/kern/imgact_elf.c
==
--- head/sys/kern/imgact_elf.c  Mon Aug 18 02:42:23 2014(r270122)
+++ head/sys/kern/imgact_elf.c  Mon Aug 18 02:44:56 2014(r270123)
@@ -294,6 +294,19 @@ __elfN(get_brandinfo)(struct image_param
return (bi);
}
 
+   /* No known brand, see if the header is recognized by any brand */
+   for (i = 0; i < MAX_BRANDS; i++) {
+   bi = elf_brand_list[i];
+   if (bi == NULL || bi->flags & BI_BRAND_NOTE_MANDATORY ||
+   bi->header_supported == NULL)
+   continue;
+   if (hdr->e_machine == bi->machine) {
+   ret = bi->header_supported(imgp);
+   if (ret)
+   return (bi);
+   }
+   }
+
/* Lacking a known brand, search for a recognized interpreter. */
if (interp != NULL) {