svn commit: r270129 - head/sbin/ifconfig

2014-08-18 Thread Alexander V. Chernikov
Author: melifaro
Date: Mon Aug 18 08:07:50 2014
New Revision: 270129
URL: http://svnweb.freebsd.org/changeset/base/270129

Log:
  Zero buffer before request.

Modified:
  head/sbin/ifconfig/sfp.c

Modified: head/sbin/ifconfig/sfp.c
==
--- head/sbin/ifconfig/sfp.cMon Aug 18 05:22:09 2014(r270128)
+++ head/sbin/ifconfig/sfp.cMon Aug 18 08:07:50 2014(r270129)
@@ -451,6 +451,7 @@ read_i2c_ixgbe(struct i2c_info *ii, uint
for (i = 0; i < len; i += 1) {
ixreq.offset = off + i;
ixreq.len = 1;
+   ixreq.data[0] = '\0';
 
if (ioctl(ii->s, SIOCGI2C, ii->ifr) != 0) {
ii->error = errno;
___
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: r270131 - head/tools/tools/vt/keymaps

2014-08-18 Thread Stefan Esser
Author: se
Date: Mon Aug 18 09:40:19 2014
New Revision: 270131
URL: http://svnweb.freebsd.org/changeset/base/270131

Log:
  Import the tools used to convert the keymap files from SYSCONS (in locale
  dependent encoding) to NEWCONS (Unicode).
  
  The file "LANG.map" is used to convert INDEX.keymaps. It has 3 columns:
  - the language ID as used in the source file
  - the language ID to be used in the generated file (e.g. "iw" -> "he")
  - the encoding of the menu texts for this language
  The conversion result is written to STDOUT.
  
  The file "KBDFILES.map" is used to batch convert keymap files. It's
  columns are:
  - the encoding used for the keymap sounce file
  - the name of the source file
  - the name of the generated file
  The output files are created in the TEMP sub-directory of the vt keymap
  directory, in order to preserve (possibly uncommitted) keymap files in
  /usr/src/share/vt/keymaps.
  
  The convert-keymap.pl script can be directly executed by passing the
  source file name and the encoding on the command line. It writes to
  STDOUT and generates hex Unicode codepoints by default. (This can be
  changed to decimal in the script.)
  
  While written for the one-time conversion of the SYSCONS keymaps into
  the format required for NEWCONS, I think these tools may be useful for
  easy conversion of possible further SYSCONS keymap files, that have not
  been committed to the source tree.

Added:
  head/tools/tools/vt/keymaps/
  head/tools/tools/vt/keymaps/KBDFILES.map   (contents, props changed)
  head/tools/tools/vt/keymaps/LANG.map   (contents, props changed)
  head/tools/tools/vt/keymaps/convert-INDEX.pl   (contents, props changed)
  head/tools/tools/vt/keymaps/convert-keymap.pl   (contents, props changed)
  head/tools/tools/vt/keymaps/convert-keymaps.pl   (contents, props changed)

Added: head/tools/tools/vt/keymaps/KBDFILES.map
==
--- /dev/null   00:00:00 1970   (empty, because file is newly added)
+++ head/tools/tools/vt/keymaps/KBDFILES.mapMon Aug 18 09:40:19 2014
(r270131)
@@ -0,0 +1,141 @@
+# $FreeBSD$
+
+ISO8859-15 be.iso.kbd  be.kbd
+ISO8859-15 be.iso.acc.kbd  be.acc.kbd
+
+ISO8859-5  bg.bds.ctrlcaps.kbd bg.bds.kbd
+ISO8859-5  bg.phonetic.ctrlcaps.kbdbg.bds.ctrlcaps.kbd
+
+ISO8859-1  br275.iso.kbd   br.kbd
+ISO8859-1  br275.iso.acc.kbd   br.acc.kbd
+CP850  br275.cp850.kbd br.kbd.from-cp850
+
+CP1131 by.cp1131.kbd   by.kbd.from-cp1131
+CP1251 by.cp1251.kbd   by.kbd.from-cp1251
+ISO8859-5  by.iso5.kbd by.kbd.from-iso5
+
+ISO8859-2  ce.iso2.kbd centraleuropean.kbd
+
+ISO8859-1  colemak.iso15.acc.kbd   colemak.kbd
+
+ISO8859-2  cs.latin2.qwertz.kbdcz.kbd
+ISO8859-2  cz.iso2.kbd cz.kbd.from-ce
+
+ISO8859-15 danish.iso.kbd  dk.kbd
+ISO8859-15 danish.iso.acc.kbd  dk.acc.kbd
+CP865  danish.cp865.kbddk.kbd.from-cp865
+ISO8859-1  danish.iso.macbook.kbd  dk.macbook.kbd
+
+ISO8859-1  dutch.iso.acc.kbd   nl.kbd
+
+ISO8859-15 eee_nordic.kbd  nordic.asus-eee.kbd
+
+ISO8859-7  el.iso07.kbdgr.kbd
+
+ISO8859-1  estonian.iso.kbdee.kbd.from-iso1
+ISO8859-15 estonian.iso15.kbd  ee.kbd
+CP850  estonian.cp850.kbd  ee.kbd.from-cp850
+
+ISO8859-15 finnish.iso.kbd fi.kbd
+CP850  finnish.cp850.kbd   fi.kbd.from-cp850
+
+ISO8859-15 fr.iso.kbd  fr.kbd
+ISO8859-15 fr.iso.acc.kbd  fr.acc.kbd
+ISO8859-15 fr.macbook.acc.kbd  fr.macbook.kbd
+ISO8859-1  fr.dvorak.kbd   fr.dvorak.kbd
+ISO8859-15 fr.dvorak.acc.kbd   fr.dvorak.acc.kbd
+
+ISO8859-15 fr_CA.iso.acc.kbd   ca-fr.kbd
+
+ISO8859-15 german.iso.kbd  de.kbd
+ISO8859-15 german.iso.acc.kbd  de.acc.kbd
+CP850  german.cp850.kbdde.kbd.from-cp850
+
+ISO8859-7  gr.elot.acc.kbd gr.elot.acc.kbd
+ISO8859-7  gr.us101.acc.kbdgr.101.acc.kbd
+
+ISO8859-8  iw.iso8.kbd il.kbd
+
+ISO8859-2  hr.iso.kbd  hr.kbd
+
+ISO8859-2  hu.iso2.101keys.kbd hu.101.kbd
+ISO8859-2  hu.iso2.102keys.kbd hu.102.kbd
+
+ARMSCII-8  hy.armscii-8.kbdam.kbd
+
+ISO8859-1  icelandic.iso.kbd   is.kbd
+ISO8859-1  icelandic.iso.acc.kbd   is.acc.kbd
+
+ISO8859-15 it.iso.kbd  it.kbd
+
+ISO8859-1  jp.106.kbd  jp.kbd
+ISO8859-1  jp.106x.kbd

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

2014-08-18 Thread Stefan Esser
Am 17.08.2014 um 23:40 schrieb Pedro Giffuni:
> 
> Il giorno 17/ago/2014, alle ore 16:09, Stefan Esser  > ha scritto:
>> 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.

Ahh, I see. Well, this long name is meant to stand out when looking at
the keymap files. If you use kbdmap to select a keymap, then it does
not matter how long the name is. And if you select the file by name
from within the keymaps directory, then a short name could easily be
overlooked.

And se-la would mean "Spain using the latinamerican language" ;-)
since the first part is the country, not the language.

But you are not suffering alone: there is "centraleuropean.iso", too.

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

I thought it was a good time since nearly all files needed to change
anyway, because of the removal of the encoding from the names.

Names in syscons are probably encoded in lots of rc.conf files, and
changing them might have been a big POLA.

one thing that I'm thinking about is whether we should have an
optional keymap_sc and keymap_vt in rc.conf, which allows to have
different keymap files when running under SYSCONS vs. NEWCONS.

This would be easy to implement, with keymap still being used,
unless the more specific variable for the console driver used has
an override.

I think I'll just implement this for -CURRENT and wait for opinions,
whether this should be merged to -STABLE ...

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: r270132 - head/usr.bin/grep

2014-08-18 Thread Gabor Kovesdan
Author: gabor
Date: Mon Aug 18 12:29:28 2014
New Revision: 270132
URL: http://svnweb.freebsd.org/changeset/base/270132

Log:
  - Do not look for more matching lines if -L is specified
  
  Submitted by:   eadler (based on)
  MFC after:2 weeks

Modified:
  head/usr.bin/grep/util.c

Modified: head/usr.bin/grep/util.c
==
--- head/usr.bin/grep/util.cMon Aug 18 09:40:19 2014(r270131)
+++ head/usr.bin/grep/util.cMon Aug 18 12:29:28 2014(r270132)
@@ -336,7 +336,7 @@ procline(struct str *l, int nottext)
}
 
/* One pass if we are not recording matches */
-   if (!wflag && ((color == NULL && !oflag) || qflag || lflag))
+   if (!wflag && ((color == NULL && !oflag) || qflag || lflag || 
Lflag))
break;
 
if (st == (size_t)pmatch.rm_so)
___
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: r270133 - head/lib/libusb

2014-08-18 Thread Hans Petter Selasky
Author: hselasky
Date: Mon Aug 18 14:23:07 2014
New Revision: 270133
URL: http://svnweb.freebsd.org/changeset/base/270133

Log:
  Add more USB class codes.
  
  Obtained from:libusb project at SourceForge
  MFC after:1 week

Modified:
  head/lib/libusb/libusb.h

Modified: head/lib/libusb/libusb.h
==
--- head/lib/libusb/libusb.hMon Aug 18 12:29:28 2014(r270132)
+++ head/lib/libusb/libusb.hMon Aug 18 14:23:07 2014(r270133)
@@ -51,10 +51,18 @@ enum libusb_class_code {
LIBUSB_CLASS_COMM = 2,
LIBUSB_CLASS_HID = 3,
LIBUSB_CLASS_PTP = 6,
+   LIBUSB_CLASS_IMAGE = 6,
LIBUSB_CLASS_PRINTER = 7,
LIBUSB_CLASS_MASS_STORAGE = 8,
LIBUSB_CLASS_HUB = 9,
LIBUSB_CLASS_DATA = 10,
+   LIBUSB_CLASS_SMART_CARD = 11,
+   LIBUSB_CLASS_CONTENT_SECURITY = 13,
+   LIBUSB_CLASS_VIDEO = 14,
+   LIBUSB_CLASS_PERSONAL_HEALTHCARE = 15,
+   LIBUSB_CLASS_DIAGNOSTIC_DEVICE = 0xdc,
+   LIBUSB_CLASS_WIRELESS = 0xe0,
+   LIBUSB_CLASS_APPLICATION = 0xfe,
LIBUSB_CLASS_VENDOR_SPEC = 0xff,
 };
 
___
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: r270134 - head/sys/dev/sound/usb

2014-08-18 Thread Hans Petter Selasky
Author: hselasky
Date: Mon Aug 18 14:30:43 2014
New Revision: 270134
URL: http://svnweb.freebsd.org/changeset/base/270134

Log:
  Use the "bSubslotSize" and "bSubFrameSize" fields to obtain the actual
  sample size. According to the USB audio frame format specification
  from USB.org, the value in the "bBitResolution" field can be less than
  the actual sample size, depending on the actual hardware, and should
  not be used for this computation.
  
  PR:   192755
  MFC after:1 week

Modified:
  head/sys/dev/sound/usb/uaudio.c

Modified: head/sys/dev/sound/usb/uaudio.c
==
--- head/sys/dev/sound/usb/uaudio.c Mon Aug 18 14:23:07 2014
(r270133)
+++ head/sys/dev/sound/usb/uaudio.c Mon Aug 18 14:30:43 2014
(r270134)
@@ -1659,21 +1659,10 @@ uaudio_chan_fill_info_sub(struct uaudio_
} else if (audio_rev >= UAUDIO_VERSION_20) {
 
uint32_t dwFormat;
-   uint8_t bSubslotSize;
 
dwFormat = UGETDW(asid.v2->bmFormats);
bChannels = asid.v2->bNrChannels;
-   bBitResolution = asf1d.v2->bBitResolution;
-   bSubslotSize = asf1d.v2->bSubslotSize;
-
-   /* Map 4-byte aligned 24-bit samples into 32-bit */
-   if (bBitResolution == 24 && bSubslotSize == 4)
-   bBitResolution = 32;
-
-   if (bBitResolution != (bSubslotSize * 8)) {
-   DPRINTF("Invalid bSubslotSize\n");
-   goto next_ep;
-   }
+   bBitResolution = asf1d.v2->bSubslotSize * 8;
 
if ((bChannels != channels) ||
(bBitResolution != bit_resolution)) {
@@ -1720,7 +1709,7 @@ uaudio_chan_fill_info_sub(struct uaudio_
 
wFormat = UGETW(asid.v1->wFormatTag);
bChannels = UAUDIO_MAX_CHAN(asf1d.v1->bNrChannels);
-   bBitResolution = asf1d.v1->bBitResolution;
+   bBitResolution = asf1d.v1->bSubFrameSize * 8;
 
if (asf1d.v1->bSamFreqType == 0) {
DPRINTFN(16, "Sample rate: %d-%dHz\n",
___
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-18 Thread Pedro Giffuni

Il giorno 18/ago/2014, alle ore 05:38, Stefan Esser  ha 
scritto:

> Am 17.08.2014 um 23:40 schrieb Pedro Giffuni:
>> 
>> Il giorno 17/ago/2014, alle ore 16:09, Stefan Esser > > ha scritto:
>>> 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.
> 
> Ahh, I see. Well, this long name is meant to stand out when looking at
> the keymap files. If you use kbdmap to select a keymap, then it does
> not matter how long the name is. And if you select the file by name
> from within the keymaps directory, then a short name could easily be
> overlooked.
> 
> And se-la would mean "Spain using the latinamerican language" ;-)
> since the first part is the country, not the language.
> 


I should have been clearer: I meant la-es would be fine.


> But you are not suffering alone: there is "centraleuropean.iso", too.
> 

Funny thing is almost all latin-american countries speak Spanish but in Spain
there is Catalan and other languages as well so when looking at the directories
(ls -la) the keyboards will look unordered. Sorting the keyboards by language
would be more natural, but I guess that as an exercise for the installer.


>> FWIW, I tried to change that in syscons but the reduced nomenclature
>> came too late and changing names caused too much trouble in
>> sysinstall..
> 
> I thought it was a good time since nearly all files needed to change
> anyway, because of the removal of the encoding from the names.
> 
> Names in syscons are probably encoded in lots of rc.conf files, and
> changing them might have been a big POLA.
> 

Yes, we renamed the latin-american keyboard once (before I was a commiter)
and the related bug report remained open for some years.

Pedro.

> one thing that I'm thinking about is whether we should have an
> optional keymap_sc and keymap_vt in rc.conf, which allows to have
> different keymap files when running under SYSCONS vs. NEWCONS.
> 
> This would be easy to implement, with keymap still being used,
> unless the more specific variable for the console driver used has
> an override.
> 
> I think I'll just implement this for -CURRENT and wait for opinions,
> whether this should be merged to -STABLE ...
> 
> 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: r270135 - head/share/examples/autofs

2014-08-18 Thread Edward Tomasz Napierala
Author: trasz
Date: Mon Aug 18 14:47:13 2014
New Revision: 270135
URL: http://svnweb.freebsd.org/changeset/base/270135

Log:
  Remove vestiges of previous autofs.
  
  Discussed with:   alfred@
  MFC after:2 weeks
  Sponsored by: The FreeBSD Foundation

Deleted:
  head/share/examples/autofs/
___
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: r270142 - head/share/vt/keymaps

2014-08-18 Thread Ed Maste
Author: emaste
Date: Mon Aug 18 17:10:55 2014
New Revision: 270142
URL: http://svnweb.freebsd.org/changeset/base/270142

Log:
  Add Canadian Bilingual keyboard

Added:
  head/share/vt/keymaps/ca.kbd   (contents, props changed)
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 17:08:11 2014
(r270141)
+++ head/share/vt/keymaps/INDEX.keymaps Mon Aug 18 17:10:55 2014
(r270142)
@@ -200,6 +200,8 @@ 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:Canadian Bilingual
+
 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)

Modified: head/share/vt/keymaps/Makefile
==
--- head/share/vt/keymaps/Makefile  Mon Aug 18 17:08:11 2014
(r270141)
+++ head/share/vt/keymaps/Makefile  Mon Aug 18 17:10:55 2014
(r270142)
@@ -6,6 +6,7 @@ FILES=  INDEX.keymaps \
bg.bds.kbd \
br.acc.kbd \
br.kbd \
+   ca.kbd \
ca-fr.kbd \
centraleuropean.kbd \
ch-fr.acc.kbd \

Added: head/share/vt/keymaps/ca.kbd
==
--- /dev/null   00:00:00 1970   (empty, because file is newly added)
+++ head/share/vt/keymaps/ca.kbdMon Aug 18 17:10:55 2014
(r270142)
@@ -0,0 +1,139 @@
+# Canadian Bilingual keyboard
+#
+# $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''%'nopnop0xa4   '%'nopnop O
+  007   '6''^'nopnop0xac   '?'nopnop O
+  008   '7''&'nopnop'|''&'nopnop O
+  009   '8''*'nopnop0xb2   '*'nopnop O
+  010   '9''('nopnop0xb3   '('nopnop O
+  011   '0'')'nopnop0xbc   ')'nopnop O
+  012   '-''_'nopnop0xbd   '_'nopnop O
+  013   '=''+'nopnop0xbe   '+'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 0xa7   'O'si si  C
+  025   'p''P'dledle0xb6   'P'dledle C
+  026   '[''{'nopnopdcir   dcir   nopnop O
+  027   ']''}'nopnopdced   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'belbel'g''G'belbel C
+  035   'h''H'bs bs 'h''H'bs bs  C
+  036   'j''J'nl nl 'j''J'nl nl  C
+  037   'k''K'vt vt 'k''K'vt vt  C
+  038   'l''L'ff ff 'l''L'ff ff  C
+  039   ';'':'nopnop'~'':'nopnop O
+  040   ''''"'nopnopdgra   dgra   nopnop O
+  041   0x60   0x7e   nopnop0x60   0x7e   nopnop O
+  042   lshift lshift lshift lshift lshift lshift lshift lshift  O
+  043   '\''|'fs fs '<''>'nopnop O
+  044   'z''Z'subsub'z''Z'sub

svn commit: r270144 - head/lib/libcrypt/tests

2014-08-18 Thread Garrett Cooper
Author: ngie
Date: Mon Aug 18 17:35:39 2014
New Revision: 270144
URL: http://svnweb.freebsd.org/changeset/base/270144

Log:
  Add LIBCRYPT to DPADD, remove LDFLAGS from LDADD, and sort the Makefile 
variables
  
  This fixes "make checkdpadd"
  
  Phabric: D620
  Approved by: jmmv (mentor)
  PR: 192729
  MFC after: 5 days

Modified:
  head/lib/libcrypt/tests/Makefile

Modified: head/lib/libcrypt/tests/Makefile
==
--- head/lib/libcrypt/tests/MakefileMon Aug 18 17:35:33 2014
(r270143)
+++ head/lib/libcrypt/tests/MakefileMon Aug 18 17:35:39 2014
(r270144)
@@ -7,6 +7,7 @@ TESTSDIR= ${TESTSBASE}/lib/libcrypt
 ATF_TESTS_C= crypt_tests
 
 CFLAGS+= -I${.CURDIR:H}
-LDADD+= -L${.OBJDIR:H} -lcrypt
+DPADD+=${LIBCRYPT}
+LDADD+= -lcrypt
 
 .include 
___
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: r270145 - head/lib/clang

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

Log:
  Replace DPADD with DPSRCS to fix "make checkdpadd"
  
  Phabric: D625
  Approved by: jmmv (mentor)
  Reviewed by: dim
  PR: 192734
  MFC after: 2 weeks

Modified:
  head/lib/clang/clang.build.mk

Modified: head/lib/clang/clang.build.mk
==
--- head/lib/clang/clang.build.mk   Mon Aug 18 17:35:39 2014
(r270144)
+++ head/lib/clang/clang.build.mk   Mon Aug 18 17:38:50 2014
(r270145)
@@ -237,5 +237,5 @@ Checkers.inc.h: ${CLANG_SRCS}/lib/Static
 .endfor
 
 SRCS+= ${TGHDRS:C/$/.inc.h/}
-DPADD+=${TGHDRS:C/$/.inc.h/}
+DPSRCS+=   ${TGHDRS:C/$/.inc.h/}
 CLEANFILES+=   ${TGHDRS:C/$/.inc.h/} ${TGHDRS:C/$/.inc.d/}
___
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: r270146 - head/usr.sbin/iscsid

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

Log:
  Add LIBCRYPTO and LIBSSL to DPADD
  
  This fixes "make checkdpadd"
  
  Phabric: D621
  PR: 192761
  Approved by: rpaulo (mentor)
  MFC after: 2 weeks

Modified:
  head/usr.sbin/iscsid/Makefile

Modified: head/usr.sbin/iscsid/Makefile
==
--- head/usr.sbin/iscsid/Makefile   Mon Aug 18 17:38:50 2014
(r270145)
+++ head/usr.sbin/iscsid/Makefile   Mon Aug 18 18:01:18 2014
(r270146)
@@ -8,7 +8,7 @@ CFLAGS+=-I${.CURDIR}/../../sys/dev/iscs
 #CFLAGS+=  -DICL_KERNEL_PROXY
 MAN=   iscsid.8
 
-DPADD= ${LIBUTIL}
+DPADD= ${LIBCRYPTO} ${LIBSSL} ${LIBUTIL}
 LDADD= -lcrypto -lssl -lutil
 
 WARNS= 6
___
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: r270147 - in head/contrib/llvm: include/llvm/Support lib/Object lib/Target/PowerPC lib/Target/PowerPC/InstPrinter lib/Target/PowerPC/MCTargetDesc

2014-08-18 Thread Roman Divacky
Author: rdivacky
Date: Mon Aug 18 18:05:55 2014
New Revision: 270147
URL: http://svnweb.freebsd.org/changeset/base/270147

Log:
  Backport r197824, r213427 and r213960 from LLVM trunk:
  
r197824 | rdivacky | 2013-12-20 19:08:54 +0100 (Fri, 20 Dec 2013) | 2 lines
  
Implement initial-exec TLS for PPC32.
  
r213427 | hfinkel | 2014-07-19 01:29:49 +0200 (Sat, 19 Jul 2014) | 7 lines
  
[PowerPC] 32-bit ELF PIC support
  
This adds initial support for PPC32 ELF PIC (Position Independent Code; the
-fPIC variety), thus rectifying a long-standing deficiency in the PowerPC
backend.
  
Patch by Justin Hibbits!
  
r213960 | hfinkel | 2014-07-25 19:47:22 +0200 (Fri, 25 Jul 2014) | 3 lines
  
[PowerPC] Support TLS on PPC32/ELF
  
Patch by Justin Hibbits!
  
  Reviewed by: jhibbits
  Approved by: dim

Modified:
  head/contrib/llvm/include/llvm/Support/ELF.h
  head/contrib/llvm/lib/Object/ELF.cpp
  head/contrib/llvm/lib/Target/PowerPC/InstPrinter/PPCInstPrinter.cpp
  head/contrib/llvm/lib/Target/PowerPC/MCTargetDesc/PPCELFObjectWriter.cpp
  head/contrib/llvm/lib/Target/PowerPC/PPC.h
  head/contrib/llvm/lib/Target/PowerPC/PPCAsmPrinter.cpp
  head/contrib/llvm/lib/Target/PowerPC/PPCFrameLowering.cpp
  head/contrib/llvm/lib/Target/PowerPC/PPCFrameLowering.h
  head/contrib/llvm/lib/Target/PowerPC/PPCISelDAGToDAG.cpp
  head/contrib/llvm/lib/Target/PowerPC/PPCISelLowering.cpp
  head/contrib/llvm/lib/Target/PowerPC/PPCISelLowering.h
  head/contrib/llvm/lib/Target/PowerPC/PPCInstr64Bit.td
  head/contrib/llvm/lib/Target/PowerPC/PPCInstrInfo.td
  head/contrib/llvm/lib/Target/PowerPC/PPCMCInstLower.cpp
  head/contrib/llvm/lib/Target/PowerPC/PPCMachineFunctionInfo.cpp
  head/contrib/llvm/lib/Target/PowerPC/PPCMachineFunctionInfo.h
  head/contrib/llvm/lib/Target/PowerPC/PPCRegisterInfo.cpp
  head/contrib/llvm/lib/Target/PowerPC/PPCSubtarget.h

Modified: head/contrib/llvm/include/llvm/Support/ELF.h
==
--- head/contrib/llvm/include/llvm/Support/ELF.hMon Aug 18 18:01:18 
2014(r270146)
+++ head/contrib/llvm/include/llvm/Support/ELF.hMon Aug 18 18:05:55 
2014(r270147)
@@ -437,6 +437,7 @@ enum {
   R_PPC_GOT16_LO  = 15,
   R_PPC_GOT16_HI  = 16,
   R_PPC_GOT16_HA  = 17,
+  R_PPC_PLTREL24  = 18,
   R_PPC_REL32 = 26,
   R_PPC_TLS   = 67,
   R_PPC_DTPMOD32  = 68,

Modified: head/contrib/llvm/lib/Object/ELF.cpp
==
--- head/contrib/llvm/lib/Object/ELF.cppMon Aug 18 18:01:18 2014
(r270146)
+++ head/contrib/llvm/lib/Object/ELF.cppMon Aug 18 18:05:55 2014
(r270147)
@@ -507,6 +507,7 @@ StringRef getELFRelocationTypeName(uint3
   LLVM_ELF_SWITCH_RELOC_TYPE_NAME(R_PPC_GOT16_LO);
   LLVM_ELF_SWITCH_RELOC_TYPE_NAME(R_PPC_GOT16_HI);
   LLVM_ELF_SWITCH_RELOC_TYPE_NAME(R_PPC_GOT16_HA);
+  LLVM_ELF_SWITCH_RELOC_TYPE_NAME(R_PPC_PLTREL24);
   LLVM_ELF_SWITCH_RELOC_TYPE_NAME(R_PPC_REL32);
   LLVM_ELF_SWITCH_RELOC_TYPE_NAME(R_PPC_TLS);
   LLVM_ELF_SWITCH_RELOC_TYPE_NAME(R_PPC_DTPMOD32);

Modified: head/contrib/llvm/lib/Target/PowerPC/InstPrinter/PPCInstPrinter.cpp
==
--- head/contrib/llvm/lib/Target/PowerPC/InstPrinter/PPCInstPrinter.cpp Mon Aug 
18 18:01:18 2014(r270146)
+++ head/contrib/llvm/lib/Target/PowerPC/InstPrinter/PPCInstPrinter.cpp Mon Aug 
18 18:05:55 2014(r270147)
@@ -18,6 +18,7 @@
 #include "llvm/MC/MCExpr.h"
 #include "llvm/MC/MCInst.h"
 #include "llvm/MC/MCInstrInfo.h"
+#include "llvm/MC/MCSymbol.h"
 #include "llvm/Support/CommandLine.h"
 #include "llvm/Support/raw_ostream.h"
 #include "llvm/Target/TargetOpcodes.h"
@@ -294,10 +295,16 @@ void PPCInstPrinter::printMemRegReg(cons
 
 void PPCInstPrinter::printTLSCall(const MCInst *MI, unsigned OpNo,
   raw_ostream &O) {
-  printBranchOperand(MI, OpNo, O);
+  // On PPC64, VariantKind is VK_None, but on PPC32, it's VK_PLT, and it must
+  // come at the _end_ of the expression.
+  const MCOperand &Op = MI->getOperand(OpNo);
+  const MCSymbolRefExpr &refExp = cast(*Op.getExpr());
+  O << refExp.getSymbol().getName();
   O << '(';
   printOperand(MI, OpNo+1, O);
   O << ')';
+  if (refExp.getKind() != MCSymbolRefExpr::VK_None)
+O << '@' << MCSymbolRefExpr::getVariantKindName(refExp.getKind());
 }
 
 

Modified: 
head/contrib/llvm/lib/Target/PowerPC/MCTargetDesc/PPCELFObjectWriter.cpp
==
--- head/contrib/llvm/lib/Target/PowerPC/MCTargetDesc/PPCELFObjectWriter.cpp
Mon Aug 18 18:01:18 2014(r270146)
+++ head/contrib/llvm/lib/Target/PowerPC/MCTargetDesc/PPCELFObjectWriter.cpp
Mon Aug 18 18:05:55 2014(r270147)
@@

svn commit: r270148 - head/contrib/llvm/patches

2014-08-18 Thread Roman Divacky
Author: rdivacky
Date: Mon Aug 18 18:07:28 2014
New Revision: 270148
URL: http://svnweb.freebsd.org/changeset/base/270148

Log:
  Add the patch commited in r270147.

Added:
  head/contrib/llvm/patches/patch-r270147-llvm-r197824-r213427-r213960.diff

Added: head/contrib/llvm/patches/patch-r270147-llvm-r197824-r213427-r213960.diff
==
--- /dev/null   00:00:00 1970   (empty, because file is newly added)
+++ head/contrib/llvm/patches/patch-r270147-llvm-r197824-r213427-r213960.diff   
Mon Aug 18 18:07:28 2014(r270148)
@@ -0,0 +1,1303 @@
+Index: contrib/llvm/include/llvm/Support/ELF.h
+===
+--- contrib/llvm/include/llvm/Support/ELF.h(revision 270019)
 contrib/llvm/include/llvm/Support/ELF.h(working copy)
+@@ -437,6 +437,7 @@
+   R_PPC_GOT16_LO  = 15,
+   R_PPC_GOT16_HI  = 16,
+   R_PPC_GOT16_HA  = 17,
++  R_PPC_PLTREL24  = 18,
+   R_PPC_REL32 = 26,
+   R_PPC_TLS   = 67,
+   R_PPC_DTPMOD32  = 68,
+Index: contrib/llvm/lib/Object/ELF.cpp
+===
+--- contrib/llvm/lib/Object/ELF.cpp(revision 270019)
 contrib/llvm/lib/Object/ELF.cpp(working copy)
+@@ -507,6 +507,7 @@
+   LLVM_ELF_SWITCH_RELOC_TYPE_NAME(R_PPC_GOT16_LO);
+   LLVM_ELF_SWITCH_RELOC_TYPE_NAME(R_PPC_GOT16_HI);
+   LLVM_ELF_SWITCH_RELOC_TYPE_NAME(R_PPC_GOT16_HA);
++  LLVM_ELF_SWITCH_RELOC_TYPE_NAME(R_PPC_PLTREL24);
+   LLVM_ELF_SWITCH_RELOC_TYPE_NAME(R_PPC_REL32);
+   LLVM_ELF_SWITCH_RELOC_TYPE_NAME(R_PPC_TLS);
+   LLVM_ELF_SWITCH_RELOC_TYPE_NAME(R_PPC_DTPMOD32);
+Index: contrib/llvm/lib/Target/PowerPC/InstPrinter/PPCInstPrinter.cpp
+===
+--- contrib/llvm/lib/Target/PowerPC/InstPrinter/PPCInstPrinter.cpp 
(revision 270019)
 contrib/llvm/lib/Target/PowerPC/InstPrinter/PPCInstPrinter.cpp 
(working copy)
+@@ -18,6 +18,7 @@
+ #include "llvm/MC/MCExpr.h"
+ #include "llvm/MC/MCInst.h"
+ #include "llvm/MC/MCInstrInfo.h"
++#include "llvm/MC/MCSymbol.h"
+ #include "llvm/Support/CommandLine.h"
+ #include "llvm/Support/raw_ostream.h"
+ #include "llvm/Target/TargetOpcodes.h"
+@@ -294,10 +295,16 @@
+ 
+ void PPCInstPrinter::printTLSCall(const MCInst *MI, unsigned OpNo,
+   raw_ostream &O) {
+-  printBranchOperand(MI, OpNo, O);
++  // On PPC64, VariantKind is VK_None, but on PPC32, it's VK_PLT, and it must
++  // come at the _end_ of the expression.
++  const MCOperand &Op = MI->getOperand(OpNo);
++  const MCSymbolRefExpr &refExp = cast(*Op.getExpr());
++  O << refExp.getSymbol().getName();
+   O << '(';
+   printOperand(MI, OpNo+1, O);
+   O << ')';
++  if (refExp.getKind() != MCSymbolRefExpr::VK_None)
++O << '@' << MCSymbolRefExpr::getVariantKindName(refExp.getKind());
+ }
+ 
+ 
+Index: contrib/llvm/lib/Target/PowerPC/MCTargetDesc/PPCELFObjectWriter.cpp
+===
+--- contrib/llvm/lib/Target/PowerPC/MCTargetDesc/PPCELFObjectWriter.cpp
(revision 270019)
 contrib/llvm/lib/Target/PowerPC/MCTargetDesc/PPCELFObjectWriter.cpp
(working copy)
+@@ -64,7 +64,15 @@
+   llvm_unreachable("Unimplemented");
+ case PPC::fixup_ppc_br24:
+ case PPC::fixup_ppc_br24abs:
+-  Type = ELF::R_PPC_REL24;
++  switch (Modifier) {
++  default: llvm_unreachable("Unsupported Modifier");
++  case MCSymbolRefExpr::VK_None:
++Type = ELF::R_PPC_REL24;
++break;
++  case MCSymbolRefExpr::VK_PLT:
++Type = ELF::R_PPC_PLTREL24;
++break;
++  }
+   break;
+ case PPC::fixup_ppc_brcond14:
+ case PPC::fixup_ppc_brcond14abs:
+@@ -205,7 +213,10 @@
+ Type = ELF::R_PPC64_DTPREL16_HIGHESTA;
+ break;
+   case MCSymbolRefExpr::VK_PPC_GOT_TLSGD:
+-Type = ELF::R_PPC64_GOT_TLSGD16;
++if (is64Bit())
++  Type = ELF::R_PPC64_GOT_TLSGD16;
++else
++  Type = ELF::R_PPC_GOT_TLSGD16;
+ break;
+   case MCSymbolRefExpr::VK_PPC_GOT_TLSGD_LO:
+ Type = ELF::R_PPC64_GOT_TLSGD16_LO;
+@@ -217,7 +228,10 @@
+ Type = ELF::R_PPC64_GOT_TLSGD16_HA;
+ break;
+   case MCSymbolRefExpr::VK_PPC_GOT_TLSLD:
+-Type = ELF::R_PPC64_GOT_TLSLD16;
++if (is64Bit())
++  Type = ELF::R_PPC64_GOT_TLSLD16;
++else
++  Type = ELF::R_PPC_GOT_TLSLD16;
+ break;
+   case MCSymbolRefExpr::VK_PPC_GOT_TLSLD_LO:
+ Type = ELF::R_PPC64_GOT_TLSLD16_LO;
+@@ -313,13 +327,22 @@
+   switch (Modifier) {
+   default: llvm_unreachable("Unsupported Modifier");
+   case MCSymbolRefExpr::VK_PPC_TLSGD:
+-Type = ELF::R_PPC64_TLSGD;
++if (is64Bit())
++  Type = ELF::R_PPC64_TLSGD;
++   

svn commit: r270149 - head/sys/geom

2014-08-18 Thread Scott Long
Author: scottl
Date: Mon Aug 18 19:27:47 2014
New Revision: 270149
URL: http://svnweb.freebsd.org/changeset/base/270149

Log:
  Deal explicitly with possible failures of make_dev_alias_p() in GEOM.
  
  Submitted by:   Mariusz Zaborski 
  MFC after:  3 days

Modified:
  head/sys/geom/geom_dev.c

Modified: head/sys/geom/geom_dev.c
==
--- head/sys/geom/geom_dev.cMon Aug 18 18:07:28 2014(r270148)
+++ head/sys/geom/geom_dev.cMon Aug 18 19:27:47 2014(r270149)
@@ -251,9 +251,10 @@ g_dev_taste(struct g_class *mp, struct g
snprintf(buf, sizeof(buf), "%s%s",
val, gp->name + len);
freeenv(val);
-   make_dev_alias_p(MAKEDEV_CHECKNAME | MAKEDEV_WAITOK,
-   &adev, dev, "%s", buf);
-   adev->si_flags |= SI_UNMAPPED;
+   if ((make_dev_alias_p(MAKEDEV_CHECKNAME|MAKEDEV_WAITOK,
+   &adev, dev, "%s", buf)) != 0)
+   printf("Warning: unable to create device "
+   "alias %s\n", buf);
break;
}
}
@@ -263,6 +264,7 @@ g_dev_taste(struct g_class *mp, struct g
if (adev != NULL) {
adev->si_iosize_max = MAXPHYS;
adev->si_drv2 = cp;
+   adev->si_flags |= SI_UNMAPPED;
}
 
g_dev_attrchanged(cp, "GEOM::physpath");
___
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: r270149 - head/sys/geom

2014-08-18 Thread Sergey Kandaurov
On 18 August 2014 23:27, Scott Long  wrote:
> Author: scottl
> Date: Mon Aug 18 19:27:47 2014
> New Revision: 270149
> URL: http://svnweb.freebsd.org/changeset/base/270149
>
> Log:
>   Deal explicitly with possible failures of make_dev_alias_p() in GEOM.
>
>   Submitted by:   Mariusz Zaborski 
>   MFC after:  3 days
>
> Modified:
>   head/sys/geom/geom_dev.c
>
> Modified: head/sys/geom/geom_dev.c
> ==
> --- head/sys/geom/geom_dev.cMon Aug 18 18:07:28 2014(r270148)
> +++ head/sys/geom/geom_dev.cMon Aug 18 19:27:47 2014(r270149)
[...]
> @@ -263,6 +264,7 @@ g_dev_taste(struct g_class *mp, struct g
> if (adev != NULL) {
> adev->si_iosize_max = MAXPHYS;
> adev->si_drv2 = cp;
> +   adev->si_flags |= SI_UNMAPPED;
> }
>
> g_dev_attrchanged(cp, "GEOM::physpath");
>

This part looks unrelated.

-- 
wbr,
pluknet
___
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: r270149 - head/sys/geom

2014-08-18 Thread Alexander Kabaev
On Mon, 18 Aug 2014 23:51:32 +0400
Sergey Kandaurov  wrote:

> On 18 August 2014 23:27, Scott Long  wrote:
> > Author: scottl
> > Date: Mon Aug 18 19:27:47 2014
> > New Revision: 270149
> > URL: http://svnweb.freebsd.org/changeset/base/270149
> >
> > Log:
> >   Deal explicitly with possible failures of make_dev_alias_p() in
> > GEOM.
> >
> >   Submitted by:   Mariusz Zaborski 
> >   MFC after:  3 days
> >
> > Modified:
> >   head/sys/geom/geom_dev.c
> >
> > Modified: head/sys/geom/geom_dev.c
> > ==
> > --- head/sys/geom/geom_dev.cMon Aug 18 18:07:28 2014
> > (r270148) +++ head/sys/geom/geom_dev.cMon Aug 18 19:27:47
> > 2014(r270149)
> [...]
> > @@ -263,6 +264,7 @@ g_dev_taste(struct g_class *mp, struct g
> > if (adev != NULL) {
> > adev->si_iosize_max = MAXPHYS;
> > adev->si_drv2 = cp;
> > +   adev->si_flags |= SI_UNMAPPED;
> > }
> >
> > g_dev_attrchanged(cp, "GEOM::physpath");
> >
> 
> This part looks unrelated.
> 

Commit says that it deals with consequences of make_dev_alias_p
failing. Preventing trap happening on said failure seems to be
pretty much related to the stated goal.

-- 
Alexander Kabaev


signature.asc
Description: PGP signature


svn commit: r270151 - head/sys/amd64/amd64

2014-08-18 Thread Alan Cox
Author: alc
Date: Mon Aug 18 20:28:08 2014
New Revision: 270151
URL: http://svnweb.freebsd.org/changeset/base/270151

Log:
  There exists a possible sequence of page table page allocation failures
  starting with a superpage demotion by pmap_enter() that could result in
  a PV list lock being held when pmap_enter() is just about to return
  KERN_RESOURCE_SHORTAGE.  Consequently, the KASSERT that no PV list locks
  are held needs to be replaced with a conditional unlock.
  
  Discussed with:   kib
  X-MFC with:   r269728
  Sponsored by: EMC / Isilon Storage Division

Modified:
  head/sys/amd64/amd64/pmap.c

Modified: head/sys/amd64/amd64/pmap.c
==
--- head/sys/amd64/amd64/pmap.c Mon Aug 18 20:21:12 2014(r270150)
+++ head/sys/amd64/amd64/pmap.c Mon Aug 18 20:28:08 2014(r270151)
@@ -4201,9 +4201,10 @@ retry:
mpte = _pmap_allocpte(pmap, pmap_pde_pindex(va),
nosleep ? NULL : &lock);
if (mpte == NULL && nosleep) {
-   KASSERT(lock == NULL, ("lock leaked for nosleep"));
-   PMAP_UNLOCK(pmap);
+   if (lock != NULL)
+   rw_wunlock(lock);
rw_runlock(&pvh_global_lock);
+   PMAP_UNLOCK(pmap);
return (KERN_RESOURCE_SHORTAGE);
}
goto retry;
___
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: r270152 - head/tools/tools/vt/keymaps

2014-08-18 Thread Stefan Esser
Author: se
Date: Mon Aug 18 20:55:11 2014
New Revision: 270152
URL: http://svnweb.freebsd.org/changeset/base/270152

Log:
  Minor fixes to convert-keymap.pl (conversion of 8bit characters in the form
  'x' with high bit set) and to KBDFILES.map (fix encodings and comment out a
  few redundant keymap files).
  
  MFC after:3 days

Modified:
  head/tools/tools/vt/keymaps/KBDFILES.map
  head/tools/tools/vt/keymaps/convert-keymap.pl

Modified: head/tools/tools/vt/keymaps/KBDFILES.map
==
--- head/tools/tools/vt/keymaps/KBDFILES.mapMon Aug 18 20:28:08 2014
(r270151)
+++ head/tools/tools/vt/keymaps/KBDFILES.mapMon Aug 18 20:55:11 2014
(r270152)
@@ -6,13 +6,13 @@ ISO8859-15be.iso.acc.kbd  be.acc.kbd
 ISO8859-5  bg.bds.ctrlcaps.kbd bg.bds.kbd
 ISO8859-5  bg.phonetic.ctrlcaps.kbdbg.bds.ctrlcaps.kbd
 
-ISO8859-1  br275.iso.kbd   br.kbd
-ISO8859-1  br275.iso.acc.kbd   br.acc.kbd
-CP850  br275.cp850.kbd br.kbd.from-cp850
-
-CP1131 by.cp1131.kbd   by.kbd.from-cp1131
-CP1251 by.cp1251.kbd   by.kbd.from-cp1251
-ISO8859-5  by.iso5.kbd by.kbd.from-iso5
+#ISO8859-1 br275.iso.kbd   br.kbd.from-iso1(only 
AltGr-Shift-6 differs from CP850)
+ISO8859-1  br275.iso.acc.kbd   br.kbd
+CP850  br275.cp850.kbd br.noacc.kbd
+
+#CP1131by.cp1131.kbd   by.kbd.from-cp1131  
(Shift-3 not OK)
+#CP1251by.cp1251.kbd   by.kbd.from-cp1251  
(result identical to CP1251)
+ISO8859-5  by.iso5.kbd by.kbd
 
 ISO8859-2  ce.iso2.kbd centraleuropean.kbd
 
@@ -119,11 +119,11 @@ ISO8859-1 swissgerman.macbook.acc.kbd ch
 
 ISO8859-9  tr.iso9.q.kbd   tr.kbd
 
-ISO8859-1  uk.iso.kbd  uk.kbd
-ISO8859-1  uk.iso-ctrl.kbd uk.capsctrl.kbd
-CP850  uk.cp850.kbduk.kbd.from-cp850
-CP850  uk.cp850-ctrl.kbd   uk.capsctrl.kbd.from-cp850
-ISO8859-1  uk.dvorak.kbd   uk.dvorak.kbd
+ISO8859-15 uk.iso.kbd  uk.kbd
+ISO8859-15 uk.iso-ctrl.kbd uk.capsctrl.kbd
+#CP850 uk.cp850.kbduk.kbd.from-cp850   
(no � and different Alt/Alt-Shift encodings)
+#CP850 uk.cp850-ctrl.kbd   uk.capsctrl.kbd.from-cp850  
(no � and different Alt/Alt-Shift encodings)
+ISO8859-15 uk.dvorak.kbd   uk.dvorak.kbd
 
 ISO8859-1  us.iso.kbd  us.kbd
 ISO8859-1  us.iso.acc.kbd  us.acc.kbd

Modified: head/tools/tools/vt/keymaps/convert-keymap.pl
==
--- head/tools/tools/vt/keymaps/convert-keymap.pl   Mon Aug 18 20:28:08 
2014(r270151)
+++ head/tools/tools/vt/keymaps/convert-keymap.pl   Mon Aug 18 20:55:11 
2014(r270152)
@@ -46,7 +46,7 @@ sub convert_token
 if $C =~ m/^(\d+)$/;# decimal number
 return local_to_UCS_code(chr(hex($1)))
 if $C =~ m/^0x([0-9a-f]+)$/i;   # hex number
-return local_to_UCS_code($1)
+return local_to_UCS_code(chr(ord($1)))
 if $C =~ m/^'(.)'$/;# character
 return "";# uncovered case
 }
___
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: r270153 - head/share/syscons/keymaps

2014-08-18 Thread Stefan Esser
Author: se
Date: Mon Aug 18 20:58:17 2014
New Revision: 270153
URL: http://svnweb.freebsd.org/changeset/base/270153

Log:
  Fix minor problems found while converting to NEWCONS format.
  
  MFC after:3 days

Modified:
  head/share/syscons/keymaps/be.iso.acc.kbd
  head/share/syscons/keymaps/cs.latin2.qwertz.kbd
  head/share/syscons/keymaps/uk.iso-ctrl.kbd
  head/share/syscons/keymaps/uk.iso.kbd

Modified: head/share/syscons/keymaps/be.iso.acc.kbd
==
--- head/share/syscons/keymaps/be.iso.acc.kbd   Mon Aug 18 20:55:11 2014
(r270152)
+++ head/share/syscons/keymaps/be.iso.acc.kbd   Mon Aug 18 20:58:17 2014
(r270153)
@@ -42,7 +42,7 @@
   036   'j''J'nl nl 'j''J'nl nl  C
   037   'k''K'vt vt 'k''K'vt vt  C
   038   'l''L'ff ff 'l''L'ff ff  C
-  039   'm''M'cr cr 'm''M'cr cr  O
+  039   'm''M'cr cr 'm''M'cr cr  C
   040   249'%'nopnopdacu   dacu   nopnop O
   041   178179nopnop178179nopnop O
   042   lshift lshift lshift lshift lshift lshift lshift lshift  O
@@ -53,7 +53,7 @@
   047   'v''V'synsyn'v''V'synsyn C
   048   'b''B'stxstx'b''B'stxstx C
   049   'n''N'so so 'n''N'so so  C
-  050   ',''?'nopnop',''?'nopnop C
+  050   ',''?'nopnop',''?'nopnop O
   051   ';''.'nopnop';''.'nopnop O
   052   ':''/'nopnop':''/'nopnop O
   053   '=''+'nopnopdtil   dtil   nopnop O

Modified: head/share/syscons/keymaps/cs.latin2.qwertz.kbd
==
--- head/share/syscons/keymaps/cs.latin2.qwertz.kbd Mon Aug 18 20:55:11 
2014(r270152)
+++ head/share/syscons/keymaps/cs.latin2.qwertz.kbd Mon Aug 18 20:58:17 
2014(r270153)
@@ -1,5 +1,5 @@
 # Czech Standard Typewriter QWERTZ Keyboard
-# by Rudolf Cejka 
+# by Rudolf Cejka 
 #
 # $FreeBSD$
 #

Modified: head/share/syscons/keymaps/uk.iso-ctrl.kbd
==
--- head/share/syscons/keymaps/uk.iso-ctrl.kbd  Mon Aug 18 20:55:11 2014
(r270152)
+++ head/share/syscons/keymaps/uk.iso-ctrl.kbd  Mon Aug 18 20:58:17 2014
(r270153)
@@ -46,7 +46,7 @@
   040   ''''@'nulnul''''@'nulnul O
   041   '`'172nopnop'|''|'nopnop O
   042   lshift lshift lshift lshift lshift lshift lshift lshift  O
-  043   '#''~'nopnop'~''~'nopnop O
+  043   '#''~'nopnop'#''~'nopnop O
   044   'z''Z'subsub'z''Z'subsub C
   045   'x''X'cancan'x''X'cancan C
   046   'c''C'etxetx'c''C'etxetx C

Modified: head/share/syscons/keymaps/uk.iso.kbd
==
--- head/share/syscons/keymaps/uk.iso.kbd   Mon Aug 18 20:55:11 2014
(r270152)
+++ head/share/syscons/keymaps/uk.iso.kbd   Mon Aug 18 20:58:17 2014
(r270153)
@@ -46,7 +46,7 @@
   040   ''''@'nulnul''''@'nulnul O
   041   '`'172nopnop'|''|'nopnop O
   042   lshift lshift lshift lshift lshift lshift lshift lshift  O
-  043   '#''~'nopnop'~''~'nopnop O
+  043   '#''~'nopnop'#''~'nopnop O
   044   'z''Z'subsub'z''Z'subsub C
   045   'x''X'cancan'x''X'cancan C
   046   'c''C'etxetx'c''C'etxetx 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: r270155 - head

2014-08-18 Thread Warner Losh
Author: imp
Date: Mon Aug 18 21:04:44 2014
New Revision: 270155
URL: http://svnweb.freebsd.org/changeset/base/270155

Log:
  Create the native-xtools target. This target creates only the cross
  building toolchain for the host computer. This toolchain produces
  TARGET_ARCH and assumes the rest of the system contains libraries for
  the target. It is intended to be used in a "qemu-user jail" where all
  the binaries would otherwise be the target architecture's to build
  ports. However, emulation of the compilers is too slow, so we build
  native binaries for that. Rather than use the xdev produced binaries,
  with all their weird links and paths, these binaries use the native
  paths. They will not work unless installed into the qemu-user jail.
  
  Differential Revision: https://phabric.freebsd.org/D518
  Reviewed by: sbruno@

Modified:
  head/Makefile
  head/Makefile.inc1

Modified: head/Makefile
==
--- head/Makefile   Mon Aug 18 21:04:35 2014(r270154)
+++ head/Makefile   Mon Aug 18 21:04:44 2014(r270155)
@@ -37,6 +37,8 @@
 # xdev-build  - Build cross-development tools.
 # xdev-install- Install cross-development tools.
 # xdev-links  - Create traditional links in /usr/bin for cc, etc
+# native-xtools   - Create host binaries that produce target objects
+#   for use in qemu user-mode jails.
 # 
 # "quick" way to test all kernel builds:
 #  _jflag=`sysctl -n hw.ncpu`
@@ -111,7 +113,7 @@ TGTS=   all all-man buildenv buildenvvars 
_worldtmp _legacy _bootstrap-tools _cleanobj _obj \
_build-tools _cross-tools _includes _libraries _depend \
build32 builddtb distribute32 install32 xdev xdev-build xdev-install \
-   xdev-links \
+   xdev-links native-xtools \
 
 TGTS+= ${SUBDIR_TARGETS}
 

Modified: head/Makefile.inc1
==
--- head/Makefile.inc1  Mon Aug 18 21:04:35 2014(r270154)
+++ head/Makefile.inc1  Mon Aug 18 21:04:44 2014(r270155)
@@ -1243,7 +1243,7 @@ _awk= usr.bin/awk
 _gensnmptree=  usr.sbin/bsnmpd/gensnmptree
 .endif
 
-# We need to build tlbgen when we're building clang either as
+# We need to build tblgen when we're building clang either as
 # the bootstrap compiler, or as the part of the normal build.
 .if ${MK_CLANG_BOOTSTRAP} != "no" || ${MK_CLANG} != "no"
 _clang_tblgen= \
@@ -1418,6 +1418,48 @@ cross-tools: .MAKE
${MAKE} DIRPRFX=${_tool}/ DESTDIR=${MAKEOBJDIRPREFIX} install
 .endfor
 
+NXBENV=MAKEOBJDIRPREFIX=${OBJTREE}/nxb \
+   INSTALL="sh ${.CURDIR}/tools/install.sh" \
+   VERSION="${VERSION}"
+NXBMAKE=   ${NXBENV} ${MAKE} \
+   TBLGEN=${OBJTREE}/nxb-bin/usr/bin/tblgen \
+   CLANG_TBLGEN=${OBJTREE}/nxb-bin/usr/bin/clang-tblgen \
+   MACHINE=${TARGET} MACHINE_ARCH=${TARGET_ARCH} \
+   MK_GDB=no MK_TESTS=no \
+   SSP_CFLAGS= MK_PIE=no \
+   MK_HTML=no MK_INFO=no NO_LINT=yes MK_MAN=no \
+   -DNO_PIC MK_PROFILE=no -DNO_SHARED \
+   -DNO_CPU_CFLAGS MK_WARNS=no MK_CTF=no \
+   MK_CLANG_FULL=no MK_LLDB=no
+
+native-xtools: .MAKE
+   mkdir -p ${OBJTREE}/nxb-bin/usr
+   mtree -deU -f ${.CURDIR}/etc/mtree/BSD.usr.dist \
+   -p ${OBJTREE}/nxb-bin/usr >/dev/null
+   mtree -deU -f ${.CURDIR}/etc/mtree/BSD.include.dist \
+   -p ${OBJTREE}/nxb-bin/usr/include >/dev/null
+.for _tool in \
+${_clang_tblgen} \
+usr.bin/ar \
+${_binutils} \
+${_cc} \
+${_gcc_tools} \
+${_clang_libs} \
+${_clang} \
+usr.bin/awk \
+usr.bin/bmake \
+usr.bin/lex \
+usr.bin/lorder \
+usr.bin/sed \
+usr.bin/yacc
+   ${_+_}@${ECHODIR} "===> ${_tool} (obj,depend,all,install)"; \
+   cd ${.CURDIR}/${_tool} && \
+   ${NXBMAKE} DIRPRFX=${_tool}/ obj && \
+   ${NXBMAKE} DIRPRFX=${_tool}/ depend && \
+   ${NXBMAKE} DIRPRFX=${_tool}/ all && \
+   ${NXBMAKE} DIRPRFX=${_tool}/ DESTDIR=${OBJTREE}/nxb-bin install
+.endfor
+
 #
 # hierarchy - ensure that all the needed directories are present
 #
___
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: r270154 - head/sys/arm/at91

2014-08-18 Thread Warner Losh
Author: imp
Date: Mon Aug 18 21:04:35 2014
New Revision: 270154
URL: http://svnweb.freebsd.org/changeset/base/270154

Log:
  Make note about reset vs RTOE actions...

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

Modified: head/sys/arm/at91/at91_mci.c
==
--- head/sys/arm/at91/at91_mci.cMon Aug 18 20:58:17 2014
(r270153)
+++ head/sys/arm/at91/at91_mci.cMon Aug 18 21:04:35 2014
(r270154)
@@ -1214,6 +1214,7 @@ at91_mci_intr(void *arg)
sr, MCI_SR_BITSTRING, cmd->opcode,
(cmd->opcode != 12) ? "" :
(sc->flags & CMD_MULTIREAD) ? " after read" : " 
after write");
+   /* XXX not sure RTOE needs a full reset, just a retry */
at91_mci_reset(sc);
}
at91_mci_next_operation(sc);
___
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: r270156 - head/share/vt/keymaps

2014-08-18 Thread Stefan Esser
Author: se
Date: Mon Aug 18 21:07:12 2014
New Revision: 270156
URL: http://svnweb.freebsd.org/changeset/base/270156

Log:
  Fix a few conversion problems (e.g. when a keymap is derived from ISO8859-1,
  but shall provide an Euro sign - similar for Japanese Yen).
  
  The Brazilian keymap "br.kbd" now has accents, by default - the no-accents
  version has been renamed to "br.noacc.kbd".
  
  MFC after:3 days

Added:
  head/share/vt/keymaps/br.noacc.kbd   (contents, props changed)
 - copied, changed from r270082, head/share/syscons/keymaps/br275.cp850.kbd
  head/share/vt/keymaps/by.kbd   (contents, props changed)
 - copied, changed from r270082, head/share/syscons/keymaps/by.cp1251.kbd
Replaced:
  head/share/vt/keymaps/br.kbd
 - copied, changed from r270149, head/share/vt/keymaps/br.acc.kbd
Deleted:
  head/share/vt/keymaps/br.acc.kbd
Modified:
  head/share/vt/keymaps/INDEX.keymaps
  head/share/vt/keymaps/Makefile
  head/share/vt/keymaps/ch.acc.kbd
  head/share/vt/keymaps/ch.kbd
  head/share/vt/keymaps/cz.kbd
  head/share/vt/keymaps/hr.kbd
  head/share/vt/keymaps/jp.capsctrl.kbd
  head/share/vt/keymaps/jp.kbd
  head/share/vt/keymaps/si.kbd
  head/share/vt/keymaps/uk.capsctrl.kbd

Modified: head/share/vt/keymaps/INDEX.keymaps
==
--- head/share/vt/keymaps/INDEX.keymaps Mon Aug 18 21:04:44 2014
(r270155)
+++ head/share/vt/keymaps/INDEX.keymaps Mon Aug 18 21:07:12 2014
(r270156)
@@ -56,35 +56,21 @@ bg.bds.kbd:de:Bulgarisch (BDS)
 bg.bds.ctrlcaps.kbd:en:Bulgarian (Phonetic)
 bg.bds.ctrlcaps.kbd:de:Bulgarisch (phonetisch)
 
-br.kbd:en:Brazilian
-br.kbd:de:Brasilianisch
-br.kbd:fr:Brésilien
-br.kbd:pt:Brasileiro
-br.kbd:es:Brasileño
-
-br.acc.kbd:en:Brazilian (accent keys)
-br.acc.kbd:de:Brasilianisch (mit Akzenten)
-br.acc.kbd:fr:Brésilien (avec accents)
-br.acc.kbd:pt:Brasileiro (com acentos)
-br.acc.kbd:es:Brasileño (con acentos)
-
-br.kbd.from-cp850:en:Brazilian
-br.kbd.from-cp850:de:Brasilianisch
-br.kbd.from-cp850:fr:Brésilien
-br.kbd.from-cp850:pt:Brasileiro
-br.kbd.from-cp850:es:Brasileño
-
-by.kbd.from-cp1131:en:Belarusian
-by.kbd.from-cp1131:de:Weißrussisch
-by.kbd.from-cp1131:fr:Biélorusse
-
-by.kbd.from-cp1251:en:Belarusian
-by.kbd.from-cp1251:de:Weißrussisch
-by.kbd.from-cp1251:fr:Biélorusse
-
-by.kbd.from-iso5:en:Belarusian
-by.kbd.from-iso5:de:Weißrussisch
-by.kbd.from-iso5:fr:Biélorusse
+br.kbd:en:Brazilian (accent keys)
+br.kbd:de:Brasilianisch (mit Akzenten)
+br.kbd:fr:Brésilien (avec accents)
+br.kbd:pt:Brasileiro (com acentos)
+br.kbd:es:Brasileño (con acentos)
+
+br.noacc.kbd:en:Brazilian (without accent keys)
+br.noacc.kbd:de:Brasilianisch (ohne Akzente)
+br.noacc.kbd:fr:Brésilien (sans accents)
+br.noacc.kbd:pt:Brasileiro (without accent keys)
+br.noacc.kbd:es:Brasileño (without accent keys)
+
+by.kbd:en:Belarusian
+by.kbd:de:Weißrussisch
+by.kbd:fr:Biélorusse
 
 centraleuropean.kbd:en:Central European
 centraleuropean.kbd:de:Zentral Europäisch

Modified: head/share/vt/keymaps/Makefile
==
--- head/share/vt/keymaps/Makefile  Mon Aug 18 21:04:44 2014
(r270155)
+++ head/share/vt/keymaps/Makefile  Mon Aug 18 21:07:12 2014
(r270156)
@@ -4,7 +4,6 @@ FILES=  INDEX.keymaps \
am.kbd \
bg.bds.ctrlcaps.kbd \
bg.bds.kbd \
-   br.acc.kbd \
br.kbd \
ca.kbd \
ca-fr.kbd \

Copied and modified: head/share/vt/keymaps/br.kbd (from r270149, 
head/share/vt/keymaps/br.acc.kbd)
==
--- head/share/vt/keymaps/br.acc.kbdMon Aug 18 19:27:47 2014
(r270149, copy source)
+++ head/share/vt/keymaps/br.kbdMon Aug 18 21:07:12 2014
(r270156)
@@ -149,7 +149,3 @@
   duml 0xa8( 'a'0xe4) ( 'A'0xc4) ( 'e'0xeb) ( 'E'  
  0xcb)
( 'i'0xef) ( 'I'0xcf) ( 'o'0xf6) ( 'O'  
  0xd6)
( 'u'0xfc) ( 'U'0xdc) ( 'y'0xff)
-
-  drin 0xb0( 'a'0xe5) ( 'A'0xc5)
-
-  dced 0xb8( 'c'0xe7) ( 'C'0xc7)

Copied and modified: head/share/vt/keymaps/br.noacc.kbd (from r270082, 
head/share/syscons/keymaps/br275.cp850.kbd)
==
--- head/share/syscons/keymaps/br275.cp850.kbd  Sun Aug 17 03:01:56 2014
(r270082, copy source)
+++ head/share/vt/keymaps/br.noacc.kbd  Mon Aug 18 21:07:12 2014
(r270156)
@@ -5,18 +5,18 @@
 # --
   000   nopnopnopnopnopnopnopnop O
   001   escescescescescescdebug  esc O
-  002   '1''!'nopnop251'!'nopnop O
-  003   '2''@'nulnul253'@'nulnul O
-  004   '3''#

Re: svn commit: r270149 - head/sys/geom

2014-08-18 Thread Sergey Kandaurov
On 19 August 2014 00:05, Alexander Kabaev  wrote:
> On Mon, 18 Aug 2014 23:51:32 +0400
> Sergey Kandaurov  wrote:
>
>> On 18 August 2014 23:27, Scott Long  wrote:
>> > Author: scottl
>> > Date: Mon Aug 18 19:27:47 2014
>> > New Revision: 270149
>> > URL: http://svnweb.freebsd.org/changeset/base/270149
>> >
>> > Log:
>> >   Deal explicitly with possible failures of make_dev_alias_p() in
>> > GEOM.
>> >
>> >   Submitted by:   Mariusz Zaborski 
>> >   MFC after:  3 days
>> >
>> > Modified:
>> >   head/sys/geom/geom_dev.c
>> >
>> > Modified: head/sys/geom/geom_dev.c
>> > ==
>> > --- head/sys/geom/geom_dev.cMon Aug 18 18:07:28 2014
>> > (r270148) +++ head/sys/geom/geom_dev.cMon Aug 18 19:27:47
>> > 2014(r270149)
>> [...]
>> > @@ -263,6 +264,7 @@ g_dev_taste(struct g_class *mp, struct g
>> > if (adev != NULL) {
>> > adev->si_iosize_max = MAXPHYS;
>> > adev->si_drv2 = cp;
>> > +   adev->si_flags |= SI_UNMAPPED;
>> > }
>> >
>> > g_dev_attrchanged(cp, "GEOM::physpath");
>> >
>>
>> This part looks unrelated.
>>
>
> Commit says that it deals with consequences of make_dev_alias_p
> failing. Preventing trap happening on said failure seems to be
> pretty much related to the stated goal.

I missed setting SI_UNMAPPED was already there, nevermind.

-- 
wbr,
pluknet
___
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: r270158 - in head/sys: kern sys

2014-08-18 Thread Marcel Moolenaar
Author: marcel
Date: Mon Aug 18 23:45:40 2014
New Revision: 270158
URL: http://svnweb.freebsd.org/changeset/base/270158

Log:
  For vendors like Juniper, extensibility for sockets is important.  A
  good example is socket options that aren't necessarily generic.  To
  this end, OSD is added to the socket structure and hooks are defined
  for key operations on sockets.  These are:
  o   soalloc() and sodealloc()
  o   Get and set socket options
  o   Socket related kevent filters.
  
  One aspect about hhook that appears to be not fully baked is the return
  semantics (the return value from the hook is ignored in hhook_run_hooks()
  at the time of commit).  To support return values, the socket_hhook_data
  structure contains a 'status' field to hold return values.
  
  Submitted by: Anuranjan Shukla 
  Obtained from:Juniper Networks, Inc.

Modified:
  head/sys/kern/uipc_socket.c
  head/sys/sys/hhook.h
  head/sys/sys/khelp.h
  head/sys/sys/socketvar.h

Modified: head/sys/kern/uipc_socket.c
==
--- head/sys/kern/uipc_socket.c Mon Aug 18 22:53:48 2014(r270157)
+++ head/sys/kern/uipc_socket.c Mon Aug 18 23:45:40 2014(r270158)
@@ -118,7 +118,9 @@ __FBSDID("$FreeBSD$");
 #include 
 #include 
 #include   /* for struct knote */
+#include 
 #include 
+#include 
 #include 
 #include 
 #include 
@@ -157,6 +159,7 @@ static int  filt_soread(struct knote *kn,
 static voidfilt_sowdetach(struct knote *kn);
 static int filt_sowrite(struct knote *kn, long hint);
 static int filt_solisten(struct knote *kn, long hint);
+static int inline hhook_run_socket(struct socket *so, void *hctx, int32_t 
h_id);
 
 static struct filterops solisten_filtops = {
.f_isfd = 1,
@@ -183,6 +186,9 @@ MALLOC_DEFINE(M_PCB, "pcb", "protocol co
VNET_ASSERT(curvnet != NULL,\
("%s:%d curvnet is NULL, so=%p", __func__, __LINE__, (so)));
 
+VNET_DEFINE(struct hhook_head *, socket_hhh[HHOOK_SOCKET_LAST + 1]);
+#defineV_socket_hhhVNET(socket_hhh)
+
 /*
  * Limit on the number of connections in the listen queue waiting
  * for accept(2).
@@ -255,8 +261,19 @@ socket_zone_change(void *tag)
 }
 
 static void
+socket_hhook_register(int subtype)
+{
+   
+   if (hhook_head_register(HHOOK_TYPE_SOCKET, subtype,
+   &V_socket_hhh[subtype],
+   HHOOK_NOWAIT|HHOOK_HEADISINVNET) != 0)
+   printf("%s: WARNING: unable to register hook\n", __func__);
+}
+
+static void
 socket_init(void *tag)
 {
+   int i;
 
socket_zone = uma_zcreate("socket", sizeof(struct socket), NULL, NULL,
NULL, NULL, UMA_ALIGN_PTR, UMA_ZONE_NOFREE);
@@ -264,6 +281,11 @@ socket_init(void *tag)
uma_zone_set_warning(socket_zone, "kern.ipc.maxsockets limit reached");
EVENTHANDLER_REGISTER(maxsockets_change, socket_zone_change, NULL,
EVENTHANDLER_PRI_FIRST);
+
+   /* We expect a contiguous range */
+   for (i = 0; i <= HHOOK_SOCKET_LAST; i++) {
+   socket_hhook_register(i);
+   }
 }
 SYSINIT(socket, SI_SUB_PROTO_DOMAININIT, SI_ORDER_ANY, socket_init, NULL);
 
@@ -333,6 +355,11 @@ soalloc(struct vnet *vnet)
return (NULL);
}
 #endif
+   if (khelp_init_osd(HELPER_CLASS_SOCKET, &so->osd)) {
+   uma_zfree(socket_zone, so);
+   return (NULL);
+   }
+
SOCKBUF_LOCK_INIT(&so->so_snd, "so_snd");
SOCKBUF_LOCK_INIT(&so->so_rcv, "so_rcv");
sx_init(&so->so_snd.sb_sx, "so_snd_sx");
@@ -348,6 +375,13 @@ soalloc(struct vnet *vnet)
so->so_vnet = vnet;
 #endif
mtx_unlock(&so_global_mtx);
+
+   /* We shouldn't need the so_global_mtx */
+   if (V_socket_hhh[HHOOK_SOCKET_CREATE]->hhh_nhooks > 0) {
+   if (hhook_run_socket(so, NULL, HHOOK_SOCKET_CREATE))
+   /* Do we need more comprehensive error returns? */
+   return (NULL);
+   }
return (so);
 }
 
@@ -384,7 +418,11 @@ sodealloc(struct socket *so)
 #ifdef MAC
mac_socket_destroy(so);
 #endif
+   if (V_socket_hhh[HHOOK_SOCKET_CLOSE]->hhh_nhooks > 0)
+   hhook_run_socket(so, NULL, HHOOK_SOCKET_CLOSE);
+
crfree(so->so_cred);
+   khelp_destroy_osd(&so->osd);
sx_destroy(&so->so_snd.sb_sx);
sx_destroy(&so->so_rcv.sb_sx);
SOCKBUF_LOCK_DESTROY(&so->so_snd);
@@ -2328,6 +2366,25 @@ sorflush(struct socket *so)
 }
 
 /*
+ * Wrapper for Socket established helper hook.
+ * Parameters: socket, context of the hook point, hook id.
+ */
+static int inline
+hhook_run_socket(struct socket *so, void *hctx, int32_t h_id)
+{
+   struct socket_hhook_data hhook_data = {
+   .so = so,
+   .hctx = hctx,
+   .m = NULL
+   };
+
+   hhook_run_hooks(V_socket_hhh[h_id], &hhook_data, &so->osd);
+
+   /* Ugly but needed

svn commit: r270160 - head/sys/netinet/cc

2014-08-18 Thread Lawrence Stewart
Author: lstewart
Date: Tue Aug 19 02:19:53 2014
New Revision: 270160
URL: http://svnweb.freebsd.org/changeset/base/270160

Log:
  Destroy the "qdiffsample_zone" UMA zone on unload to avoid a use-after-unload
  panic easily triggered by running "sysctl -a" after unload.
  
  Reported and tested by:   Grenville Armitage 
  MFC after:1 week

Modified:
  head/sys/netinet/cc/cc_cdg.c

Modified: head/sys/netinet/cc/cc_cdg.c
==
--- head/sys/netinet/cc/cc_cdg.cTue Aug 19 01:20:24 2014
(r270159)
+++ head/sys/netinet/cc/cc_cdg.cTue Aug 19 02:19:53 2014
(r270160)
@@ -221,6 +221,7 @@ static VNET_DEFINE(uint32_t, cdg_hold_ba
 
 /* Function prototypes. */
 static int cdg_mod_init(void);
+static int cdg_mod_destroy(void);
 static void cdg_conn_init(struct cc_var *ccv);
 static int cdg_cb_init(struct cc_var *ccv);
 static void cdg_cb_destroy(struct cc_var *ccv);
@@ -234,7 +235,8 @@ struct cc_algo cdg_cc_algo = {
.cb_destroy = cdg_cb_destroy,
.cb_init = cdg_cb_init,
.conn_init = cdg_conn_init,
-   .cong_signal = cdg_cong_signal
+   .cong_signal = cdg_cong_signal,
+   .mod_destroy = cdg_mod_destroy
 };
 
 /* Vnet created and being initialised. */
@@ -278,6 +280,14 @@ cdg_mod_init(void)
 }
 
 static int
+cdg_mod_destroy(void)
+{
+
+   uma_zdestroy(qdiffsample_zone);
+   return (0);
+}
+
+static int
 cdg_cb_init(struct cc_var *ccv)
 {
struct cdg *cdg_data;
___
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: r270162 - head/tools/tools/nanobsd

2014-08-18 Thread Warner Losh
Author: imp
Date: Tue Aug 19 03:51:10 2014
New Revision: 270162
URL: http://svnweb.freebsd.org/changeset/base/270162

Log:
  Add support for -X, which installs the native cross tools for qemu
  operations. Doesn't install qemu nor setup the jail, yet.

Modified:
  head/tools/tools/nanobsd/nanobsd.sh

Modified: head/tools/tools/nanobsd/nanobsd.sh
==
--- head/tools/tools/nanobsd/nanobsd.sh Tue Aug 19 03:51:05 2014
(r270161)
+++ head/tools/tools/nanobsd/nanobsd.sh Tue Aug 19 03:51:10 2014
(r270162)
@@ -347,6 +347,18 @@ install_kernel ( ) (
) > ${NANO_OBJ}/_.ik 2>&1
 )
 
+native_xtools ( ) (
+   print 2 "Installing the optimized native build tools for cross env"
+   pprint 3 "log: ${NANO_OBJ}/_.native_xtools"
+
+   cd ${NANO_SRC}
+   env TARGET_ARCH=${NANO_ARCH} \
+   ${NANO_MAKE} SRCCONF=${SRCCONF} \
+   __MAKE_CONF=${NANO_MAKE_CONF_INSTALL} native-xtools \
+   DESTDIR=${NANO_WORLDDIR} \
+   > ${NANO_OBJ}/_.native_xtools 2>&1
+)
+
 run_customize() (
 
pprint 2 "run customize scripts"
@@ -920,9 +932,10 @@ do_installkernel=true
 do_world=true
 do_image=true
 do_copyout_partition=true
+do_native_xtools=false
 
 set +e
-args=`getopt Kbc:fhiknqvw $*`
+args=`getopt KXbc:fhiknqvw $*`
 if [ $? -ne 0 ] ; then
usage
exit 2
@@ -938,6 +951,10 @@ do
do_installkernel=false
shift
;;
+   -X)
+   do_native_xtools=true
+   shift
+   ;;
-b)
do_world=false
do_kernel=false
@@ -1089,6 +1106,9 @@ clean_world
 make_conf_install
 install_world
 install_etc
+if $do_native_xtools ; then
+   native_xtools
+fi
 setup_nanobsd_etc
 if $do_installkernel ; then
install_kernel
___
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: r270161 - in head/sys: boot/fdt/dts/arm gnu/dts/arm

2014-08-18 Thread Warner Losh
Author: imp
Date: Tue Aug 19 03:51:05 2014
New Revision: 270161
URL: http://svnweb.freebsd.org/changeset/base/270161

Log:
  New DTS files to suppport the SAM9260EK eval board. Derived, in part,
  from the SAM9G20EK dts files (so that file is GPL'd).

Added:
  head/sys/boot/fdt/dts/arm/sam9260ek.dts   (contents, props changed)
  head/sys/gnu/dts/arm/sam9260ek_common.dtsi   (contents, props changed)

Added: head/sys/boot/fdt/dts/arm/sam9260ek.dts
==
--- /dev/null   00:00:00 1970   (empty, because file is newly added)
+++ head/sys/boot/fdt/dts/arm/sam9260ek.dts Tue Aug 19 03:51:05 2014
(r270161)
@@ -0,0 +1,37 @@
+/*
+ * SAM9260EK eval board - Warner Losh public domain
+ *
+ * $FreeBSD$
+ */
+/dts-v1/;
+#include "sam9260ek_common.dtsi"
+
+/ {
+   model = "Atmel at91sam9260ek";
+   compatible = "atmel,at91sam9260ek", "atmel,at91sam9260", 
"atmel,at91sam9";
+
+   leds {
+   compatible = "gpio-leds";
+
+   ds1 {
+   label = "ds1";
+   gpios = <&pioA 9 0>;
+   linux,default-trigger = "heartbeat";
+   };
+
+   ds5 {
+   label = "ds5";
+   gpios = <&pioA 6 1>;
+   };
+   };
+
+   aliases {
+   dbgu = &dbgu;
+   };
+
+
+   chosen {
+   stdin = "dbgu";
+   stdout = "dbgu";
+   };
+};

Added: head/sys/gnu/dts/arm/sam9260ek_common.dtsi
==
--- /dev/null   00:00:00 1970   (empty, because file is newly added)
+++ head/sys/gnu/dts/arm/sam9260ek_common.dtsi  Tue Aug 19 03:51:05 2014
(r270161)
@@ -0,0 +1,217 @@
+/*
+ * at91sam9260ek_common.dtsi - Device Tree file for Atmel sam9260ek board
+ * Copyright (C) 2014 M. Warner losh 
+ *
+ * Derived from:
+ * at91sam9g20ek_common.dtsi - Device Tree file for Atmel at91sam9g20ek board
+ *
+ * Copyright (C) 2012 Jean-Christophe PLAGNIOL-VILLARD 
+ *
+ * Licensed under GPLv2.
+ *
+ * $FreeBSD$
+ */
+#include "at91sam9260.dtsi"
+
+/ {
+
+   chosen {
+   bootargs = "mem=64M console=ttyS0,115200 root=/dev/mtdblock5 rw 
rootfstype=ubifs";
+   };
+
+   memory {
+   reg = <0x2000 0x400>;
+   };
+
+   clocks {
+   #address-cells = <1>;
+   #size-cells = <1>;
+   ranges;
+
+   main_clock: clock@0 {
+   compatible = "atmel,osc", "fixed-clock";
+   clock-frequency = <18432000>;
+   };
+   };
+
+   ahb {
+   apb {
+   pinctrl@f400 {
+   board {
+   pinctrl_pck0_as_mck: pck0_as_mck {
+   atmel,pins =
+   ;  /* PC1 periph B */
+   };
+
+   };
+
+   mmc0_slot1 {
+   pinctrl_board_mmc0_slot1: 
mmc0_slot1-board {
+   atmel,pins =
+   ;   /* PC9 gpio CD pin pull up 
and deglitch */
+   };
+   };
+   };
+
+   dbgu: serial@f200 {
+   status = "okay";
+   };
+
+   usart0: serial@fffb {
+   pinctrl-0 =
+   <&pinctrl_usart0
+&pinctrl_usart0_rts
+&pinctrl_usart0_cts
+&pinctrl_usart0_dtr_dsr
+&pinctrl_usart0_dcd
+&pinctrl_usart0_ri>;
+   status = "okay";
+   };
+
+   usart1: serial@fffb4000 {
+   status = "okay";
+   };
+
+   macb0: ethernet@fffc4000 {
+   phy-mode = "rmii";
+   status = "okay";
+   };
+
+   usb1: gadget@fffa4000 {
+   atmel,vbus-gpio = <&pioC 5 GPIO_ACTIVE_HIGH>;
+   status = "okay";
+   };
+
+   mmc0: mmc@fffa8000 {
+   pinctrl-0 = <
+   &pinctrl_board_mmc0_slot1
+   &pinctrl_mmc0_clk
+   &pinctrl_mmc0_slot1_cmd_dat0
+