dragonfly.git
8 years agolocales polish: Remove ISO-8859-1 encoding from 27 locales
John Marino [Mon, 10 Aug 2015 15:48:40 +0000 (17:48 +0200)]
locales polish: Remove ISO-8859-1 encoding from 27 locales

The ISO-8859-1 encoding is considered obsolete compared to ISO-8859-19
(which in itself is obsolete compared to UTF-8).  To help avoid some
potential mismatches, remove the ISO-8859-1 encoding in the following
cases:

1) European localities that already have ISO-8859-15 (25 of 27)
   * ca_(AD|ES|FR|IT)
   * da_dk
   * de_(AT|CH|DE)
   * en_GB
   * (es|eu)_ES
   * fi_FI
   * fr_(BE|CH|FR)
   * is_IS
   * it_(CH|IT)
   * (nb|nn)_NO
   * nl_(BE|NL)
   * pt_PT
   * sv_(FI|SE)

2) Localities where ISO-8859-1 can't represent local currency symbol
   * en_PH (PH Peso)
   * es_CR (Colon)

8 years agolocales polish: Remove ISO8859-15 from 8 non-European places
John Marino [Mon, 10 Aug 2015 14:13:22 +0000 (16:13 +0200)]
locales polish: Remove ISO8859-15 from 8 non-European places

Let's limit usage of the "obsolete" ISO-8859-15 to countries in
Europe.  Users of the eight locales affected should use UTF-8 instead.

8 years agolocale polishing: pl_PL, sk_SK, sl_SI, tr_TR, uk_UA, sv_FI changes
John Marino [Mon, 10 Aug 2015 12:41:57 +0000 (14:41 +0200)]
locale polishing: pl_PL, sk_SK, sl_SI, tr_TR, uk_UA, sv_FI changes

pl_PL: Change shortname alias from ISO8859-2 to UTF-8.  The former can not
       show the Polish currency symbol.
sk_SK: Same as pl_PL, but for the Euro symbol
sl_SI: Same as pl_PL, but for the Euro Symbol
tr_TR: Switch shortname to UTF-8 to handle currency symbol
uk_UA: Same as tr_TR
sv_FI: Switch shortname to ISO-15 for consistency in Europe

8 years agolocale polishing: lt_LT, et_EE, and en_IE changes
John Marino [Mon, 10 Aug 2015 11:55:39 +0000 (13:55 +0200)]
locale polishing: lt_LT, et_EE, and en_IE changes

lt_LT: Remove ISO8859-4.  If an ISO encoding is needed, -13 would be
       used instead.
et_EE: Estonia could use ISO8859-4 (not present), the newer ISO8859-13
       (not present) or ISO8859-15 (present).  To be uniform with other
       European countries that use -15, change the default from UTF-8
       to ISO8859-15.  Do not bring in -4 or -13.
en_IE: Ireland only had UTF-8.  To be uniform with the UK and Western
       Europe, bring in ISO8859-15 and set that as the alias for the
       shortname.  Do not bring in -1.

8 years agokernel/drm: Fix definition of the DRM_IOCTL_I915_GET_SPRITE_COLORKEY ioctl.
Sascha Wildner [Mon, 10 Aug 2015 13:17:51 +0000 (15:17 +0200)]
kernel/drm: Fix definition of the DRM_IOCTL_I915_GET_SPRITE_COLORKEY ioctl.

This is more or less cosmetic, but it helps eliminate duplicates in
kdump(1)'s ioctl list.

Linux did the same in 2c60fae1489c70206e66c28d72b69a3e496c313d.

8 years agovkernel - Fix build
Antonio Huete Jimenez [Mon, 10 Aug 2015 12:12:35 +0000 (05:12 -0700)]
vkernel - Fix build

8 years agolocales: Switch several shortnames away from ISO-8859-1
John Marino [Mon, 10 Aug 2015 10:35:09 +0000 (12:35 +0200)]
locales: Switch several shortnames away from ISO-8859-1

For all western European countries that have their short names aliased
to ISO-8859-1, this is against POLA.  Once the decision to not use UTF-8
is made, the short names should be linked to ISO-8859-15, the one with
the Euro symbol and other common characters that ISO-8859-1 lacks.

While here, change en_PH to UTF-8 since the Peso sign can't be represented
and do the same for Costa Rica and it's Colon currency.

8 years agolocales: Remove new ISO-8859-15@euro symlinks
John Marino [Mon, 10 Aug 2015 09:44:49 +0000 (11:44 +0200)]
locales: Remove new ISO-8859-15@euro symlinks

We're in the process of thinking hard about locale symlinks.  These
new ISO-8859-15@euro symlinks (to their ISO8859-15 counterparts) were
a bad idea that I copied from Linuxland.  Let's reverse this before it
gets released in DragonFly.

It doesn't even make sense. @euro is basically shorthand for ISO8859-15,
so what value does it have to "modify" that encoding? Stop the Linuxanity
now ...

8 years agokdump(1): Adjust to display DRM ioctl names in kdump output.
Sascha Wildner [Sun, 9 Aug 2015 16:31:58 +0000 (18:31 +0200)]
kdump(1): Adjust to display DRM ioctl names in kdump output.

We have to pass ${.CURDIR} to the mkioctls script now too so it can get
at the DRM headers which are not installed.

8 years agotree.3: Document new tree.3 macros.
Sascha Wildner [Sun, 9 Aug 2015 14:53:05 +0000 (16:53 +0200)]
tree.3: Document new tree.3 macros.

Fixes incomplete commit 61ec010eb93d253cf0f3d9b932cb520c9cbcc560.

8 years agoinet6: Revoke nd6_ifinfo.receivedra
Sepherosa Ziehau [Sun, 9 Aug 2015 14:31:20 +0000 (22:31 +0800)]
inet6: Revoke nd6_ifinfo.receivedra

Obtained-from: KAME via FreeBSD

8 years agoinet6: Fix linkmtu handling
Sepherosa Ziehau [Sun, 9 Aug 2015 14:23:02 +0000 (22:23 +0800)]
inet6: Fix linkmtu handling

While I'm here, minor white space cleanup and remove unused code.

Obtained-from: KAME via FreeBSD

8 years agoinet6: Remove CTL_IPV6PROTO_NAMES
Sepherosa Ziehau [Sun, 9 Aug 2015 12:15:45 +0000 (20:15 +0800)]
inet6: Remove CTL_IPV6PROTO_NAMES

Obtained-from: FreeBSD

8 years ago<sys/tree.h>: Add RB_FOREACH_* macros from FreeBSD
John Marino [Sun, 9 Aug 2015 14:37:03 +0000 (16:37 +0200)]
<sys/tree.h>: Add RB_FOREACH_* macros from FreeBSD

At least one port is using RB_FOREACH* from sys/tree.h (x11-wm/spectrwm)

8 years agogcc50: Fix C99 regression for c++ cstdio, etc.
John Marino [Sun, 9 Aug 2015 14:17:36 +0000 (16:17 +0200)]
gcc50: Fix C99 regression for c++ cstdio, etc.

8 years agoinet6: Cosmetic clean up
Sepherosa Ziehau [Sat, 8 Aug 2015 15:40:04 +0000 (23:40 +0800)]
inet6: Cosmetic clean up

No functional changes.

Obtained-from: KAME via FreeBSD

8 years agodrm/linux: Add printk prefixes
François Tigeot [Sun, 9 Aug 2015 10:32:43 +0000 (12:32 +0200)]
drm/linux: Add printk prefixes

8 years agodrm/linux: Add get_jiffies_64()
François Tigeot [Sun, 9 Aug 2015 09:17:09 +0000 (11:17 +0200)]
drm/linux: Add get_jiffies_64()

8 years ago<regex.h>: Pull in <xlocale.h> for xlocale_t definition
John Marino [Sun, 9 Aug 2015 10:30:01 +0000 (12:30 +0200)]
<regex.h>: Pull in <xlocale.h> for xlocale_t definition

8 years agodrm/linux: Add min3()
François Tigeot [Sun, 9 Aug 2015 08:18:33 +0000 (10:18 +0200)]
drm/linux: Add min3()

8 years agokernel/vmx: Fix sysctl types and descriptions.
Sascha Wildner [Sun, 9 Aug 2015 08:17:45 +0000 (10:17 +0200)]
kernel/vmx: Fix sysctl types and descriptions.

8 years agodrm/radeon: Partial update to Linux 3.12
zrj [Fri, 7 Aug 2015 05:31:18 +0000 (08:31 +0300)]
drm/radeon: Partial update to Linux 3.12

  This brings new radeon features (mostly code refactoring):
    DMA functions seperated from asics code;
    UVD block separation;
    Improvements to DPMS (by default disabled);
    Better audio handling.

  Notes:
    drm/ttm layer is put into transitional state pending memory functions rewrite.
    Currently VRAM handling capabilities are limited,
      still enough for light gaming and watching videos.
    X acceleration on radeon SI cards requires updated xorg+mesa(glamour support).

8 years agodrm: Implement order_base_2(n)
zrj [Fri, 7 Aug 2015 05:30:16 +0000 (08:30 +0300)]
drm: Implement order_base_2(n)

8 years agoatmel_mxt - Issue RESET in Acer C720P touch-screen driver
Matthew Dillon [Sun, 9 Aug 2015 01:44:25 +0000 (18:44 -0700)]
atmel_mxt - Issue RESET in Acer C720P touch-screen driver

* Sometimes the hardware appears to lose it, resulting in non-deterministic
  reporting of phantom fixed coordinate presses and movement which messes
  up X's pointer position.  This problem can survive a reboot.

* Issue a RESET command to the chipset on attach.  This will clear up
  any issues that would otherwise survive reboot.

* Add a sysctl, setting debug.atmel_mxt_reset=1 will cause the chipset
  to be reset.  If the chipset goes nuts on a live system, issuing this
  sysctl should clear it up.

  Detection of the situation not yet in place, so for now this sysctl must
  be issued manually if the problem occurs.

8 years agoUTF-8: change upper limit from 0x1FFFFF to 0x10FFFF
John Marino [Sun, 9 Aug 2015 00:12:35 +0000 (02:12 +0200)]
UTF-8: change upper limit from 0x1FFFFF to 0x10FFFF

In November 2003, RFC 3629 changed the upper bound from 0x7FFFFFFF (up to
6 bytes) to 0x10FFFF in order to match the constraints of UTF-16 encoding.
Last week, 5- and 6- bytes were considered illegal, now we also mark
a large portion of 4-byte sequences as illegal as well.

8 years agogcc50/c++locale: Fix locale regression in dports
John Marino [Sat, 8 Aug 2015 23:48:56 +0000 (01:48 +0200)]
gcc50/c++locale: Fix locale regression in dports

When bits/c++locale.h is used, the build failes because locale_t
type is unknown.  Include <xlocale.h> to define it and fix the
ports regressions I'm seeing now.

8 years agoMake upgrade: Remove /usr/bin/colldef which is no longer built
John Marino [Sat, 8 Aug 2015 23:28:47 +0000 (01:28 +0200)]
Make upgrade: Remove /usr/bin/colldef which is no longer built

8 years agoremove mklocale(1) from base
John Marino [Sat, 8 Aug 2015 22:38:11 +0000 (00:38 +0200)]
remove mklocale(1) from base

This was replaced by localedef.  I removed it from the bootstrap, but
it was still building in stage 4.  It should have been removed entirely.

8 years agoChange kk_KZ locale links to kk_Cyrl_KZ
John Marino [Sat, 8 Aug 2015 22:21:39 +0000 (00:21 +0200)]
Change kk_KZ locale links to kk_Cyrl_KZ

This locale changed names but I forgot to also change the short
locale name symlinks (kk_KZ => kk_Cyrl_KZ)

8 years agoStop removing zh_CH.* locales during upgrade
John Marino [Sat, 8 Aug 2015 22:20:43 +0000 (00:20 +0200)]
Stop removing zh_CH.* locales during upgrade

These are used again as aliases to zh_Hans_CN.*

8 years agosbin/hammer: Make hammer blockmap print crc on -v
Tomohiro Kusumi [Sat, 8 Aug 2015 20:17:02 +0000 (05:17 +0900)]
sbin/hammer: Make hammer blockmap print crc on -v

8 years agosys/vfs/hammer: Cleanups
Tomohiro Kusumi [Fri, 7 Aug 2015 20:01:35 +0000 (05:01 +0900)]
sys/vfs/hammer: Cleanups

No functional changes. Using layer1-size-aligned upper
limit makes better sense although it results the same.
Bootstrap code in userspace does this too.

8 years agosys/vfs/hammer: kprintf invalid header
Tomohiro Kusumi [Fri, 7 Aug 2015 18:40:16 +0000 (03:40 +0900)]
sys/vfs/hammer: kprintf invalid header

volume-del'eted volume will show 8 0x00s.

8 years agosbin/hammer: Optimize freemap initialization
Tomohiro Kusumi [Fri, 7 Aug 2015 16:03:37 +0000 (01:03 +0900)]
sbin/hammer: Optimize freemap initialization

Bring in the way hammer_iterate_l1l2_entries() initializes
layer1/2 to initialize_freemap(). The layer1 crc needs to
be updated only once in every 2^19 layer2 entries. No need
to do it for every layer2 entry as they'll be overwritten
except for the one after the last layer2 (2^19th layer2 entry)
within layer1.

Also having nested loops here for layer1 and layer2 seems
to better explain the concept of hammer's blockmap.

8 years agosys/vfs/hammer: Cleanup volume format callback
Tomohiro Kusumi [Fri, 7 Aug 2015 15:10:44 +0000 (00:10 +0900)]
sys/vfs/hammer: Cleanup volume format callback

Apply the same code logic as volume free callback.

No need to wait for ready-to-update-layer1-case to increment
total_free_bigblocks via counter variable, as it has nothing
to do with generating layer1 undo.

8 years agosbin/hammer: Fix inconsistent boot|mem area size
Tomohiro Kusumi [Thu, 6 Aug 2015 19:20:36 +0000 (04:20 +0900)]
sbin/hammer: Fix inconsistent boot|mem area size

Bring in the code that initializes BootAreaSize and MemAreaSize
from newfs_hammer to hammer volume-add. hammer volume-add uses
static values for these and results having different offset for
freemap to start. This generates filesystem with less space for
data (and inodes, dirents, btree nodes, etc) compared to doing
newfs_hammer against multiple volumes initially.

newfs_hammer + volume-add should results the same as newfs_hammer
for multiple volumes initially, just like the previous commit
fixes wrong big-blocks count.

Example 1.
  # newfs_hammer -L TEST /dev/da1 /dev/da2 /dev/da3 > /dev/null
  # mount_hammer /dev/da1:/dev/da2:/dev/da3 /HAMMER
  # hammer info /HAMMER > a
  # umount /HAMMER
Example 2.
  # newfs_hammer -L TEST /dev/da1 > /dev/null
  # mount_hammer /dev/da1 /HAMMER
  # hammer volume-add /dev/da2 /HAMMER
  # hammer volume-add /dev/da3 /HAMMER
  # hammer volume-blkdevs /HAMMER
  /dev/da1:/dev/da2:/dev/da3
  # hammer info /HAMMER > b
  # umount /HAMMER
  # diff -aNur a b
  --- a   2015-08-07 04:29:49.909855000 +0900
  +++ b   2015-08-07 04:30:51.989857000 +0900
  <snip>
          HAMMER Version      6
   Big-block information
  -       Total           42740
  +       Total           42548
          Used                2 (0.00%)
          Reserved           45 (0.11%)
  -       Free            42693 (99.89%)
  +       Free            42501 (99.89%)
   Space information
          No. Inodes          1
  -       Total size       334G (358529105920 bytes)
  +       Total size       332G (356918493184 bytes)
          Used              16M (0.00%)
          Reserved         360M (0.11%)
  -       Free             334G (99.89%)
  +       Free             332G (99.89%)
   PFS information
          PFS ID  Mode    Snaps  Mounted on
               0  MASTER      0  /HAMMER

With this commit it results the same as the Example 1.
  # newfs_hammer -L TEST /dev/da1 > /dev/null
  # mount_hammer /dev/da1 /HAMMER
  # hammer volume-add /dev/da2 /HAMMER
  # hammer volume-add /dev/da3 /HAMMER
  # hammer volume-blkdevs /HAMMER
  /dev/da1:/dev/da2:/dev/da3
  # hammer info /HAMMER > b
  # umount /HAMMER
  # diff -aNur a b   /* only fsid diff */
  --- a   2015-08-07 04:29:49.909855000 +0900
  +++ b   2015-08-07 04:32:39.349860000 +0900
  @@ -1,7 +1,7 @@
  <snip>
          HAMMER Version      6
   Big-block information
          Total           42740

8 years agosys/vfs/hammer: Fix wrong big-block accounting
Tomohiro Kusumi [Wed, 5 Aug 2015 17:46:58 +0000 (02:46 +0900)]
sys/vfs/hammer: Fix wrong big-block accounting

hammer volume-add|del should not count zone4 big-blocks as
a part of vol0_stat_bigblocks. newfs_hammer excludes zone4
big-blocks from vol0_stat_bigblocks on bootstrapping, then
volume-add|del should exclude either.

As the following example shows, it currently makes difference
on Used big-blocks/bytes between
1. newfs_hammer on multiple volumes
and
2. newfs_hammer on a single volume and then add volumes
which isn't something expected to happen.

Example 1.
  # newfs_hammer -L TEST /dev/da1 /dev/da2 /dev/da3 > /dev/null
  # mount_hammer /dev/da1:/dev/da2:/dev/da3 /HAMMER
  # hammer info /HAMMER | grep Used
          Used                2 (0.00%) /* btree + meta */
          Used              16M (0.00%)
  # umount /HAMMER
Example 2.
  # newfs_hammer -L TEST /dev/da1 > /dev/null
  # mount_hammer /dev/da1 /HAMMER
  # hammer volume-add /dev/da2 /HAMMER
  # hammer volume-add /dev/da3 /HAMMER
  # hammer volume-blkdevs /HAMMER
  /dev/da1:/dev/da2:/dev/da3
  # hammer info /HAMMER | grep Used
          Used                4 (0.01%) /* btree + meta + 2freemaps */
          Used              32M (0.01%)
  # umount /HAMMER

With this commit it results the same as the Example 1.
  # newfs_hammer -L TEST /dev/da1 > /dev/null
  # mount_hammer /dev/da1 /HAMMER
  # hammer volume-add /dev/da2 /HAMMER
  # hammer volume-add /dev/da3 /HAMMER
  # hammer volume-blkdevs /HAMMER
  /dev/da1:/dev/da2:/dev/da3
  # hammer info /HAMMER | grep Used
          Used                2 (0.00%)
          Used              16M (0.00%)
  # umount /HAMMER

8 years agosys/vfs/hammer: Add error handling
Tomohiro Kusumi [Wed, 5 Aug 2015 14:51:37 +0000 (23:51 +0900)]
sys/vfs/hammer: Add error handling

8 years agosys/vfs/hammer: Add missing assertion
Tomohiro Kusumi [Wed, 5 Aug 2015 14:48:38 +0000 (23:48 +0900)]
sys/vfs/hammer: Add missing assertion

_hammer_bread() and _hammer_bnew() should be the same
except for the isnew value.

8 years agosys/vfs/hammer: Don't repeat layer1 blockmap check for no reason
Tomohiro Kusumi [Tue, 4 Aug 2015 20:55:12 +0000 (05:55 +0900)]
sys/vfs/hammer: Don't repeat layer1 blockmap check for no reason

When blockmap allocation/reservation finds no more space in
the current layer1, it jumps up to the next layer1 offset,
however this is meaningless when the next one isn't physically
available (beyond the end of the volume).

It should just jump up to the first layer1 of the next volume.
Otherwise it could repeat "goto again;" for max 1024 times or
somewhere near that unless the volume size is some PB scale.
Repetition of all the sanity checks between "again:" and here
are irrelevant when the layer1 isn't mapped to valid area.

This commit checks for the end of the volume when it finds no
more space in the current layer1, but not every time in the
main path of blockmap allocation/reservation code so the
additional check won't be overhead.

8 years agosys/vfs/hammer: Get volume lock on volume-list
Tomohiro Kusumi [Tue, 4 Aug 2015 10:32:41 +0000 (19:32 +0900)]
sys/vfs/hammer: Get volume lock on volume-list

volume-add|del could be ongoing.

8 years agosys/vfs/hammer: Make use of volume bitmap
Tomohiro Kusumi [Tue, 4 Aug 2015 10:29:14 +0000 (19:29 +0900)]
sys/vfs/hammer: Make use of volume bitmap

Make use of macros for volume bitmaps that was added in the
previous commit to fix mount issue.

With HAMMER_VOLUME_NUMBER_FOREACH(), hammer_get_volume() is
used only against volumes currently exist, so the function
shouldn't fail but keep null-check anyway.

8 years agosys/vfs/hammer: Fix mount issue after volume-del
Tomohiro Kusumi [Mon, 3 Aug 2015 11:01:48 +0000 (20:01 +0900)]
sys/vfs/hammer: Fix mount issue after volume-del

When a volume other than the one with the max volume number
is removed from filesystem by volume-del, volume numbers are
no longer sequential. This makes unable to mount the filesystem
once it's unmounted because code assumes volumes numbers are
>=0 && <=(N-1) when N is the number of volumes. It needs to
be able to handle a hole in volume numbers.

For example, the following filesystem initially consists of
volumes A/B/C where volume A is the root volume(*). Each has
volume# 0/1/2 in its volume header written by newfs_hammer.

volume  *A-B-C
volume#  0 1 2

Remove volume B by hammer volume-del. If the filesystem has
no data yet, it never fails.

volume  *A-C
volume#  0 2

Unmount filesystem and try to mount again by specifying A:C,
but mount code assumes filesystem that consists of 2 volumes
means volume numbers are (A,C)=(0,1)|(1,0)
but not (A,C)=(0,2)|(2,0)

  # newfs_hammer -L TEST /dev/da1 /dev/da2 /dev/da3 > /dev/null
  # mount_hammer /dev/da1:/dev/da2:/dev/da3 /HAMMER
  # hammer volume-blkdevs /HAMMER
  /dev/da1:/dev/da2:/dev/da3
  # hammer volume-del /dev/da2 /HAMMER
  # hammer volume-blkdevs /HAMMER
  /dev/da1:/dev/da3
  # umount /HAMMER
  # mount_hammer /dev/da1:/dev/da3 /HAMMER
  mount_hammer: Unknown error: Invalid argument
  # dmesg | tail -1
  hammer_mount: Missing volumes, cannot mount!

This commit fixes that.
  # newfs_hammer -L TEST /dev/da1 /dev/da2 /dev/da3 > /dev/null
  # mount_hammer /dev/da1:/dev/da2:/dev/da3 /HAMMER
  # hammer volume-blkdevs /HAMMER
  /dev/da1:/dev/da2:/dev/da3
  # hammer volume-del /dev/da2 /HAMMER
  # hammer volume-blkdevs /HAMMER
  /dev/da1:/dev/da3
  # umount /HAMMER
  # mount_hammer /dev/da1:/dev/da3 /HAMMER
  # hammer volume-blkdevs /HAMMER
  /dev/da1:/dev/da3
  # umount /HAMMER

Note that hammer volume-add doesn't assume volume numbers are
sequential, so it can properly add a volume after removing a
volume with non-max volume number (see hammer_ioc_volume_add()).

8 years agosys/vfs/hammer: Add hammer_test_free_freemap()
Tomohiro Kusumi [Mon, 3 Aug 2015 20:46:52 +0000 (05:46 +0900)]
sys/vfs/hammer: Add hammer_test_free_freemap()

Add a wrapper for l1l2 iteration via test callback
just like other l1l2 iterations do.

8 years agosys/vfs/hammer: Don't reblock when volume to delete is empty
Tomohiro Kusumi [Mon, 3 Aug 2015 20:39:14 +0000 (05:39 +0900)]
sys/vfs/hammer: Don't reblock when volume to delete is empty

hammer_ioc_volume_del() needs to reblock filesystem only
when the volume hammer volume-del is trying to remove is
not empty. If it's empty (means the volume's blockmap has
nothing other than layer2 big-block in non-root volume)
it can be removed right away.

The way it always reblocks on hammer volume-del is also
counter intuitive since not everyone expects this command
to do extra effort to delete it when it's not empty, and
force one to wait for reblock to finish.

8 years agosbin/hammer: Make hammer blockmap print all blockmap offsets on -v
Tomohiro Kusumi [Mon, 3 Aug 2015 11:00:59 +0000 (20:00 +0900)]
sbin/hammer: Make hammer blockmap print all blockmap offsets on -v

8 years agosys/vfs/hammer: Add missing comments
Tomohiro Kusumi [Tue, 4 Aug 2015 10:06:03 +0000 (19:06 +0900)]
sys/vfs/hammer: Add missing comments

8 years agokernel/netinet6: Change some function definitions to static.
Sascha Wildner [Sat, 8 Aug 2015 17:25:32 +0000 (19:25 +0200)]
kernel/netinet6: Change some function definitions to static.

All these were already declared static.

8 years agoChina locales: Return zh_CN.* as aliases
John Marino [Sat, 8 Aug 2015 17:17:44 +0000 (19:17 +0200)]
China locales: Return zh_CN.* as aliases

Right now vi is expecting Chinese locales in the form of zh_CN.
It may not be the only locale catalog like this, so bring back some
zh_CN.* locales as symlinks to their zh_Hans_CN counterparts.

8 years agoRemove nvi/ files from contrib (replaced by nvi2/)
John Marino [Sat, 8 Aug 2015 16:26:44 +0000 (18:26 +0200)]
Remove nvi/ files from contrib (replaced by nvi2/)

8 years agonvi: Bring in version 2.1.3 (update from 2.1.1)
John Marino [Sat, 8 Aug 2015 16:20:13 +0000 (18:20 +0200)]
nvi: Bring in version 2.1.3 (update from 2.1.1)

All the headers that are not part of new nvi2 vendor branch have been
moved here.  This resolves a major flaw where files written in one
locale and then edited in another would be corrupted.

See FreeBSD PR 196447

8 years agonvi2: Add locale modifications
John Marino [Sat, 8 Aug 2015 15:23:59 +0000 (17:23 +0200)]
nvi2: Add locale modifications

The following required modification:
  - zh_Hans_CN locales
  - renaming all missing extern files (name pollution) [1]
  - Added missing timespec header inclusion
  - change location of missing version.h [2]
  - SLIST_FOREACH_SAFE => SLIST_FOREACH_MUTABLE

[1] There were four separate extern.h files, all were missing from vendor
    branch.  They copied from FreeBSD and put at /usr.bin/vi
[2] The version.h header was also missing from vendor branch, so the
    relative path was removed.  It is now at /usr.bin/vi

8 years agoNVI2: Add DragonFly README files
John Marino [Sat, 8 Aug 2015 14:55:28 +0000 (16:55 +0200)]
NVI2: Add DragonFly README files

8 years agoMerge branch 'vendor/NVI2'
John Marino [Sat, 8 Aug 2015 16:58:59 +0000 (18:58 +0200)]
Merge branch 'vendor/NVI2'

8 years agoImport nvi2 version 2.1.3 to vendor branch
John Marino [Sat, 8 Aug 2015 16:58:23 +0000 (18:58 +0200)]
Import nvi2 version 2.1.3 to vendor branch

8 years agosmbutil: No reason to not build on x86_64 too.
Sascha Wildner [Sat, 8 Aug 2015 14:37:12 +0000 (16:37 +0200)]
smbutil: No reason to not build on x86_64 too.

8 years agoi386 removal, part 30/x: Remove i386 specific asm files from libcrypto.
Sascha Wildner [Sat, 8 Aug 2015 14:12:40 +0000 (16:12 +0200)]
i386 removal, part 30/x: Remove i386 specific asm files from libcrypto.

Remove i386 config file too.

8 years agoRemove remaining OSI protocol support.
Sascha Wildner [Sat, 8 Aug 2015 12:58:25 +0000 (14:58 +0200)]
Remove remaining OSI protocol support.

These were just leftovers.

8 years agolibypclnt: Remove unused file.
Sascha Wildner [Sat, 8 Aug 2015 11:31:21 +0000 (13:31 +0200)]
libypclnt: Remove unused file.

8 years agokernel: Add missing file to 'files' list.
Sascha Wildner [Sat, 8 Aug 2015 10:40:18 +0000 (12:40 +0200)]
kernel: Add missing file to 'files' list.

8 years agodrm: Fix wrong by one error in drm_ioctl()
François Tigeot [Sat, 8 Aug 2015 09:42:14 +0000 (11:42 +0200)]
drm: Fix wrong by one error in drm_ioctl()

This was preventing the ioctl table from being made const.

Submitted-by: Yellow Rabbit
8 years agocvs/easy-import.pl: Convert character to ASCII
John Marino [Fri, 7 Aug 2015 17:04:04 +0000 (19:04 +0200)]
cvs/easy-import.pl: Convert character to ASCII

The author's name was using extended ASCII which sed rejects when
the locale is set for UTF-8.  Just use "oe" instead of the umlaut
to resolve the problem easily.

Reported by: Yellow Rabbit

8 years agoReview libc symbol maps
John Marino [Fri, 7 Aug 2015 16:38:55 +0000 (18:38 +0200)]
Review libc symbol maps

The two previous attempts to version libc failed, so I'm going to start
reviewing each map individually and correct as I find errors.  No-op.

8 years agokdump: Remove (void) casting for unused return values.
Sascha Wildner [Fri, 7 Aug 2015 07:44:51 +0000 (09:44 +0200)]
kdump: Remove (void) casting for unused return values.

This is just clutter, really.

8 years agokdump: Fix shutdown flags regexp and remove shutdownf flags handling.
Sascha Wildner [Fri, 7 Aug 2015 06:57:53 +0000 (08:57 +0200)]
kdump: Fix shutdown flags regexp and remove shutdownf flags handling.

We don't have the latter syscall at all.

8 years agokdump: Bring in FreeBSD's r175936 and r212727.
Sascha Wildner [Thu, 6 Aug 2015 21:45:45 +0000 (23:45 +0200)]
kdump: Bring in FreeBSD's r175936 and r212727.

8 years agogroff/mdoc: Disable ru-KOI8-R localization
John Marino [Fri, 7 Aug 2015 13:16:29 +0000 (15:16 +0200)]
groff/mdoc: Disable ru-KOI8-R localization

The template for the ru-KOI8-R localization for groff -mdoc option was
not created in ASCII as it should have been.  Neither was the French
version, which I was able to fix.  Since I can't fix the data that uses
what I believe is an obsolete codeset, I'm disabling it from the build,
effectively removing the locale.

From what I can tell, neither Russian nor French is used on DragonFly
anyway.  It appears to be something inherited from FreeBSD.  I am also
unsure what is special about these two particular mdoc options as they
are the only locales supported.

With this commit, it is possible to buildworld with locale set (e.g.
to en_US.UTF-8, which correctly failed after regex upgrade)

8 years agoReplace illegal characters from man pages
John Marino [Fri, 7 Aug 2015 12:18:07 +0000 (14:18 +0200)]
Replace illegal characters from man pages

8 years agoConvert mmroff man page to UTF-8
John Marino [Fri, 7 Aug 2015 09:07:29 +0000 (11:07 +0200)]
Convert mmroff man page to UTF-8

This is basically a "test commit".  Yellow Rabbit notes that DragonFly
can't be built if UTF-8 locale is set, so we probably need to convert
a lot of illegal character sequences, just like this one.

8 years agolibc/regex: Replace old regex library with modified TRE
John Marino [Thu, 6 Aug 2015 21:26:49 +0000 (23:26 +0200)]
libc/regex: Replace old regex library with modified TRE

The existing DragonFly REGEX library has several limitations, including
lack of wide character support and no collation ability due to its being
locked to POSIX/C locale.  It's also slow and doesn't pass a number of
tests of the AT&T Research Regex testsuite:

   basic       : TEST testregex, 539 tests,  0 errors
   categorize  : TEST testregex,  20 tests,  0 errors
   nullsubexpr : TEST testregex,  84 tests, 31 errors
   leftassoc   : TEST testregex,  12 tests, 12 errors
   rightassoc  : TEST testregex,  24 tests,  0 errors
   forcedassoc : TEST testregex,  48 tests,  8 errors
   repetition  : TEST testregex, 129 tests, 37 errors

Now it achieves these scores (elevated with new regnexec support):

   basic       : TEST testregex, 808 tests,  0 errors
   categorize  : TEST testregex,  26 tests,  0 errors
   nullsubexpr : TEST testregex, 172 tests,  0 errors
   leftassoc   : TEST testregex,  12 tests, 12 errors
   rightassoc  : TEST testregex,  36 tests,  0 errors
   forcedassoc : TEST testregex,  84 tests,  0 errors
   repetition  : TEST testregex, 241 tests,  0 errors

Here's proof that the regex library is now locale sensitive:

> env LANG=C sed /abandonn[a-z]/d fwl-sort-C.txt
a
abandonnâmes
abandonnât
abandonnâtes
abandonnèrent
abandonné
abandonnée
abandonnées
abandonnés
abord
abords
absence

> env LANG=fr_FR sed /abandonn[a-z]/d fwl-sort-C.txt
a
abord
abords
absence
accepta
acceptai
acceptaient
acceptais
acceptait
acceptant
acceptas
acceptasse

Several new functions have been added to to libc:

  variations of regcomp: regcomp_l,
    regncomp,  regncomp_l,
    regwcomp,  regwcomp_l,
    regnwcomp, regnwcomp_l

  variations of regexec: regnexec, regwexec, regwnexec

The regex.3 and re_format.7 map pages have been updated and symlinked
accordingly.

8 years agoTRE: Add DragonFly README files
John Marino [Thu, 6 Aug 2015 21:14:55 +0000 (23:14 +0200)]
TRE: Add DragonFly README files

8 years agoTRE: Add local modifications to extend functionality
John Marino [Thu, 6 Aug 2015 20:58:06 +0000 (22:58 +0200)]
TRE: Add local modifications to extend functionality

The stock TRE regex library is very good, but it is missing three
key functionalities:
  1) collation support
  2) equivalence classes
  3) legacy support for character-name table

Luckily, TRE was imported in Apple's Libc and they solved these issues.
This commit represents the modifications Apple made (under the same
2-clause license the author Ville Laurikari issued) minus differences
in xlocale support and the exclusion of "if 0" equivalent blocks.

8 years agoMerge branch 'vendor/TRE'
John Marino [Thu, 6 Aug 2015 22:06:35 +0000 (00:06 +0200)]
Merge branch 'vendor/TRE'

8 years agolibc/locale: Add __collate_equiv_value functionality
John Marino [Thu, 6 Aug 2015 21:21:14 +0000 (23:21 +0200)]
libc/locale: Add __collate_equiv_value functionality

This function is required for TRE bracket equivalence support.

8 years agosed(1): Move regex.h to be the last included
John Marino [Thu, 6 Aug 2015 20:11:23 +0000 (22:11 +0200)]
sed(1): Move regex.h to be the last included

The regex.h will soon include <wchar.h> which pulls in <stdio.h>.  The
main.c needs _WITH_GETLINE defined before <stdio.h> is included in order
to have getline's prototype available.  When the new regex library is
imported, sed will break unless _WITH_GETLINE is defined sooner or unless
stdio.h is included before regex.h is.  Let's just move regex.h to be
the last included header to avoid our future issue.

8 years agoImport TRE regex library v0.8.0 to vendor branch vendor/TRE
John Marino [Thu, 6 Aug 2015 22:04:13 +0000 (00:04 +0200)]
Import TRE regex library v0.8.0 to vendor branch

8 years agodrm/radeon: Limit HDMI to 8 bit per color
Yellow Rabbit [Thu, 6 Aug 2015 20:17:56 +0000 (22:17 +0200)]
drm/radeon: Limit HDMI to 8 bit per color

This patch prevents the calculation and use of unsupported frequency for
HDMI monitor. This is a temporary solution. We still can not do this as it
does Linux.

8 years ago<sys/bitstring.h>: Stop removing it.
Sascha Wildner [Thu, 6 Aug 2015 19:51:14 +0000 (21:51 +0200)]
<sys/bitstring.h>: Stop removing it.

This was to be in a42cf85c165bd828567c497705474634ea858d9f but seems I
forgot to push it.

8 years agonet/inet6: Add missing ;
Nuno Antunes [Thu, 6 Aug 2015 08:42:22 +0000 (09:42 +0100)]
net/inet6: Add missing ;

* Unbreaks kernel.

Pointed-out-by: YRabbit
8 years agokernel - Allow kprintf() output targets to be managed as a debugging aid.
Matthew Dillon [Thu, 6 Aug 2015 04:34:39 +0000 (21:34 -0700)]
kernel - Allow kprintf() output targets to be managed as a debugging aid.

* Add kern.kprintf_logging which is a bitmask of kprintf() logging targets.
  This can be adjusted to reduce kprintf() overhead and serialization when
  using it to debug kernel issues.

* The default value is 0x05 which outputs to the console and the
  dmesg buffer.  One can disable console logging and spin-lock
  serialization by setting this to 0x14, causing kprintf() to only
  log to the dmesg buffer.

  0x01 Output to console
  0x02 (unsafe for general kprintf operation, do not use)
  0x04 Output to dmesg buffer
  0x08 (do not use)
  0x10 Do not serialize the whole kprintf() with a spin-lock.

8 years agodrm - Bring in two haswell drm fixes from linux
Matthew Dillon [Thu, 6 Aug 2015 04:31:28 +0000 (21:31 -0700)]
drm - Bring in two haswell drm fixes from linux

* Thsi might fix a GPU-based whole system lockup which can occur on haswell
  systems while running X.  It can take several hours to manifest and
  typically occurs when scrolling or typing in firefox.

2c550183476dfa25641309ae9a28d30feed14379
  Disable PSMI sleep messages on all rings around context switches

add284a3a2481e759d6bec35f6444c32c8ddc383
  Force the CS stall for invalidate flushes

8 years agoinet6: Cosmetic clean up
Sepherosa Ziehau [Wed, 5 Aug 2015 12:28:22 +0000 (20:28 +0800)]
inet6: Cosmetic clean up

No functional changes.

Obtained-from: KAME via FreeBSD

8 years agoinet6: Style and indentation
Sepherosa Ziehau [Tue, 4 Aug 2015 13:03:43 +0000 (21:03 +0800)]
inet6: Style and indentation

Obtained-from: KAME via FreeBSD

8 years agoinet/inet6: Add IN6ADDR_LINKLOCAL_ALLMDNS_INIT and INADDR_ALLMDNS_GROUP
Sepherosa Ziehau [Tue, 4 Aug 2015 12:46:03 +0000 (20:46 +0800)]
inet/inet6: Add IN6ADDR_LINKLOCAL_ALLMDNS_INIT and INADDR_ALLMDNS_GROUP

Obtained-from: FreeBSD

8 years agokernel/ahd: Do not assign an uninitialized variable in early fail cases.
Sascha Wildner [Wed, 5 Aug 2015 16:43:48 +0000 (18:43 +0200)]
kernel/ahd: Do not assign an uninitialized variable in early fail cases.

8 years agoinet6: Nuke duplicated function and unused function
Sepherosa Ziehau [Mon, 3 Aug 2015 13:18:42 +0000 (21:18 +0800)]
inet6: Nuke duplicated function and unused function

Obtained-from: KAME via FreeBSD

8 years agoicmp6: Fix possible mbuf leakage
Sepherosa Ziehau [Mon, 3 Aug 2015 13:06:49 +0000 (21:06 +0800)]
icmp6: Fix possible mbuf leakage

Though, this will not happen in the current code, better safe than
sorry here.

Obtained-from: KAME via FreeBSD

8 years agortsock: If target cpu is not specified, stick to cpu0
Sepherosa Ziehau [Mon, 3 Aug 2015 12:52:19 +0000 (20:52 +0800)]
rtsock: If target cpu is not specified, stick to cpu0

8 years agoAdd AT&T Research regex(3) regression testsuite
John Marino [Mon, 3 Aug 2015 21:35:20 +0000 (23:35 +0200)]
Add AT&T Research regex(3) regression testsuite

Before we replace our ancient regex, we need to baseline it.
This is a well-known and maintained regex testsuite from AT&T Research.
The following commands from tools/regression/lib/libc-regex can be used:

  Make full-test-run   (this runs all tests consecutively)

  make test-basic
  make test-categorize
  make test-nullsubexpr
  make test-leftassoc
  make test-rightassoc
  make test-forcedassoc
  make test-repetition

To change the locale, set LOCALE (e.g. make LOCAL=en_US.UTF-8 test-basic)
These are the baseline results:

  basic       : TEST testregex, 539 tests,  0 errors
  categorize  : TEST testregex,  20 tests,  0 errors
  nullsubexpr : TEST testregex,  84 tests, 31 errors
  leftassoc   : TEST testregex,  12 tests, 12 errors
  rightassoc  : TEST testregex,  24 tests,  0 errors
  forcedassoc : TEST testregex,  48 tests,  8 errors
  repetition  : TEST testregex, 129 tests, 37 errors

UNSUPPORTED:
  AUGMENTED,SHELL,CLASS_ESCAPE,COMMENT,DELIMITED,DISCIPLINE,ESCAPE,LEFT,
  LENIENT,LITERAL,MINIMAL,MULTIPLE,MULTIREF,MUSTDELIM,NULL,RIGHT,
  SHELL_DOT,SHELL_ESCAPED,SHELL_GROUP,SHELL_PATH,SPAN,regnexec,
  regsubcomp,redecomp

8 years agovgrind(1): Remove unused file.
Sascha Wildner [Mon, 3 Aug 2015 18:31:04 +0000 (20:31 +0200)]
vgrind(1): Remove unused file.

8 years agotip(1): Remove another unused file.
Sascha Wildner [Mon, 3 Aug 2015 18:20:00 +0000 (20:20 +0200)]
tip(1): Remove another unused file.

8 years agotip(1): Reduce it to what we actually use from it.
Sascha Wildner [Mon, 3 Aug 2015 18:14:38 +0000 (20:14 +0200)]
tip(1): Reduce it to what we actually use from it.

Also, merge libacu remains.

No change in functionality.

8 years agolibkern: Remove unused locc() function.
Sascha Wildner [Mon, 3 Aug 2015 15:44:56 +0000 (17:44 +0200)]
libkern: Remove unused locc() function.

8 years agoipfw3: get act of the rule
Bill Yuan [Wed, 29 Jul 2015 14:16:02 +0000 (22:16 +0800)]
ipfw3: get act of the rule

8 years agoipfw3: dummynet dispatch back to the same cpu
Bill Yuan [Mon, 3 Aug 2015 15:36:21 +0000 (23:36 +0800)]
ipfw3: dummynet dispatch back to the same cpu

8 years agoi386 removal, part 29/x: Remove old serial drivers, cy(4) and stl(4).
Sascha Wildner [Mon, 3 Aug 2015 08:16:50 +0000 (10:16 +0200)]
i386 removal, part 29/x: Remove old serial drivers, cy(4) and stl(4).

stlstats(8), too.

8 years agokernel: Fix for compiling drm into the kernel.
Sascha Wildner [Mon, 3 Aug 2015 08:16:21 +0000 (10:16 +0200)]
kernel: Fix for compiling drm into the kernel.

8 years agoi386 removal, part 28/x: Remove pnpinfo(8).
Sascha Wildner [Mon, 3 Aug 2015 05:46:35 +0000 (07:46 +0200)]
i386 removal, part 28/x: Remove pnpinfo(8).

8 years agolocales: Update to CLDR version 27.0.1 (from 2.0.1)
John Marino [Mon, 3 Aug 2015 01:45:53 +0000 (03:45 +0200)]
locales: Update to CLDR version 27.0.1 (from 2.0.1)

I generates the new POSIX files from the latest CLDR release (from
June 2015) using the provided java tool, and regenerated all the
locales accordingly.

Note that kk_KZ has been renamed to kk_Cyrl_KZ.

8 years agolocales: Update ctype charmaps with CLDR 27 data
John Marino [Mon, 3 Aug 2015 01:40:05 +0000 (03:40 +0200)]
locales: Update ctype charmaps with CLDR 27 data