git: ifconfig(8): Render non-ASCII SSID names with UTF-8 locales
commit d5e6c24f77ac1154d7c486381fc10f51c2d9e087 Author: Aaron LI Date: Sun Apr 12 20:56:39 2020 +0800 ifconfig(8): Render non-ASCII SSID names with UTF-8 locales Currently ifconfig(8) only prints the hex representation of ssid names with non-ASCII characters. Many modern terminals are able to properly render non-ASCII characters. This change checks if the terminal charmap is UTF-8, and if so, will render the characters, rather than the hex value. This behavior is circumvented by running ifconfig(8) in a non-UTF8 locale; e.g. C or POSIX. Obtained from FreeBSD: https://github.com/freebsd/freebsd/commit/137a4801848fde80544a987fb168ff56face2ffd https://reviews.freebsd.org/D15922 Summary of changes: sbin/ifconfig/ifieee80211.c | 15 +++ 1 file changed, 11 insertions(+), 4 deletions(-) http://gitweb.dragonflybsd.org/dragonfly.git/commitdiff/d5e6c24f77ac1154d7c486381fc10f51c2d9e087 -- DragonFly BSD source repository
git: ifconfig(8): Make lagg creation more fault-tolerant
commit 598a666bccff5d91ec5bc75a130e6b7d19147d49 Author: Aaron LI Date: Sun Apr 12 21:29:32 2020 +0800 ifconfig(8): Make lagg creation more fault-tolerant * Warn, don't exit, when SIOCSLAGGPORT returns an error. When we exit with an error during lagg creation, a single failed NIC (which no longer attaches) can prevent lagg creation and other configuration, such as adding an IPv4 address, and thus leave a machine unreachable. * Preserve non-EEXISTS errors for exit status from SIOCSLAGGPORT, in case scripts are looking for it. Hopefully this can be extended if other parts of ifconfig can allow a "soft" failure. * Improve the warning message to mention what lagg and what member are problematic. Obtained from FreeBSD: https://github.com/freebsd/freebsd/commit/dde41c97866152e8c7eb1f52f07e3e5ac43b2652 https://reviews.freebsd.org/D15046 Summary of changes: sbin/ifconfig/ifclone.c | 5 +++-- sbin/ifconfig/ifconfig.c | 5 +++-- sbin/ifconfig/ifconfig.h | 1 + sbin/ifconfig/ifgroup.c | 4 ++-- sbin/ifconfig/iflagg.c | 14 +++--- 5 files changed, 20 insertions(+), 9 deletions(-) http://gitweb.dragonflybsd.org/dragonfly.git/commitdiff/598a666bccff5d91ec5bc75a130e6b7d19147d49 -- DragonFly BSD source repository
git: ifconfig(8): Add '-f' option to print in more formats
commit 51a3d09e9966badabd8cb22a3721055a7ff47e20 Author: Aaron LI Date: Fri Jun 26 14:02:58 2020 +0800 ifconfig(8): Add '-f' option to print in more formats * Add the '-f' option to control the output formats of addresses, inet (IPv4) subnet masks, inet6 (IPv6) prefix length, Ethernet (MAC) address. The following output formats are supported: - address: numeric (default), host, FQDN - inet (IPv4) subnet masks: CIDR, dotted-quad, and traditional hex output (default) - inet6 (IPv6) prefix length: CIDR, traditional integer format (default) - ether (MAC address): colon-separated (default), dash-separated * The 'IFCONFIG_FORMAT' environment variable has the same usage as the '-f' option and can be overrided by the latter. * Some minor cleanups. Obtained from FreeBSD (revisions 301059 and 301185; review D2856), but with my own minor modifications. Summary of changes: sbin/ifconfig/af_inet.c | 40 ++--- sbin/ifconfig/af_inet6.c | 23 + sbin/ifconfig/af_link.c | 15 +--- sbin/ifconfig/ifconfig.8 | 90 sbin/ifconfig/ifconfig.c | 80 +++--- sbin/ifconfig/ifconfig.h | 1 + 6 files changed, 224 insertions(+), 25 deletions(-) http://gitweb.dragonflybsd.org/dragonfly.git/commitdiff/51a3d09e9966badabd8cb22a3721055a7ff47e20 -- DragonFly BSD source repository
git: ifconfig(8): Print more WPS attributes in verbose "list scan" output
commit 2ecde6140905fddab3e25c30b54bfe405886f488 Author: Aaron LI Date: Tue May 5 10:58:20 2020 +0800 ifconfig(8): Print more WPS attributes in verbose "list scan" output * Move WPS-related defines to a dedicated file * Add handlers for more WPS attributes Obtained-from: FreeBSD (revision 343204) Summary of changes: sbin/ifconfig/ifieee80211.c | 219 sys/netproto/802_11/ieee80211.h | 2 + sys/netproto/802_11/ieee80211_wps.h | 149 3 files changed, 349 insertions(+), 21 deletions(-) create mode 100644 sys/netproto/802_11/ieee80211_wps.h http://gitweb.dragonflybsd.org/dragonfly.git/commitdiff/2ecde6140905fddab3e25c30b54bfe405886f488 -- DragonFly BSD source repository
git: ifconfig(8): Eliminate trailing whitespace on inet6 and group lines
commit a143db0917208ba06adacd7010fede195588a17d Author: Aaron LI Date: Sun Apr 12 21:53:32 2020 +0800 ifconfig(8): Eliminate trailing whitespace on inet6 and group lines Obtained from FreeBSD: https://github.com/freebsd/freebsd/commit/edcbc8f7441a32ec27fb2e57542bf291cb01029e https://reviews.freebsd.org/D19004 Summary of changes: sbin/ifconfig/af_inet6.c | 36 +++- sbin/ifconfig/ifgroup.c | 4 ++-- 2 files changed, 21 insertions(+), 19 deletions(-) http://gitweb.dragonflybsd.org/dragonfly.git/commitdiff/a143db0917208ba06adacd7010fede195588a17d -- DragonFly BSD source repository
git: ifconfig(8): Drop two unused macros from ifieee80211.c
commit 808e96707e9276922a8cca487369f5774f7c0e63 Author: Aaron LI Date: Sun Apr 12 21:36:22 2020 +0800 ifconfig(8): Drop two unused macros from ifieee80211.c Obtained from FreeBSD: https://github.com/freebsd/freebsd/commit/1ce3befafefa7226bcff3621562943176fe87ff3 Summary of changes: sbin/ifconfig/ifieee80211.c | 5 - 1 file changed, 5 deletions(-) http://gitweb.dragonflybsd.org/dragonfly.git/commitdiff/808e96707e9276922a8cca487369f5774f7c0e63 -- DragonFly BSD source repository
git: ifconfig(8): Use getifaddrs(3) from libc
commit 5ecbd7012b0fe835dcda54ca97b260ded1a4b136 Author: Aaron LI Date: Fri Jun 26 17:59:53 2020 +0800 ifconfig(8): Use getifaddrs(3) from libc Use libc's getifaddrs(3) instead of implementing its own version. Obtained from FreeBSD (revisions 166956 and 199770); with minor adjustments. While there, also adjust some styles. Summary of changes: sbin/ifconfig/af_inet.c | 25 +++-- sbin/ifconfig/af_inet6.c | 20 ++-- sbin/ifconfig/af_link.c | 6 +- sbin/ifconfig/ifconfig.c | 235 +-- sbin/ifconfig/ifconfig.h | 5 +- 5 files changed, 110 insertions(+), 181 deletions(-) http://gitweb.dragonflybsd.org/dragonfly.git/commitdiff/5ecbd7012b0fe835dcda54ca97b260ded1a4b136 -- DragonFly BSD source repository
git: ifconfig.8: Update to show '-d' and '-u' is mutually exclusive
commit 7d438afad0520862de97054e705e9e7e184a5e3d Author: Aaron LI Date: Fri Jun 26 22:21:56 2020 +0800 ifconfig.8: Update to show '-d' and '-u' is mutually exclusive Summary of changes: sbin/ifconfig/ifconfig.8 | 18 -- sbin/ifconfig/ifconfig.c | 6 +++--- 2 files changed, 15 insertions(+), 9 deletions(-) http://gitweb.dragonflybsd.org/dragonfly.git/commitdiff/7d438afad0520862de97054e705e9e7e184a5e3d -- DragonFly BSD source repository
git: ifconfig(8): Use correct interface name when setting flags
commit 6cfdf6e4249caa6bec584bbc49fc88d7681dbfdf Author: Aaron LI Date: Fri Jun 26 15:53:07 2020 +0800 ifconfig(8): Use correct interface name when setting flags Obtained from FreeBSD (revision 187253). With this change, the comment to setifflags() is now obsolete, so remove it. While there, improve styles a bit. Summary of changes: sbin/ifconfig/ifconfig.c | 17 ++--- 1 file changed, 6 insertions(+), 11 deletions(-) http://gitweb.dragonflybsd.org/dragonfly.git/commitdiff/6cfdf6e4249caa6bec584bbc49fc88d7681dbfdf -- DragonFly BSD source repository
git: ifconfig(8): Group addresses of each interface by family
commit 7fc7addcbc2bc5f6f644d5d161bce35ecbbebcca Author: Aaron LI Date: Fri Jun 26 20:56:17 2020 +0800 ifconfig(8): Group addresses of each interface by family Group the list of addresses associated with an interface by the address family. A stable sorting algorithm is employed here to preserve the order of addresses inside a single group of each interface. Obtained from FreeBSD (revisions 278080 and 278107). Summary of changes: sbin/ifconfig/ifconfig.c | 162 ++- 1 file changed, 160 insertions(+), 2 deletions(-) http://gitweb.dragonflybsd.org/dragonfly.git/commitdiff/7fc7addcbc2bc5f6f644d5d161bce35ecbbebcca -- DragonFly BSD source repository
git: ifconfig(8): Support to filter output by interface groups
commit 80af6b5d1f3b09540f20bb00ab899d2d722b12e6 Author: Aaron LI Date: Fri Jun 26 22:34:43 2020 +0800 ifconfig(8): Support to filter output by interface groups Add options '-g ' and '-G ' to select and unselect interfaces by groups in the output of 'ifconfig -a', just like the existing '-d' and '-u' options to select only interfaces that are down or up, respectively. Note that '-g' and '-G' options can be used at the same time to apply both conditions and their arguments may contain shell patterns. Examples: * To exclude loopback from the list: ifconfig -a -G lo * To list interfaces whose group names begin with 't': ifconfig -a -g 't*' Obtained from FreeBSD (revision 361790; review D25029) Summary of changes: sbin/ifconfig/ifconfig.8 | 26 -- sbin/ifconfig/ifconfig.c | 91 ++-- 2 files changed, 112 insertions(+), 5 deletions(-) http://gitweb.dragonflybsd.org/dragonfly.git/commitdiff/80af6b5d1f3b09540f20bb00ab899d2d722b12e6 -- DragonFly BSD source repository
git: ifconfig(8): Speed up non-status operations to a single interface
commit 028754e08bbbc6c906ce702fdebdc75f785d3037 Author: Aaron LI Date: Fri Jun 26 21:38:11 2020 +0800 ifconfig(8): Speed up non-status operations to a single interface When performing a non-status operation on a single interface (e.g., set address or flags), it is not necessary for ifconfig(8) to build a list of all addresses in the system, sort them, and then iterate through them to look for the single interface of interest. Obtained from FreeBSD (revision 343535; review D18919) Summary of changes: sbin/ifconfig/ifconfig.c | 53 ++-- 1 file changed, 47 insertions(+), 6 deletions(-) http://gitweb.dragonflybsd.org/dragonfly.git/commitdiff/028754e08bbbc6c906ce702fdebdc75f785d3037 -- DragonFly BSD source repository
git: ipfw3: Fix several comments and error messages
commit 1e831468c4b2ac63fde9c10100979d310441c9c5 Author: Aaron LI Date: Thu Feb 14 15:28:02 2019 +0800 ipfw3: Fix several comments and error messages Summary of changes: sbin/ipfw3/ipfw3.c | 4 ++-- sys/net/ipfw3/ip_fw3.c | 2 +- sys/netinet/in.h | 3 ++- 3 files changed, 5 insertions(+), 4 deletions(-) http://gitweb.dragonflybsd.org/dragonfly.git/commitdiff/1e831468c4b2ac63fde9c10100979d310441c9c5 -- DragonFly BSD source repository
git: ping.8: Mention ping6(8) and traceroute6(8)
commit a7ccbcb31f0729ea49b5b1f7c9387366ebc1ac3e Author: Aaron LI Date: Fri Jun 26 22:43:28 2020 +0800 ping.8: Mention ping6(8) and traceroute6(8) Summary of changes: sbin/ping/ping.8 | 6 -- 1 file changed, 4 insertions(+), 2 deletions(-) http://gitweb.dragonflybsd.org/dragonfly.git/commitdiff/a7ccbcb31f0729ea49b5b1f7c9387366ebc1ac3e -- DragonFly BSD source repository
git: traceroute.8: Mention ping6(8) and traceroute6(8)
commit 7c8d170e3a048eba6b042d4d904949df4fbafb77 Author: Aaron LI Date: Fri Jun 26 22:45:21 2020 +0800 traceroute.8: Mention ping6(8) and traceroute6(8) Summary of changes: usr.sbin/traceroute/traceroute.8 | 7 --- 1 file changed, 4 insertions(+), 3 deletions(-) http://gitweb.dragonflybsd.org/dragonfly.git/commitdiff/7c8d170e3a048eba6b042d4d904949df4fbafb77 -- DragonFly BSD source repository
git: if_tap: Remove a debug message
commit 9663a32d8b792bb5b337c4df3d6bdbeea07bfca9 Author: Aaron LI Date: Sat Jun 27 21:21:53 2020 +0800 if_tap: Remove a debug message Summary of changes: sys/net/tap/if_tap.c | 3 --- 1 file changed, 3 deletions(-) http://gitweb.dragonflybsd.org/dragonfly.git/commitdiff/9663a32d8b792bb5b337c4df3d6bdbeea07bfca9 -- DragonFly BSD source repository
git: make_autoclone_dev.9: Better describe devfs_clone_bitmap_get()
commit 3dde329244f7c4df1cdc5e50a96517c734ce4d92 Author: Aaron LI Date: Sat Jun 27 21:28:22 2020 +0800 make_autoclone_dev.9: Better describe devfs_clone_bitmap_get() * Describe the 'limit' argument. * Describe the return value. * Adjust the description order of this function to align with 'SYNOPSIS' section. Summary of changes: share/man/man9/make_autoclone_dev.9 | 18 -- 1 file changed, 12 insertions(+), 6 deletions(-) http://gitweb.dragonflybsd.org/dragonfly.git/commitdiff/3dde329244f7c4df1cdc5e50a96517c734ce4d92 -- DragonFly BSD source repository
git: vknetd(8): Minor style improvements
commit 54919c3b9f95e3828c672db912fbe68e33169ad0 Author: Aaron LI Date: Thu Aug 30 21:08:13 2018 +0800 vknetd(8): Minor style improvements Summary of changes: usr.sbin/vknetd/vknetd.c | 41 + 1 file changed, 21 insertions(+), 20 deletions(-) http://gitweb.dragonflybsd.org/dragonfly.git/commitdiff/54919c3b9f95e3828c672db912fbe68e33169ad0 -- DragonFly BSD source repository
git: tun/tap: Return EEXIST in clone creation if softc found
commit e877c31aa0323042d42074a30915e5c04b7e7bac Author: Aaron LI Date: Sat Jun 27 20:05:33 2020 +0800 tun/tap: Return EEXIST in clone creation if softc found With the old logic, an existing softc (e.g., created by cloning via autoclone device) may be used and then be modified later, which should be better avoided. Summary of changes: sys/net/tap/if_tap.c | 26 +- sys/net/tun/if_tun.c | 26 +- 2 files changed, 26 insertions(+), 26 deletions(-) http://gitweb.dragonflybsd.org/dragonfly.git/commitdiff/e877c31aa0323042d42074a30915e5c04b7e7bac -- DragonFly BSD source repository
git: tun/tap: Use if_clone framework to clone from autoclone device
commit 6289934442f4e1766483d8f59459764c5cfeaea0 Author: Aaron LI Date: Sat Jun 27 21:11:50 2020 +0800 tun/tap: Use if_clone framework to clone from autoclone device Before this change, the clone methods from autoclone device and if_clone is quite different, so the allocated device unit numbers are not synced between them, and the default interface group is not added for the interfaces created via the autoclone device. For example: tinc/openvpn will open '/dev/tun' to clone a device '/dev/tun0' and an interface 'tun0', but the 'tun0' interface doesn't own the 'tun' default group. And then, 'ifconfig tun create' will fail with 'SIOCIFCREATE2: File exists'. Fix the above conflicts/inconsistencies by using the same if_clone logic for device cloning from the autoclone device. Now the two clone methods are consistent and can be mix used. Bug: https://bugs.dragonflybsd.org/issues/3230 Summary of changes: sys/net/tap/if_tap.c | 22 -- sys/net/tun/if_tun.c | 21 +++-- 2 files changed, 31 insertions(+), 12 deletions(-) http://gitweb.dragonflybsd.org/dragonfly.git/commitdiff/6289934442f4e1766483d8f59459764c5cfeaea0 -- DragonFly BSD source repository
git: make_autoclone_dev.9: Several minor improvements
commit d7e26e2bd526551864e6f3d03193a4eef6909dcf Author: Aaron LI Date: Sat Jun 27 21:30:28 2020 +0800 make_autoclone_dev.9: Several minor improvements * Remove the mention of private function 'devfs_clone_bitmap_fff()'. * Adjust the wording about the clone handler. * Add 'SEE ALSO' section to mention 'make_dev()', 'make_only_dev()', etc. Summary of changes: share/man/man9/make_autoclone_dev.9 | 13 - 1 file changed, 8 insertions(+), 5 deletions(-) http://gitweb.dragonflybsd.org/dragonfly.git/commitdiff/d7e26e2bd526551864e6f3d03193a4eef6909dcf -- DragonFly BSD source repository
git: tun/tap: Fix errno NODEV to NOENT in clone creation
commit ef83271127badd5200204dddb1af879478fbe031 Author: Aaron LI Date: Sat Jun 27 19:23:00 2020 +0800 tun/tap: Fix errno NODEV to NOENT in clone creation I was thinking 'NODEV' means 'no such device' but it actually means 'operation not supported by device'... So change this errno to 'NOENT'. While there, adjust the code a bit in if_tap.c to align with if_tun.c. Summary of changes: sys/net/tap/if_tap.c | 8 +++- sys/net/tun/if_tun.c | 6 +++--- 2 files changed, 6 insertions(+), 8 deletions(-) http://gitweb.dragonflybsd.org/dragonfly.git/commitdiff/ef83271127badd5200204dddb1af879478fbe031 -- DragonFly BSD source repository
git: if_clone: Fix a missing allocated unit free upon error
commit f835013faa956129bbbf666f8b9bba8394ada9fb Author: Aaron LI Date: Sat Jun 27 19:36:11 2020 +0800 if_clone: Fix a missing allocated unit free upon error Summary of changes: sys/net/if_clone.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) http://gitweb.dragonflybsd.org/dragonfly.git/commitdiff/f835013faa956129bbbf666f8b9bba8394ada9fb -- DragonFly BSD source repository
git: make_dev.9: Describe a bit more about make_only_dev()
commit b217812bd64982a7dab28f494ed716f0be632e0f Author: Aaron LI Date: Sat Jun 27 21:23:33 2020 +0800 make_dev.9: Describe a bit more about make_only_dev() * Describe a bit more about the usage of make_only_dev(), mentioning make_autoclone_dev(), also improve a sensence about this function. * Fix a missing function markup to 'make_dev()'. * Add 'SEE ALSO' section to mention devfs(5) and make_autoclone_dev(9). Summary of changes: share/man/man9/make_dev.9 | 14 +++--- 1 file changed, 11 insertions(+), 3 deletions(-) http://gitweb.dragonflybsd.org/dragonfly.git/commitdiff/b217812bd64982a7dab28f494ed716f0be632e0f -- DragonFly BSD source repository
git: tun/tap: Do not flag cloned interface as manually made
commit f25c93f9cd559d50b80055c22b551345bedd1469 Author: Aaron LI Date: Sat Jun 27 11:43:00 2020 +0800 tun/tap: Do not flag cloned interface as manually made Similar to the devices cloned via the autocloner device (i.e., /dev/tun, /dev/tap), don't flag devices cloned via interface cloning as manually made. Only explicitly opened devices are flagged as manually made. Summary of changes: sys/net/tap/if_tap.c | 2 +- sys/net/tun/if_tun.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) http://gitweb.dragonflybsd.org/dragonfly.git/commitdiff/f25c93f9cd559d50b80055c22b551345bedd1469 -- DragonFly BSD source repository
git: DragonFly_RELEASE_5_8 if_clone: Fix a missing allocated unit free upon error
commit cc61ed8e65d5be0ba6643e21ed8b4c85e1ccba7b Author: Aaron LI Date: Sat Jun 27 19:36:11 2020 +0800 if_clone: Fix a missing allocated unit free upon error Summary of changes: sys/net/if_clone.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) http://gitweb.dragonflybsd.org/dragonfly.git/commitdiff/cc61ed8e65d5be0ba6643e21ed8b4c85e1ccba7b -- DragonFly BSD source repository
git: make_autoclone_dev.9: Improve some description and markups
commit ec90fa667d8bedc919f5b1ab6b2fe66cb55493d7 Author: Aaron LI Date: Tue Jun 30 23:53:55 2020 +0800 make_autoclone_dev.9: Improve some description and markups Summary of changes: share/man/man9/make_autoclone_dev.9 | 48 - 1 file changed, 21 insertions(+), 27 deletions(-) http://gitweb.dragonflybsd.org/dragonfly.git/commitdiff/ec90fa667d8bedc919f5b1ab6b2fe66cb55493d7 -- DragonFly BSD source repository
git: tun/tap: Use make_only_dev() for the autoclone device
commit 33c70ba7672d54fa4425cc04f741eeb23f36e091 Author: Aaron LI Date: Sun Jun 28 23:06:33 2020 +0800 tun/tap: Use make_only_dev() for the autoclone device It's recommended and more correct to use make_only_dev() for the autoclone device, because the later open action will call devfs_spec_open() to create the device node in '/dev'. See also the make_autoclone_dev(9) man page. Because the device created by make_only_dev() doesn't appear in '/dev', devfs_find_device_by_name() cannot find it. Therefore, we need to pass the cdev_t returned by make_only_dev() to if_clone_create() so that the {tun,tap}_clone_create() can get the device to create the tun/tap interface. Reviewed-by: dillon Summary of changes: sys/net/tap/if_tap.c | 40 +--- sys/net/tun/if_tun.c | 40 +--- 2 files changed, 42 insertions(+), 38 deletions(-) http://gitweb.dragonflybsd.org/dragonfly.git/commitdiff/33c70ba7672d54fa4425cc04f741eeb23f36e091 -- DragonFly BSD source repository
git: if_clone: Extend if_clone_create() by an extra parameter
commit bb54c3a2a4a6207be408250820bde132dab4af2d Author: Aaron LI Date: Thu Jul 2 22:47:27 2020 +0800 if_clone: Extend if_clone_create() by an extra parameter Currently, if_clone_create() accepts one caddr_t parameter that is passed with the ifreq->ifr_data for the SIOCIFCREATE2 ioctl. Extend this function by another caddr_t parameter so that callers could pass extra data to the ifc->ifc_create() handler and won't conflict with the SIOCIFCREATE2 ioctl calls. This extension will be used by tun(4) and tap(4) in a following commit. Suggested-by: dillon Reviewed-by: dillon Summary of changes: sys/bus/u4b/usb_pf.c | 5 +++-- sys/net/bridge/if_bridge.c | 5 +++-- sys/net/gif/if_gif.c | 11 +++ sys/net/gre/if_gre.c | 5 +++-- sys/net/if.c | 2 +- sys/net/if_clone.c | 12 ++-- sys/net/if_clone.h | 17 + sys/net/if_loop.c | 5 +++-- sys/net/ipfw3_basic/ip_fw3_log.c | 3 ++- sys/net/lagg/if_lagg.c | 5 +++-- sys/net/pf/if_pflog.c | 5 +++-- sys/net/pf/if_pfsync.c | 7 +-- sys/net/vlan/if_vlan.c | 5 +++-- sys/netinet/ip_carp.c | 5 +++-- sys/netproto/802_11/wlan/ieee80211_dragonfly.c | 5 +++-- 15 files changed, 57 insertions(+), 40 deletions(-) http://gitweb.dragonflybsd.org/dragonfly.git/commitdiff/bb54c3a2a4a6207be408250820bde132dab4af2d -- DragonFly BSD source repository
git: tun/tap: Don't repeat ifnet_attach_event and IFAN_ARRAIVAL
commit a13a0bb2ca25a65c4d4ed1eea7e9d32819f5e08a Author: Aaron LI Date: Sun Jun 28 23:20:53 2020 +0800 tun/tap: Don't repeat ifnet_attach_event and IFAN_ARRAIVAL * The if_attach() called in tuncreate() already invokes 'ifnet_attach_event' and announces IFAN_ARRAIVAL; * The ether_ifattach() called in tapcreate() invokes if_attach() and thus would also do the above. Summary of changes: sys/net/tap/if_tap.c | 10 ++ sys/net/tun/if_tun.c | 11 +-- 2 files changed, 3 insertions(+), 18 deletions(-) http://gitweb.dragonflybsd.org/dragonfly.git/commitdiff/a13a0bb2ca25a65c4d4ed1eea7e9d32819f5e08a -- DragonFly BSD source repository
git: Makefile.usr: Add '--ff-only' to 'git pull'
commit 51cb2a6018a9c8f827e16ea33f03fdf13381f677 Author: Aaron LI Date: Sat Aug 1 14:34:55 2020 +0800 Makefile.usr: Add '--ff-only' to 'git pull' Since version 2.27, Git will warn the pulling if not specified how to reconcile divergent branch: warning: Pulling without specifying how to reconcile divergent branches is discouraged. You can squelch this message by running one of the following commands sometime before your next pull: git config pull.rebase false # merge (the default strategy) git config pull.rebase true # rebase git config pull.ff only # fast-forward only As a result, users may come into this issue when doing 'make src-update' or 'make dports-update' tasks and need to resolve the 'git pull' manually. Add the '--ff-only' (i.e., fast-forward only, which is the safest) to the 'git pull' command. While there, adjust the update automation note and show it in 'src-update' and 'dports-update' tasks. Credit: https://stackoverflow.com/a/62653400 Mentioned-by: noob237 (Gonzalo Nemmi) Summary of changes: etc/Makefile.usr | 11 ++- 1 file changed, 6 insertions(+), 5 deletions(-) http://gitweb.dragonflybsd.org/dragonfly.git/commitdiff/51cb2a6018a9c8f827e16ea33f03fdf13381f677 -- DragonFly BSD source repository
git: DragonFly_RELEASE_5_8 Makefile.usr: Add '--ff-only' to 'git pull'
commit e82029a82b9f6bc687b9c2fbc9c21fe63dde9e9f Author: Aaron LI Date: Sat Aug 1 14:34:55 2020 +0800 Makefile.usr: Add '--ff-only' to 'git pull' Since version 2.27, Git will warn the pulling if not specified how to reconcile divergent branch: warning: Pulling without specifying how to reconcile divergent branches is discouraged. You can squelch this message by running one of the following commands sometime before your next pull: git config pull.rebase false # merge (the default strategy) git config pull.rebase true # rebase git config pull.ff only # fast-forward only As a result, users may come into this issue when doing 'make src-update' or 'make dports-update' tasks and need to resolve the 'git pull' manually. Add the '--ff-only' (i.e., fast-forward only, which is the safest) to the 'git pull' command. While there, adjust the update automation note and show it in 'src-update' and 'dports-update' tasks. Credit: https://stackoverflow.com/a/62653400 Mentioned-by: noob237 (Gonzalo Nemmi) Summary of changes: etc/Makefile.usr | 11 ++- 1 file changed, 6 insertions(+), 5 deletions(-) http://gitweb.dragonflybsd.org/dragonfly.git/commitdiff/e82029a82b9f6bc687b9c2fbc9c21fe63dde9e9f -- DragonFly BSD source repository
git: x86_64/machdep.c: Fix two minor typos and indentation
commit a4e142f091377f9208b02c996578ea95cdf9d619 Author: Aaron LI Date: Sat Aug 29 16:00:38 2020 +0800 x86_64/machdep.c: Fix two minor typos and indentation Summary of changes: sys/platform/pc64/x86_64/machdep.c | 192 ++--- 1 file changed, 96 insertions(+), 96 deletions(-) http://gitweb.dragonflybsd.org/dragonfly.git/commitdiff/a4e142f091377f9208b02c996578ea95cdf9d619 -- DragonFly BSD source repository
git: calendar(1): Rewrite to support Chinese & Julian calendars
commit d19ef5a274debcb71f2e8cd8dce8b954dc73944b Author: Aaron LI Date: Sun Aug 2 22:17:59 2020 +0800 calendar(1): Rewrite to support Chinese & Julian calendars I wanted to use Chinese calendar in the calendar(1) utility, so I started working on it. The Chinese calendar is a lunisolar calendar and requires calculations of Sun and Moon positions. Along the way of implementing the Chinese calendar support, more and more parts of the old code has been replaced. Now, the new calendar(1) code base has been mostly rewritten to be more extensible to support multiple calendars. Although only the Gregorian (the default), Chinese and Julian calendars are currently supported, more calendars now becomes much easier to add. Highlights: * Support Chinese calendar * Support Julian calendar * More accurate Sun and Moon calculations * More extensible * More calendar files/entries and more accurate information * Better code base Major Changes: * If no user's calendar file, default to '/etc/calendar/default' * Search calendar files in '/etc/calendar', which allows to override the calendar file in '/usr/share/calendar' in a system-wide way * Add '-s' option to show information of Chinese/Julian calendar or Sun/Moon * Add '-H' option to specify the calendar home directory * Add '-L' option to specify the location, which should be set to get accurate Sun/Moon information * Add '-T' option to specify the current time for Sun/Moon calculations * Much Improved calendar file parser * More clean man page * More helpful error messages * Some bug fixes and various cleanups The new calendar algorithms are implemented by referring to this great book: Calendrical Calculations: The Ultimate Edition (4th Edition) by Edward M. Reingold and Nachum Dershowitz. Cambridge University Press, 2018. ISBN: 9781107057623 More information about the development history of this calendar(1) utility can be found in my GitHub repository: https://github.com/liweitianux/ccalendar Summary of changes: etc/Makefile |2 + etc/calendar/Makefile |8 + etc/calendar/default | 18 + etc/mtree/BSD.root.dist|2 + etc/mtree/BSD.usr.dist |4 + usr.bin/calendar/Makefile | 41 +- usr.bin/calendar/basics.c | 421 ++ usr.bin/calendar/basics.h | 101 ++ usr.bin/calendar/calendar.1| 354 - usr.bin/calendar/calendar.1.in | 565 usr.bin/calendar/calendar.c| 569 ++-- usr.bin/calendar/calendar.h| 208 +-- usr.bin/calendar/calendars/calendar.all|1 + usr.bin/calendar/calendars/calendar.birthday | 14 +- usr.bin/calendar/calendars/calendar.canada |3 +- usr.bin/calendar/calendars/calendar.chinese| 11 + usr.bin/calendar/calendars/calendar.christian | 45 +- usr.bin/calendar/calendars/calendar.dragonfly | 88 +- usr.bin/calendar/calendars/calendar.dutch | 80 +- usr.bin/calendar/calendars/calendar.fictional |2 +- usr.bin/calendar/calendars/calendar.history| 289 +--- usr.bin/calendar/calendars/calendar.holiday| 21 +- usr.bin/calendar/calendars/calendar.misc | 23 + usr.bin/calendar/calendars/calendar.music | 16 +- usr.bin/calendar/calendars/calendar.orthodox | 53 + usr.bin/calendar/calendars/calendar.uk |2 +- usr.bin/calendar/calendars/calendar.ushistory | 67 +- usr.bin/calendar/calendars/calendar.world |2 + .../calendars/de_AT.UTF-8/calendar.feiertag|4 +- .../calendars/de_DE.UTF-8/calendar.feiertag|4 +- .../calendars/de_DE.UTF-8/calendar.geschichte |9 +- .../calendar/calendars/fr_FR.UTF-8/calendar.fetes | 15 +- .../calendars/hu_HU.UTF-8/calendar.nevnapok| 10 +- .../calendars/hu_HU.UTF-8/calendar.unnepek |4 +- .../calendars/pt_BR.UTF-8/calendar.mcommemorative |2 +- .../calendars/ru_RU.UTF-8/calendar.orthodox| 24 +- .../calendars/ru_RU.UTF-8/calendar.primety | 13 +- .../calendars/uk_UA.UTF-8/calendar.holiday | 16 +- .../calendar/calendars/uk_UA.UTF-8/calendar.misc |4 +- .../calendars/uk_UA.UTF-8/calendar.orthodox| 29 +- .../calendars/zh_Hans_CN.UTF-8/calendar.all| 11 + .../calendars/zh_Hans_CN.UTF-8/calendar.chinese| 34 + .../calendars/zh_Hans_CN.UTF-8/calendar.gregorian | 38 + .../calendars/zh_Hant_TW.UTF-8/calendar.all| 1
git: calendar.1: Fix minor formatting issues
commit 9c697e7d97d6baa26122897c91093020e3ba547b Author: Aaron LI Date: Fri Sep 11 23:02:26 2020 +0800 calendar.1: Fix minor formatting issues * Fix markup of the '-s' flag * Use 'Cm' to itemize the values of the '-s' flag * Use 'Rs' and 'Re' macros to format the reference book * Update the usage text against the man page Summary of changes: usr.bin/calendar/calendar.1.in | 38 -- usr.bin/calendar/calendar.c| 5 ++--- 2 files changed, 22 insertions(+), 21 deletions(-) http://gitweb.dragonflybsd.org/dragonfly.git/commitdiff/9c697e7d97d6baa26122897c91093020e3ba547b -- DragonFly BSD source repository
git: calendar.1: Fix a grammar mistake and avoid Pinyin symbols
commit 567c7e6fd3ed90d13be686aa5b2fd01bd10950ca Author: Aaron LI Date: Mon Sep 14 21:52:02 2020 +0800 calendar.1: Fix a grammar mistake and avoid Pinyin symbols Summary of changes: usr.bin/calendar/calendar.1.in | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) http://gitweb.dragonflybsd.org/dragonfly.git/commitdiff/567c7e6fd3ed90d13be686aa5b2fd01bd10950ca -- DragonFly BSD source repository
git: ecclesiastical.c: Fix comment error to easter()
commit 7db513258e8d5ff7cdf4f590463a8002a2e6230a Author: Aaron LI Date: Mon Sep 14 21:53:33 2020 +0800 ecclesiastical.c: Fix comment error to easter() Well, the comment of easter() was copied from orthodox_easter() but forgot to update it. Reported-by: Sascha Wildner Summary of changes: usr.bin/calendar/ecclesiastical.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) http://gitweb.dragonflybsd.org/dragonfly.git/commitdiff/7db513258e8d5ff7cdf4f590463a8002a2e6230a -- DragonFly BSD source repository
git: net/ip_mroute: Fix 'struct igmpmsg' for x86_64
commit bfb67b1bd1a4401995b5b7b592ef8628019b9113 Author: Uglymotha Date: Thu Dec 24 17:28:58 2020 +0100 net/ip_mroute: Fix 'struct igmpmsg' for x86_64 The `struct igmpmsg` currently uses `u_long` to define the unused fields instead of `uint32_t`. This breaks the mroute API on 64 bit systems, because `u_long` is 64bit there. The following code in `ip_mroute.c` happily corrupts kernel upcall messages on 64bit systems as the fields are incorrectly shifted 8bytes to the right, overwriting the destination ip address in the packet. ``` /* * Send message to routing daemon to install * a route into the kernel table */ im = mtod(mm, struct igmpmsg *); im->im_msgtype = IGMPMSG_NOCACHE; im->im_mbz = 0; im->im_vif = vifi; ``` Fix this issue by replacing `u_long` with `uint32_t` in `struct igmpmsg`. This change has also been made in FreeBSD at: https://github.com/freebsd/freebsd/commit/3dd767ffd091fb1e586741a1aedfcd67884312a4 This fix is submitted by Uglymotha at GitHub: https://github.com/DragonFlyBSD/DragonFlyBSD/pull/11 Summary of changes: sys/net/ip_mroute/ip_mroute.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) http://gitweb.dragonflybsd.org/dragonfly.git/commitdiff/bfb67b1bd1a4401995b5b7b592ef8628019b9113 -- DragonFly BSD source repository
git: DragonFly_RELEASE_5_8 net/ip_mroute: Fix 'struct igmpmsg' for x86_64
commit e34f6c2e58ca26ac09b29b0c09ea068b2d023678 Author: Uglymotha Date: Thu Dec 24 17:28:58 2020 +0100 net/ip_mroute: Fix 'struct igmpmsg' for x86_64 The `struct igmpmsg` currently uses `u_long` to define the unused fields instead of `uint32_t`. This breaks the mroute API on 64 bit systems, because `u_long` is 64bit there. The following code in `ip_mroute.c` happily corrupts kernel upcall messages on 64bit systems as the fields are incorrectly shifted 8bytes to the right, overwriting the destination ip address in the packet. ``` /* * Send message to routing daemon to install * a route into the kernel table */ im = mtod(mm, struct igmpmsg *); im->im_msgtype = IGMPMSG_NOCACHE; im->im_mbz = 0; im->im_vif = vifi; ``` Fix this issue by replacing `u_long` with `uint32_t` in `struct igmpmsg`. This change has also been made in FreeBSD at: https://github.com/freebsd/freebsd/commit/3dd767ffd091fb1e586741a1aedfcd67884312a4 This fix is submitted by Uglymotha at GitHub: https://github.com/DragonFlyBSD/DragonFlyBSD/pull/11 Summary of changes: sys/net/ip_mroute/ip_mroute.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) http://gitweb.dragonflybsd.org/dragonfly.git/commitdiff/e34f6c2e58ca26ac09b29b0c09ea068b2d023678 -- DragonFly BSD source repository
git: tools: Add pw-update.sh to add new users and groups
commit 04e50ef7dc2e829d4bdf1fec25077e8586aa20b3 Author: Aaron LI Date: Sun Dec 27 17:21:01 2020 +0800 tools: Add pw-update.sh to add new users and groups This script is derived my 'dfly-update' tool [1], and will be used in 'make upgrade' to help add new users and groups. [1] https://github.com/liweitianux/dfly-update Summary of changes: tools/pw-update.sh | 142 + 1 file changed, 142 insertions(+) create mode 100755 tools/pw-update.sh http://gitweb.dragonflybsd.org/dragonfly.git/commitdiff/04e50ef7dc2e829d4bdf1fec25077e8586aa20b3 -- DragonFly BSD source repository
git: tools: Update commit-msg script a bit
commit 3ea159d21ed3dbdaa587f79c9c4fd2ece13fe6e3 Author: Aaron LI Date: Sun Dec 27 11:40:11 2020 +0800 tools: Update commit-msg script a bit Summary of changes: tools/commit-msg | 15 --- 1 file changed, 8 insertions(+), 7 deletions(-) http://gitweb.dragonflybsd.org/dragonfly.git/commitdiff/3ea159d21ed3dbdaa587f79c9c4fd2ece13fe6e3 -- DragonFly BSD source repository
git: etc/Makefile: Use 'pw-update.sh' to add users and groups
commit 929c21ed9c57d8ab299a32bab982cc617e036bad Author: Aaron LI Date: Sun Dec 27 17:35:13 2020 +0800 etc/Makefile: Use 'pw-update.sh' to add users and groups After this change, if we want to add a new user/group, just add it to the 'master.passwd' and/or 'group' files. No need to add ad-hoc pw(8) commands in this Makefile. Summary of changes: etc/Makefile | 32 1 file changed, 4 insertions(+), 28 deletions(-) http://gitweb.dragonflybsd.org/dragonfly.git/commitdiff/929c21ed9c57d8ab299a32bab982cc617e036bad -- DragonFly BSD source repository
git: etc/Makefile: No need to try to install 'group' file
commit db250a0c6bf2d0ad9b161e5ab1f115841a1f5b43 Author: Aaron LI Date: Sun Dec 27 17:59:23 2020 +0800 etc/Makefile: No need to try to install 'group' file Similar to the 'master.passwd', no need to try to install the 'group' file, because its update has already been handled by the 'pw-update.sh' script. Summary of changes: Makefile_upgrade.inc | 1 + etc/Makefile | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) http://gitweb.dragonflybsd.org/dragonfly.git/commitdiff/db250a0c6bf2d0ad9b161e5ab1f115841a1f5b43 -- DragonFly BSD source repository
git: etc/Makefile: Minor style tweaks
commit e9fc9437640aaa7e5656e3e5d23fe5b8442840f0 Author: Aaron LI Date: Sun Dec 27 18:02:02 2020 +0800 etc/Makefile: Minor style tweaks Summary of changes: etc/Makefile | 46 -- 1 file changed, 28 insertions(+), 18 deletions(-) http://gitweb.dragonflybsd.org/dragonfly.git/commitdiff/e9fc9437640aaa7e5656e3e5d23fe5b8442840f0 -- DragonFly BSD source repository
git: Add nsmb.conf.5 man page
commit 24e08a522d0ea79a33dac41a5239d8ce112f85ec Author: Aaron LI Date: Sun Dec 27 18:07:51 2020 +0800 Add nsmb.conf.5 man page Obtained-from: FreeBSD Summary of changes: share/man/man5/Makefile| 1 + share/man/man5/nsmb.conf.5 | 167 + 2 files changed, 168 insertions(+) create mode 100644 share/man/man5/nsmb.conf.5 http://gitweb.dragonflybsd.org/dragonfly.git/commitdiff/24e08a522d0ea79a33dac41a5239d8ce112f85ec -- DragonFly BSD source repository
Re: git: etc/Makefile: Use 'pw-update.sh' to add users and groups
> On Dec 27, 2020, at 18:41, Michael Neumann wrote: > > On Sun, Dec 27, 2020 at 02:10:03AM -0800, Aaron LI wrote: >> >> commit 929c21ed9c57d8ab299a32bab982cc617e036bad >> Author: Aaron LI >> Date: Sun Dec 27 17:35:13 2020 +0800 >> >>etc/Makefile: Use 'pw-update.sh' to add users and groups >> >>After this change, if we want to add a new user/group, just add it to >>the 'master.passwd' and/or 'group' files. No need to add ad-hoc pw(8) >>commands in this Makefile. >> >> Summary of changes: >> etc/Makefile | 32 >> 1 file changed, 4 insertions(+), 28 deletions(-) > > Hey Aaron, > > Would be great to have your dfly-update script to be part of DragonFly. > Looks very neat and useful! Hi Michael, Yeah, I’d like to bring it into the base system so we can also do binary updates :) However, the script still needs some improvements, especially about the /etc update & merge. Cheers, Aaron
git: devname.3: Update man page to align wht the code
commit b58279655d00a35aa6d870925c8196df0558b172 Author: Aaron LI Date: Sun Dec 27 20:46:48 2020 +0800 devname.3: Update man page to align wht the code Summary of changes: lib/libc/gen/devname.3 | 12 +++- 1 file changed, 7 insertions(+), 5 deletions(-) http://gitweb.dragonflybsd.org/dragonfly.git/commitdiff/b58279655d00a35aa6d870925c8196df0558b172 -- DragonFly BSD source repository
git: tools/pw-update.sh: Improve to update user/group
commit 1bc30ec4482e6c2d6b7585df56dfd1c6b55c6144 Author: Aaron LI Date: Tue Dec 29 21:48:53 2020 +0800 tools/pw-update.sh: Improve to update user/group Before this change, this script would only add new users and/or groups, but wouldn't modify existing users/groups. This change add this ability. Summary of changes: tools/pw-update.sh | 83 +++--- 1 file changed, 79 insertions(+), 4 deletions(-) http://gitweb.dragonflybsd.org/dragonfly.git/commitdiff/1bc30ec4482e6c2d6b7585df56dfd1c6b55c6144 -- DragonFly BSD source repository
git: etc/Makefile: Improve update of _dhcp user and dhcpcd files
commit 1024901ca3ec56cec3cea9c3bc570317c1fed581 Author: Aaron LI Date: Tue Dec 29 22:06:59 2020 +0800 etc/Makefile: Improve update of _dhcp user and dhcpcd files * Update the 'master.passwd' file to set the new home for the '_dhcp' user, and then the 'pw-update.sh' script will update it to system. * Simplify the dhcpcd files move logic a bit. Summary of changes: etc/Makefile | 19 ++- etc/master.passwd | 2 +- 2 files changed, 11 insertions(+), 10 deletions(-) http://gitweb.dragonflybsd.org/dragonfly.git/commitdiff/1024901ca3ec56cec3cea9c3bc570317c1fed581 -- DragonFly BSD source repository
git: tools/pw-update.sh: No need to invoke pwd_mkdb(8)
commit 7f8f07e30ef44c84c2c3045e1fcd1ffa07b98629 Author: Aaron LI Date: Tue Dec 29 21:51:13 2020 +0800 tools/pw-update.sh: No need to invoke pwd_mkdb(8) The pw(8) utility already handles the database update, so no need to manually invoke the pwd_mkdb(8). Summary of changes: tools/pw-update.sh | 3 --- 1 file changed, 3 deletions(-) http://gitweb.dragonflybsd.org/dragonfly.git/commitdiff/7f8f07e30ef44c84c2c3045e1fcd1ffa07b98629 -- DragonFly BSD source repository
git: etc/Makefile: Install 'group' and 'master.passwd' to examples/etc
commit 7de42e6a46f4e0634280894f5475f8e929d42a12 Author: Aaron LI Date: Wed Dec 30 22:33:50 2020 +0800 etc/Makefile: Install 'group' and 'master.passwd' to examples/etc Add back installation of 'group' to '/usr/share/examples/etc'. In addition, also install 'master.passwd' there. The point is that '/usr/share/examples/etc' should have all config files that the initial '/etc' have. Suggested-by: swildner Summary of changes: Makefile_upgrade.inc | 1 - etc/Makefile | 3 ++- 2 files changed, 2 insertions(+), 2 deletions(-) http://gitweb.dragonflybsd.org/dragonfly.git/commitdiff/7de42e6a46f4e0634280894f5475f8e929d42a12 -- DragonFly BSD source repository
git: ifconfig(8): Fix regdomain.xml parsing issue
commit f8def4a327ec9f17a28a614aeeb6984025cc471d Author: Aaron LI Date: Thu Dec 31 23:13:50 2020 +0800 ifconfig(8): Fix regdomain.xml parsing issue The original regdomain.[ch] code can't handle unknown netbands in regdomain.xml, mainly because it didn't distinguish the following two cases: * ... * ... Therefore, it tried to strdup(id) but with 'id = NULL' and thus caused segfault errors with the new regdomain.xml, like: ``` ifconfig: unknown mode "11ac" at line 114 ifconfig: band without enclosing netband at line 115 [1]326065 segmentation fault (core dumped) ifconfig ``` This commit fixes the above segfault error by ignoring unknown netbands. Although ifconfig(8) emits some warnings about unknown/unexpected elements, it works as expected :D Reported-by: Gonzalo Nemmi (noob237 on IRC) Summary of changes: sbin/ifconfig/regdomain.c | 12 ++-- 1 file changed, 10 insertions(+), 2 deletions(-) http://gitweb.dragonflybsd.org/dragonfly.git/commitdiff/f8def4a327ec9f17a28a614aeeb6984025cc471d -- DragonFly BSD source repository
git: ifconfig(8): Update regdomain.[ch] to support new regdomain.xml
commit f1699cf2fc932a411e565782d09c34554ceeaa40 Author: Aaron LI Date: Thu Dec 31 13:40:11 2020 +0800 ifconfig(8): Update regdomain.[ch] to support new regdomain.xml The '/etc/regdomain.xml' has been updated in dbe4ac417a2b77e29fd0326277263c3bbccf7ebe. However, ifconfig(8) has not been updated to support the new netbands (e.g., 11ac) and thus ifconfig(8) emits some warnings like: ``` ifconfig: unknown netband mode "11ac" at line 114 ifconfig: ignore "band" of unknown netband at line 115 ifconfig: ignore "freqband" of unknown netband at line 116 ifconfig: ignore "maxpower" of unknown netband at line 117 ifconfig: unexpected XML token "maxpower" data "17" at line 117 ifconfig: ignore "flags" of unknown netband at line 118 ifconfig: flags without freqband or netband at line 118 ignored ``` Update 'regdomain.[ch]' from FreeBSD to support the new regdomain.xml, together with minor fixes. Obtained-from: FreeBSD Summary of changes: sbin/ifconfig/regdomain.c | 33 + sbin/ifconfig/regdomain.h | 2 ++ 2 files changed, 35 insertions(+) http://gitweb.dragonflybsd.org/dragonfly.git/commitdiff/f1699cf2fc932a411e565782d09c34554ceeaa40 -- DragonFly BSD source repository
git: netproto/802_11: Sync some channel definitions from FreeBSD
commit 797b05a568b8e594dcfaa2927540ba627812e273 Author: Aaron LI Date: Thu Dec 31 14:56:25 2020 +0800 netproto/802_11: Sync some channel definitions from FreeBSD Some of these channel definitions are required by the last commit as they're being used in 'regdomain.c'. Also update 'wlan/ieee80211.c' a bit so that it builds fine. Summary of changes: sys/netproto/802_11/_ieee80211.h | 59 sys/netproto/802_11/wlan/ieee80211.c | 6 2 files changed, 59 insertions(+), 6 deletions(-) http://gitweb.dragonflybsd.org/dragonfly.git/commitdiff/797b05a568b8e594dcfaa2927540ba627812e273 -- DragonFly BSD source repository
git: devname.3: Add a little example
commit e73439e7d8b66e3326ad3a8caee9573192891ab8 Author: Aaron LI Date: Fri Jan 1 15:04:37 2021 +0800 devname.3: Add a little example Obtained from FreeBSD but with some updates. Summary of changes: lib/libc/gen/devname.3 | 15 +++ 1 file changed, 15 insertions(+) http://gitweb.dragonflybsd.org/dragonfly.git/commitdiff/e73439e7d8b66e3326ad3a8caee9573192891ab8 -- DragonFly BSD source repository
git: devname(3): Remove obsolete code that queries dev.db
commit 9d755d93d0cfde15705f2c5f64e63f27ee6556b1 Author: Aaron LI Date: Fri Jan 1 14:28:58 2021 +0800 devname(3): Remove obsolete code that queries dev.db In the old days of static /dev, devname(3) would get the name by querying the /var/run/dev.db created by dev_mkdb(8). Now that we have dynamic /dev provided by devfs(5), the device name is provided by the 'kern.devname' sysctl, thus obsoleting the db query code. I've tested to verify that the db query code isn't being used now. So it's safe to remove this obsolete code. Cleanups to dev_mkdb(8) and related code would follow. Meanwhile, update the man page to reflect the current code. Discussed-with: swildner Summary of changes: include/paths.h| 1 - lib/libc/gen/devname.3 | 12 +--- lib/libc/gen/devname.c | 51 +- 3 files changed, 6 insertions(+), 58 deletions(-) http://gitweb.dragonflybsd.org/dragonfly.git/commitdiff/9d755d93d0cfde15705f2c5f64e63f27ee6556b1 -- DragonFly BSD source repository
git: Remove obsolete dev_mkdb(8)
commit 6b921297e7b5df59544411472dffe8fd22ab1068 Author: Aaron LI Date: Fri Jan 1 15:14:03 2021 +0800 Remove obsolete dev_mkdb(8) The devname(3) has long been updated to determine the device name via the 'kern.devname' sysctl provided by devfs(5). The dev.db created by dev_mkdb(8) is thus unused and obsolete. So remove dev_mkdb(8) as well and update relevant parts. Summary of changes: Makefile_upgrade.inc | 2 + bin/ps/ps.1 | 4 +- etc/rc.d/sysdb | 3 - nrelease/Makefile| 1 - usr.sbin/Makefile| 1 - usr.sbin/dev_mkdb/Makefile | 8 --- usr.sbin/dev_mkdb/dev_mkdb.8 | 87 usr.sbin/dev_mkdb/dev_mkdb.c | 153 --- 8 files changed, 3 insertions(+), 256 deletions(-) delete mode 100644 usr.sbin/dev_mkdb/Makefile delete mode 100644 usr.sbin/dev_mkdb/dev_mkdb.8 delete mode 100644 usr.sbin/dev_mkdb/dev_mkdb.c http://gitweb.dragonflybsd.org/dragonfly.git/commitdiff/6b921297e7b5df59544411472dffe8fd22ab1068 -- DragonFly BSD source repository
git: libc/gen/devname.c: No need to include
commit 2a9df6f47ec54d0a8042cb65e172351911e780ce Author: Aaron LI Date: Fri Jan 1 15:31:53 2021 +0800 libc/gen/devname.c: No need to include Summary of changes: lib/libc/gen/devname.c | 1 - 1 file changed, 1 deletion(-) http://gitweb.dragonflybsd.org/dragonfly.git/commitdiff/2a9df6f47ec54d0a8042cb65e172351911e780ce -- DragonFly BSD source repository
git: Import stdbuf(1) together with libstdbuf(3) from FreeBSD
commit ec21d9fbfac028108ef0d30283d74b804e16da33 Author: Aaron LI Date: Fri Jan 1 22:08:34 2021 +0800 Import stdbuf(1) together with libstdbuf(3) from FreeBSD The stdbuf(1) is a utility to change the initial buffering of stdin, stdout and stderr streams for a given command. It achieves this functionality by preloading the libstdbuf(3) library and configuring the needed environment variables. Under the hood, libstdbuf(3) library calls setvbuf(3) to do the actual work. Changes from FreeBSD: * Removed 32bit i386 code from stdbuf(1) * Fix typos and update HISTORY section in libstdbuf.3 man page * Update the example to actually work on DragonFly Summary of changes: lib/Makefile | 1 + lib/libstdbuf/Makefile| 7 +++ lib/libstdbuf/libstdbuf.3 | 104 lib/libstdbuf/stdbuf.c| 117 + share/mk/bsd.libnames.mk | 1 + usr.bin/Makefile | 1 + usr.bin/stdbuf/Makefile | 4 ++ usr.bin/stdbuf/stdbuf.1 | 118 ++ usr.bin/stdbuf/stdbuf.c | 101 +++ 9 files changed, 454 insertions(+) create mode 100644 lib/libstdbuf/Makefile create mode 100644 lib/libstdbuf/libstdbuf.3 create mode 100644 lib/libstdbuf/stdbuf.c create mode 100644 usr.bin/stdbuf/Makefile create mode 100644 usr.bin/stdbuf/stdbuf.1 create mode 100644 usr.bin/stdbuf/stdbuf.c http://gitweb.dragonflybsd.org/dragonfly.git/commitdiff/ec21d9fbfac028108ef0d30283d74b804e16da33 -- DragonFly BSD source repository
git: setbuf.3: Mention stdbuf(1) and update HISTORY & BUGS sections
commit f3721a17cb3d4a3a9c8237b59ab93e9ba8b86b00 Author: Aaron LI Date: Sat Jan 2 10:56:31 2021 +0800 setbuf.3: Mention stdbuf(1) and update HISTORY & BUGS sections Obtained-from: FreeBSD Reported-by: swildner Summary of changes: lib/libc/stdio/setbuf.3 | 33 - 1 file changed, 20 insertions(+), 13 deletions(-) http://gitweb.dragonflybsd.org/dragonfly.git/commitdiff/f3721a17cb3d4a3a9c8237b59ab93e9ba8b86b00 -- DragonFly BSD source repository
git: libutil: Add sockaddr_snprintf() (taken from NetBSD).
commit b021a7d57fc71bd117ff99be3f350c65322df983 Author: Sascha Wildner Date: Sat Jan 2 08:27:05 2021 +0100 libutil: Add sockaddr_snprintf() (taken from NetBSD). The man page has been adjusted a bit since we don't support Apple Talk protocol. Summary of changes: lib/libutil/Makefile| 4 +- lib/libutil/libutil.h | 2 + lib/libutil/sockaddr_snprintf.3 | 238 lib/libutil/sockaddr_snprintf.c | 295 4 files changed, 537 insertions(+), 2 deletions(-) create mode 100644 lib/libutil/sockaddr_snprintf.3 create mode 100644 lib/libutil/sockaddr_snprintf.c http://gitweb.dragonflybsd.org/dragonfly.git/commitdiff/b021a7d57fc71bd117ff99be3f350c65322df983 -- DragonFly BSD source repository
git: Import getaddrinfo(1) from FreeBSD
commit 5fb3968ed80950b4719e90da6aa575d5c1e04a94 Author: Aaron LI Date: Sat Jan 2 19:21:30 2021 +0800 Import getaddrinfo(1) from FreeBSD The getaddrinfo(1) utility resolves host and service names to socket addresses with getaddrinfo(3) and prints them in a user-friendly format. Obtained from FreeBSD, which obtained it from NetBSD. The examples in the man page has been adjusted to use 'www.dragonflybsd.org' instead of NetBSD ones :D Thank swildner for bringing in sockaddr_snprintf(3) to libutil from NetBSD, which is required by this utility. Summary of changes: usr.bin/getaddrinfo/Makefile | 16 ++ usr.bin/getaddrinfo/getaddrinfo.1 | 187 + usr.bin/getaddrinfo/getaddrinfo.c | 330 ++ usr.bin/getaddrinfo/tables.awk| 63 4 files changed, 596 insertions(+) create mode 100644 usr.bin/getaddrinfo/Makefile create mode 100644 usr.bin/getaddrinfo/getaddrinfo.1 create mode 100644 usr.bin/getaddrinfo/getaddrinfo.c create mode 100644 usr.bin/getaddrinfo/tables.awk http://gitweb.dragonflybsd.org/dragonfly.git/commitdiff/5fb3968ed80950b4719e90da6aa575d5c1e04a94 -- DragonFly BSD source repository
git: Import timeout(1) from FreeBSD
commit ef2b2b9d360bb2c0420ab14a436f0f4ce4849f92 Author: Aaron LI Date: Sun Jan 3 10:46:46 2021 +0800 Import timeout(1) from FreeBSD The timeout(1) utility runs a command with a time limit. It has also been imported into NetBSD. This utility first appeared in GNU coreutils. This is a verbatim copy of FreeBSD's version. Necessary modifications and updates will follow. Summary of changes: usr.bin/timeout/Makefile | 10 + usr.bin/timeout/tests/Makefile| 5 + usr.bin/timeout/tests/timeout_test.sh | 215 usr.bin/timeout/timeout.1 | 206 +++ usr.bin/timeout/timeout.c | 362 ++ 5 files changed, 798 insertions(+) create mode 100644 usr.bin/timeout/Makefile create mode 100644 usr.bin/timeout/tests/Makefile create mode 100644 usr.bin/timeout/tests/timeout_test.sh create mode 100644 usr.bin/timeout/timeout.1 create mode 100644 usr.bin/timeout/timeout.c http://gitweb.dragonflybsd.org/dragonfly.git/commitdiff/ef2b2b9d360bb2c0420ab14a436f0f4ce4849f92 -- DragonFly BSD source repository
git: timeout(1): Port to DragonFly
commit 4d524481d3d7c0968ecb5887b0b7f0b47b214c51 Author: Aaron LI Date: Sun Jan 3 12:11:56 2021 +0800 timeout(1): Port to DragonFly Our procctl(2) is different from FreeBSD's procctl(2), so need to adjust its usage. Also hook into our build system and update the man page. Summary of changes: usr.bin/Makefile | 1 + usr.bin/timeout/Makefile | 7 --- usr.bin/timeout/timeout.1 | 6 -- usr.bin/timeout/timeout.c | 24 ++-- 4 files changed, 15 insertions(+), 23 deletions(-) http://gitweb.dragonflybsd.org/dragonfly.git/commitdiff/4d524481d3d7c0968ecb5887b0b7f0b47b214c51 -- DragonFly BSD source repository
git: timeout(1): Some minor tweaks and improvements
commit d631f4f35b6f55897dadb74d35cfc68b70cf931c Author: Aaron LI Date: Sun Jan 3 12:26:39 2021 +0800 timeout(1): Some minor tweaks and improvements * Define exit status and macros and use them * Improve the second kill logic by setting 'do_second_kill = false' after configuring the second kill * Minor style tweaks * Reorder options in the man page, as well as the usage help * Reorder the exit status in the man page * Enhance the HISTORY section in the man page (obtained from NetBSD) Summary of changes: usr.bin/timeout/timeout.1 | 60 +--- usr.bin/timeout/timeout.c | 77 --- 2 files changed, 75 insertions(+), 62 deletions(-) http://gitweb.dragonflybsd.org/dragonfly.git/commitdiff/d631f4f35b6f55897dadb74d35cfc68b70cf931c -- DragonFly BSD source repository
git: timeout(1): Reduce some duplicate code
commit d07a7c407dea1a528308db68d10f382f9c9e5891 Author: Aaron LI Date: Sun Jan 3 13:52:10 2021 +0800 timeout(1): Reduce some duplicate code Merge the 'sig_alrm' and 'sig_term' conditionals, and thus reduce some duplicate code. Summary of changes: usr.bin/timeout/timeout.c | 30 +- 1 file changed, 9 insertions(+), 21 deletions(-) http://gitweb.dragonflybsd.org/dragonfly.git/commitdiff/d07a7c407dea1a528308db68d10f382f9c9e5891 -- DragonFly BSD source repository
git: timeout(1): Add -v/--verbose option to show diagnosis info
commit 966d00559ceda2728ae1c43468c5283d7ab2a062 Author: Aaron LI Date: Sun Jan 3 15:03:03 2021 +0800 timeout(1): Add -v/--verbose option to show diagnosis info The -v/--verbose option enables this utility to show diagnosis info to stderr about any signal sent on timeout. This implementation refers to GNU coreutils's timeout(1). Summary of changes: usr.bin/timeout/timeout.1 | 3 +++ usr.bin/timeout/timeout.c | 28 +++- 2 files changed, 26 insertions(+), 5 deletions(-) http://gitweb.dragonflybsd.org/dragonfly.git/commitdiff/966d00559ceda2728ae1c43468c5283d7ab2a062 -- DragonFly BSD source repository
git: Use ${} instead of $() in various makefiles
commit c6ecc293ce8e93b8d4edaa12241e09350a4d3f55 Author: Aaron LI Date: Sat Jan 16 17:00:59 2021 +0800 Use ${} instead of $() in various makefiles Also use ${.TARGET} and ${.ALLSRC] wherever impossible. Minor style adjustment in at(1)'s makefiles. Summary of changes: bin/ed/test/Makefile | 8 ++-- gnu/usr.bin/cvs/Makefile.inc | 2 +- gnu/usr.bin/cvs/contrib/Makefile | 6 +-- gnu/usr.bin/gmp/Makefile | 2 +- lib/libc/sys/Makefile.inc| 2 +- share/examples/libusb20/Makefile | 9 ++-- sys/dev/crypto/aesni/Makefile| 2 +- sys/dev/crypto/padlock/Makefile | 5 ++- sys/dev/crypto/rdrand/Makefile | 4 +- sys/dev/drm/drm/Makefile | 2 +- sys/dev/drm/i915/Makefile| 2 +- sys/dev/drm/radeon/Makefile | 2 +- sys/dev/raid/hpt27xx/Makefile| 2 +- sys/dev/raid/hptmv/Makefile | 8 ++-- sys/dev/raid/hptrr/Makefile | 2 +- test/cpuperf/Makefile| 20 - test/interbench/Makefile | 10 ++--- test/libpthread/Makefile | 76 +- test/lockf/Makefile | 8 ++-- test/pcpu/Makefile | 17 test/stress/Makefile | 11 ++--- test/stress/fsstress/Makefile| 6 +-- test/sysperf/Makefile| 88 usr.bin/at/Makefile | 18 usr.bin/at/Makefile.inc | 39 ++ usr.bin/crunch/examples/Makefile | 28 ++--- 26 files changed, 184 insertions(+), 195 deletions(-) http://gitweb.dragonflybsd.org/dragonfly.git/commitdiff/c6ecc293ce8e93b8d4edaa12241e09350a4d3f55 -- DragonFly BSD source repository
git: test/vmm: Refactor Makefile by using
commit ee6c78698337d89198fe1f2d79fb871010379e5d Author: Aaron LI Date: Sat Jan 16 17:02:41 2021 +0800 test/vmm: Refactor Makefile by using Summary of changes: test/vmm/Makefile | 13 +++-- 1 file changed, 3 insertions(+), 10 deletions(-) http://gitweb.dragonflybsd.org/dragonfly.git/commitdiff/ee6c78698337d89198fe1f2d79fb871010379e5d -- DragonFly BSD source repository
git: kern/makesyscalls.sh: Better place #undef and fix #endif comments
commit 19244695915295de2e7d820953ab282c68b80b04 Author: Aaron LI Date: Thu Jan 14 19:24:42 2021 +0800 kern/makesyscalls.sh: Better place #undef and fix #endif comments * Move the placement of '#undef PAD_' so it just follows the end of syscall argument section. * Fix the comments of '#endif', so that the '_SYS_SYSPROTO_H_' and '_KERNEL' hierachies are now correct. Summary of changes: sys/kern/makesyscalls.sh | 8 1 file changed, 4 insertions(+), 4 deletions(-) http://gitweb.dragonflybsd.org/dragonfly.git/commitdiff/19244695915295de2e7d820953ab282c68b80b04 -- DragonFly BSD source repository
git: : Regenerate after 'makesyscalls.sh' update
commit 484a77ba3dbfdfe2c0100f3e851edb2059234f30 Author: Aaron LI Date: Thu Jan 14 19:30:41 2021 +0800 : Regenerate after 'makesyscalls.sh' update Summary of changes: sys/sys/sysproto.h | 9 + 1 file changed, 5 insertions(+), 4 deletions(-) http://gitweb.dragonflybsd.org/dragonfly.git/commitdiff/484a77ba3dbfdfe2c0100f3e851edb2059234f30 -- DragonFly BSD source repository
git: kern/makesyscalls.sh: Revert change to '#endif' comment
commit ab262a76d59c19ab562a33e7e64950e09a6fcb7f Author: Aaron LI Date: Tue Jan 19 21:52:36 2021 +0800 kern/makesyscalls.sh: Revert change to '#endif' comment Well, I misread the '#ifdef _KERNEL' with '#ifndef', so the comment of '#endif' is right. Revert the recent change to this part ;) Reported-by: swildner Summary of changes: sys/kern/makesyscalls.sh | 4 ++-- sys/sys/sysproto.h | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) http://gitweb.dragonflybsd.org/dragonfly.git/commitdiff/ab262a76d59c19ab562a33e7e64950e09a6fcb7f -- DragonFly BSD source repository
git: nanosleep(2): Plug a memory disclourse and be POSIX-compliant
commit 19432bfaa9c3c4915d970c0189a2c852f968651b Author: Aaron LI Date: Thu Jan 14 13:06:02 2021 +0800 nanosleep(2): Plug a memory disclourse and be POSIX-compliant The nanosleep1() called by sys_nanosleep() would only update rmt on EINTR, but it can also return other errors, such as EINVAL. And in that case, sys_nanosleep() would update the user-space rmtp by copying garbage from its stack frame. This is not only a kernel memory disclourse, but also not POSIX-compliant. Fix sys_nanosleep() to update rmtp only on EINTR. In addition, zero the kernel rmt variable for double safety. Obtained-from: FreeBSD (r315510) Reviewd-by: dillon Summary of changes: sys/kern/kern_time.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) http://gitweb.dragonflybsd.org/dragonfly.git/commitdiff/19432bfaa9c3c4915d970c0189a2c852f968651b -- DragonFly BSD source repository
git: nanosleep(2): Return EINVAL if tv_sec < 0 (POSIX-compliant)
commit af23a4c2dab7b68bbde7d5141dbace6f93b11646 Author: Aaron LI Date: Mon Jan 18 12:41:41 2021 +0800 nanosleep(2): Return EINVAL if tv_sec < 0 (POSIX-compliant) When the requested sleep interval is negative, return EINVAL. This behavior is the same as Linux and makes our nanosleep(2) pass all tests in the Open POSIX Test Suite [0]. conformance/interfaces/nanosleep/1-1: execution: PASS conformance/interfaces/nanosleep/1-2: execution: PASS conformance/interfaces/nanosleep/1-3: execution: PASS conformance/interfaces/nanosleep/2-1: execution: PASS conformance/interfaces/nanosleep/3-1: execution: PASS conformance/interfaces/nanosleep/3-2: execution: PASS conformance/interfaces/nanosleep/4-1: execution: PASS conformance/interfaces/nanosleep/5-1: execution: PASS conformance/interfaces/nanosleep/5-2: execution: PASS conformance/interfaces/nanosleep/6-1: execution: PASS conformance/interfaces/nanosleep/7-1: execution: PASS conformance/interfaces/nanosleep/7-2: execution: PASS conformance/interfaces/nanosleep/1-1: execution: PASS [0] Open POSIX Test Suite: http://posixtest.sourceforge.net/ Summary of changes: sys/kern/kern_time.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) http://gitweb.dragonflybsd.org/dragonfly.git/commitdiff/af23a4c2dab7b68bbde7d5141dbace6f93b11646 -- DragonFly BSD source repository
git: Implement clock_nanosleep(2) system call
commit 86ccdacbb5c12b58383e4e562abc3f6c8240249a Author: Aaron LI Date: Sun Jan 17 16:08:41 2021 +0800 Implement clock_nanosleep(2) system call * Extend the nanosleep1() function in kern_time.c to support the clock_nanosleep(2) system call. Add {kern,sys}_clock_nanosleep() functions and update kern_nanosleep() accordingly. * Add clock_nanosleep() syscall to syscalls.master and regenerate syscall-related files. * Update libc symbols with the new syscall. * Add clock_nanosleep() warpper in libthread_xu. * Update nanosleep.2 man page to describe clock_nanosleep(). * Update and bump __DragonFly_version. This work is loosely based on the FreeBSD implementation: https://reviews.freebsd.org/rS315526 This clock_nanosleep(2) syscall passed all tests in the Open POSIX Test Suite [0]: conformance/interfaces/clock_nanosleep/1-1: execution: PASS conformance/interfaces/clock_nanosleep/1-2: execution: PASS conformance/interfaces/clock_nanosleep/1-3: execution: PASS conformance/interfaces/clock_nanosleep/1-4: execution: PASS conformance/interfaces/clock_nanosleep/1-5: execution: PASS conformance/interfaces/clock_nanosleep/2-1: execution: PASS conformance/interfaces/clock_nanosleep/2-2: execution: PASS conformance/interfaces/clock_nanosleep/2-3: execution: PASS conformance/interfaces/clock_nanosleep/3-1: execution: PASS conformance/interfaces/clock_nanosleep/4-1: execution: PASS conformance/interfaces/clock_nanosleep/5-1: execution: PASS conformance/interfaces/clock_nanosleep/6-1: execution: PASS conformance/interfaces/clock_nanosleep/9-1: execution: PASS conformance/interfaces/clock_nanosleep/8-1: execution: PASS conformance/interfaces/clock_nanosleep/10-1: execution: PASS conformance/interfaces/clock_nanosleep/11-1: execution: PASS conformance/interfaces/clock_nanosleep/13-1: execution: PASS conformance/interfaces/clock_nanosleep/15-1: execution: PASS [0] Open POSIX Test Suite: http://posixtest.sourceforge.net/ Reviewed-by: swildner, dillon, tuxillo, zach Summary of changes: include/time.h | 2 +- lib/libc/include/namespace.h | 1 + lib/libc/include/un-namespace.h| 1 + lib/libc/sys/Makefile.inc | 5 +- lib/libc/sys/Symbol.map| 6 ++ lib/libc/sys/nanosleep.2 | 185 - lib/libpthread/pthread_testcancel.3| 3 +- lib/libthread_xu/thread/thr_private.h | 2 + lib/libthread_xu/thread/thr_syscalls.c | 20 sys/kern/init_sysent.c | 2 +- sys/kern/kern_time.c | 136 +++- sys/kern/syscalls.c| 2 +- sys/kern/syscalls.master | 4 +- sys/sys/param.h| 3 +- sys/sys/syscall.h | 1 + sys/sys/syscall.mk | 1 + sys/sys/sysproto.h | 7 ++ sys/sys/sysunion.h | 1 + sys/sys/time.h | 10 +- 19 files changed, 329 insertions(+), 63 deletions(-) http://gitweb.dragonflybsd.org/dragonfly.git/commitdiff/86ccdacbb5c12b58383e4e562abc3f6c8240249a -- DragonFly BSD source repository
git: : Add missing copyright and license header
commit 935b8dd2002885193cdb12324b927e4c8ce462a6 Author: Aaron LI Date: Mon Jan 18 21:51:19 2021 +0800 : Add missing copyright and license header Summary of changes: sys/sys/sysmsg.h | 32 ++-- 1 file changed, 30 insertions(+), 2 deletions(-) http://gitweb.dragonflybsd.org/dragonfly.git/commitdiff/935b8dd2002885193cdb12324b927e4c8ce462a6 -- DragonFly BSD source repository
git: Use 'sysmsg_result' macro for consistency
commit 1ff2c2bfe5ce92a2b6ab674372292334b840c44f Author: Aaron LI Date: Wed Jan 20 10:40:13 2021 +0800 Use 'sysmsg_result' macro for consistency Don't directly use the 'sm_result' union member in 'struct sysmsg', consistent with other kernel code. Summary of changes: sys/bus/cam/scsi/scsi_sg.c | 2 +- sys/dev/raid/amr/amr.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) http://gitweb.dragonflybsd.org/dragonfly.git/commitdiff/1ff2c2bfe5ce92a2b6ab674372292334b840c44f -- DragonFly BSD source repository
git: : Remove unused forward declarations
commit 08a964bafa9ba183aed4c82f06af4ed93fb4aaee Author: Aaron LI Date: Wed Jan 20 10:09:37 2021 +0800 : Remove unused forward declarations Summary of changes: sys/sys/sysmsg.h | 12 ++-- 1 file changed, 2 insertions(+), 10 deletions(-) http://gitweb.dragonflybsd.org/dragonfly.git/commitdiff/08a964bafa9ba183aed4c82f06af4ed93fb4aaee -- DragonFly BSD source repository
git: syscall.9: Add some missing info and fix outdated contents
commit ea735b6bba3e51e320d1c3b1077a0d5ab7ae4a10 Author: Aaron LI Date: Tue Jan 19 22:41:43 2021 +0800 syscall.9: Add some missing info and fix outdated contents * Update the syscall decleration (in syscalls.master) and generated prototype (in sysproto.h) examples to match the current syntax. * Fix 'uap->sysmsg_result' to 'sysmsg->sysmsg_result', and be explicit that the function need to return 0 when the default 'sysmsg_result' is updated. * Don't mention the 'SCARG' macro (to extract syscall argument) since it's now seldomly used in our codebase. (Syscall argument can be intuitively extracted by 'uap->arg'.) * Add a paragraph to describe the symbol exportation in libc via the 'libc/sys/Symbol.map' file. * Mention the syscall entry point in the kernel a bit. * Add 'sys/sys/sysmsg.h' and 'sys/sys/sysunion.h' to the FILES section, while remove the obsolete 'sys/kern/syscalls.conf' (already folded into makesyscalls.sh). * Some minor formatting and wording tweaks. Reviewed-by: swildner Summary of changes: share/man/man9/syscall.9 | 83 1 file changed, 56 insertions(+), 27 deletions(-) http://gitweb.dragonflybsd.org/dragonfly.git/commitdiff/ea735b6bba3e51e320d1c3b1077a0d5ab7ae4a10 -- DragonFly BSD source repository
git: : Remove a deprecated and duplicate union member
commit 071d1d69a6c13b850f725b3213176dbda1aee838 Author: Aaron LI Date: Wed Jan 20 10:26:40 2021 +0800 : Remove a deprecated and duplicate union member In 'union sm_result', the 'int result' member is deprecated and replaced by the 'int iresult' member. So remove the 'result' one and change the 'sysmsg_result' macro accordingly. Summary of changes: sys/sys/sysmsg.h | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) http://gitweb.dragonflybsd.org/dragonfly.git/commitdiff/071d1d69a6c13b850f725b3213176dbda1aee838 -- DragonFly BSD source repository
git: clock_settime(2): Return EINVAL if tv_sec < 0
commit 9e053b1ca9de520b3a0fb3a081fa683fcb05bfb3 Author: Aaron LI Date: Wed Jan 20 22:01:39 2021 +0800 clock_settime(2): Return EINVAL if tv_sec < 0 The same argument check is also done in nanosleep(2)/clock_nanosleep(2), and FreeBSD also does this check. Summary of changes: sys/kern/kern_time.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) http://gitweb.dragonflybsd.org/dragonfly.git/commitdiff/9e053b1ca9de520b3a0fb3a081fa683fcb05bfb3 -- DragonFly BSD source repository
git: rc.d/mounttmpfs: Avoid duplicate tmpfs mount at /tmp
commit 34d4e58775400f489611e8739351dc27f392a6ec Author: Aaron LI Date: Sun Feb 14 22:45:13 2021 +0800 rc.d/mounttmpfs: Avoid duplicate tmpfs mount at /tmp Newer DragonFly installation already mounts a tmpfs at /tmp, as configured in /etc/fstab. So check whether /tmp is already a mount point before mounting a tmpfs there to prevent the duplicate mounts. Reported-by: swildner Summary of changes: etc/rc.d/mounttmpfs | 16 +--- 1 file changed, 13 insertions(+), 3 deletions(-) http://gitweb.dragonflybsd.org/dragonfly.git/commitdiff/34d4e58775400f489611e8739351dc27f392a6ec -- DragonFly BSD source repository
git: libthread_xu: Add clock_nanosleep symbols to pthread.map
commit a6dbcf2814d3f859b3672f8b88c14347fb1fe059 Author: Aaron LI Date: Thu Feb 18 18:31:50 2021 +0800 libthread_xu: Add clock_nanosleep symbols to pthread.map Although pthread.map is currently unused (commented in the Makefile), add 'clock_nanosleep' and '_clock_nanosleep' symbols to it anyway. Summary of changes: lib/libthread_xu/pthread.map | 6 ++ 1 file changed, 6 insertions(+) http://gitweb.dragonflybsd.org/dragonfly.git/commitdiff/a6dbcf2814d3f859b3672f8b88c14347fb1fe059 -- DragonFly BSD source repository
git: games: Bring in ching(6) -- The Book of Changes -- from NetBSD
commit d808242906dd621413f6e34f9812f1dd1463041a Author: Aaron LI Date: Fri Feb 19 09:43:16 2021 +0800 games: Bring in ching(6) -- The Book of Changes -- from NetBSD The ching(6) game/utility was nuked from FreeBSD in 1994 ... (see revision 2563) It has been added back to NetBSD in June 30, 2005: --- ching(6) -- The Book of Changes, not seen in BSD since 4.4BSD. The C code is a complete rewrite done by Guy Harris for 4.4BSD and is not the original from v7 at all. Unfortunately, the data file itself, without which the rest isn't useful, was not freed until Caldera released all of 32v a few years ago, so it was not in 4.4lite. The data file, the ching nroff macros, and the driver script are under Caldera or Caldera+Berkeley copyright. I've partially redone the driver script from 4.4 (there was no point in using a temporary file for the hexagram), which was already partially redone from 32v. (As an aside, it is nutty that the script needs a copyright so many times longer than the code.) I've renamed "cno" to "castching", "phx" to "printching", (the traditional names were opaque), and put them in /usr/libexec/ching instead of the v7 /usr/games/ching.d. The data file and nroff macros are in /usr/share/games/ching --- (see https: //github.com/NetBSD/src/commit/5175ead765ed41e9db0f9f59d83ddf8966f6568a) Summary of changes: etc/mtree/BSD.usr.dist|4 + games/Makefile|1 + games/ching/Makefile |5 + {bin/csh => games/ching}/Makefile.inc |0 games/ching/castching/Makefile|9 + games/ching/castching/castching.c | 122 ++ games/ching/ching/Makefile| 11 + games/ching/ching/ching.6 | 154 +++ games/ching/ching/ching.sh| 81 ++ games/ching/ching/hexagrams | 2337 + games/ching/ching/macros | 126 ++ games/ching/include/ching.h | 44 + games/ching/printching/Makefile |9 + games/ching/printching/pathnames.h| 38 + games/ching/printching/printching.c | 313 + 15 files changed, 3254 insertions(+) create mode 100644 games/ching/Makefile copy {bin/csh => games/ching}/Makefile.inc (100%) create mode 100644 games/ching/castching/Makefile create mode 100644 games/ching/castching/castching.c create mode 100644 games/ching/ching/Makefile create mode 100644 games/ching/ching/ching.6 create mode 100644 games/ching/ching/ching.sh create mode 100644 games/ching/ching/hexagrams create mode 100644 games/ching/ching/macros create mode 100644 games/ching/include/ching.h create mode 100644 games/ching/printching/Makefile create mode 100644 games/ching/printching/pathnames.h create mode 100644 games/ching/printching/printching.c http://gitweb.dragonflybsd.org/dragonfly.git/commitdiff/d808242906dd621413f6e34f9812f1dd1463041a -- DragonFly BSD source repository
git: ching(6): Tweak roff(7) macros to properly format with mandoc(1)
commit bc8373b4af4bcdb0c823c1769835776de659c6d4 Author: Aaron LI Date: Fri Feb 19 18:07:59 2021 +0800 ching(6): Tweak roff(7) macros to properly format with mandoc(1) The '\t' sequence (or the literal tab between two arguments) is ignored by mandoc(1), so change it to spaces, which displays well with mandoc(1). Quote the last argument of the .LX macro to fix warnings: "whitespace at end of input line" Change '.rm LH' to '.ds LH' in the .L macro to fix warnings: "undefined string, using "": LH" Summary of changes: games/ching/ching/macros | 10 +- 1 file changed, 5 insertions(+), 5 deletions(-) http://gitweb.dragonflybsd.org/dragonfly.git/commitdiff/bc8373b4af4bcdb0c823c1769835776de659c6d4 -- DragonFly BSD source repository
git: ching(6): Support to format with mandoc(1)
commit 169b629f5bc075f52d87d712d59504849ee92678 Author: Aaron LI Date: Fri Feb 19 18:51:44 2021 +0800 ching(6): Support to format with mandoc(1) We don't ship nroff(1) anymore, so adapt ching(6) to support to use mandoc(1) to format its output. Mandoc(1) only implements part of roff(7) language, but it's enough for ching(6), although minor adjustments to the mandoc(1) output are needed to make it similar to the nroff(1) output. Prefer nroff(1) if it's available (provided by groff package). Summary of changes: games/ching/ching/ching.sh | 13 - 1 file changed, 12 insertions(+), 1 deletion(-) http://gitweb.dragonflybsd.org/dragonfly.git/commitdiff/169b629f5bc075f52d87d712d59504849ee92678 -- DragonFly BSD source repository
git: execve.2: Document reopening of standard descriptors
commit f01ed875151947faaeede6e44a352d5458ba07b0 Author: Aaron LI Date: Sat Jan 23 15:30:47 2021 +0800 execve.2: Document reopening of standard descriptors Meanwhile, add the STANDARDS section and document the current standard status. The reopening of standard descriptors is specified in IEEE Std 1003.1-2001/Cor 1-2002, item XSH/TC1/D6/15. Obtained-from: FreeBSD (r101480) Summary of changes: lib/libc/sys/execve.2 | 16 +++- 1 file changed, 15 insertions(+), 1 deletion(-) http://gitweb.dragonflybsd.org/dragonfly.git/commitdiff/f01ed875151947faaeede6e44a352d5458ba07b0 -- DragonFly BSD source repository
git: kern: Staticize several functions and variables in kern_exec.c
commit 08512cb04d3069b0d42ce0f33d3deb837c188acf Author: Aaron LI Date: Wed Feb 17 20:18:42 2021 +0800 kern: Staticize several functions and variables in kern_exec.c Staticize exec_copyin_args(), exec_free_args() and print_execve_args() functions, and move the related prototypes and exec_path_segflg enum from here. In addition, staticize the 'debug_execve_args' variable. Summary of changes: sys/kern/kern_exec.c | 23 --- sys/sys/imgact.h | 9 ++--- 2 files changed, 18 insertions(+), 14 deletions(-) http://gitweb.dragonflybsd.org/dragonfly.git/commitdiff/08512cb04d3069b0d42ce0f33d3deb837c188acf -- DragonFly BSD source repository
git: execve(2): Minor markup improvements
commit 78e2ba739dae2545c5975fc8aa408f6e49304d08 Author: Aaron LI Date: Wed Feb 17 21:52:14 2021 +0800 execve(2): Minor markup improvements Summary of changes: lib/libc/sys/execve.2 | 11 ++- 1 file changed, 6 insertions(+), 5 deletions(-) http://gitweb.dragonflybsd.org/dragonfly.git/commitdiff/78e2ba739dae2545c5975fc8aa408f6e49304d08 -- DragonFly BSD source repository
git: kern: Return error from exec_copyin_strings() if fname copy failed
commit c09ae1e66575342d41da546f04bf4c2b36cc5d68 Author: Aaron LI Date: Wed Feb 17 20:23:25 2021 +0800 kern: Return error from exec_copyin_strings() if fname copy failed Summary of changes: sys/kern/kern_exec.c | 8 +--- 1 file changed, 5 insertions(+), 3 deletions(-) http://gitweb.dragonflybsd.org/dragonfly.git/commitdiff/c09ae1e66575342d41da546f04bf4c2b36cc5d68 -- DragonFly BSD source repository
git: kern: Clean error paths in kern_execve()
commit 274a4bc4e8ac52aa4f80f19386c0b78271075176 Author: Aaron LI Date: Wed Feb 17 20:02:58 2021 +0800 kern: Clean error paths in kern_execve() Merge the original 'exec_fail_dealloc' and 'exec_fail' to a single 'failed' error path. In addition, introduce the 'nch' variable to clean some expressions a bit. These will help the following fexecve() implementation. While there, adjust the styles a bit. Reviewed-by: dillon Summary of changes: sys/kern/kern_exec.c | 86 +--- 1 file changed, 41 insertions(+), 45 deletions(-) http://gitweb.dragonflybsd.org/dragonfly.git/commitdiff/274a4bc4e8ac52aa4f80f19386c0b78271075176 -- DragonFly BSD source repository
git: Implement the fexecve(2) system call
commit 337acc4483de8c3f37e3efcda91cad4249ba6d61 Author: Aaron LI Date: Wed Feb 17 20:29:36 2021 +0800 Implement the fexecve(2) system call The fexecve(2) function is equivalent to execve(2), except that the file to be executed is determined by the file descriptor fd instead of a pathname. The purpose of fexecve(2) is to enable executing a file which has been verified to be the intended file. It is possible to actively check the file by reading from the file descriptor and be sure that the file is not exchanged for another between the reading and the execution. See https://pubs.opengroup.org/onlinepubs/9699919799/functions/fexecve.html This work is partially based on swildner's patch and FreeBSD's implementation (revisions 177787, 182191, 238220). XXX: We're missing O_EXEC support in open(2). Reviewed-by: dillon Summary of changes: include/unistd.h | 2 - lib/libc/sys/Makefile.inc | 1 + lib/libc/sys/Symbol.map | 3 ++ lib/libc/sys/execve.2 | 71 ++--- lib/libc/sys/open.2 | 4 +- sys/kern/init_sysent.c| 1 + sys/kern/kern_exec.c | 114 ++ sys/kern/syscalls.c | 1 + sys/kern/syscalls.master | 1 + sys/sys/kern_syscall.h| 3 +- sys/sys/param.h | 3 +- sys/sys/syscall.h | 3 +- sys/sys/syscall.mk| 3 +- sys/sys/sysproto.h| 6 +++ sys/sys/sysunion.h| 1 + 15 files changed, 182 insertions(+), 35 deletions(-) http://gitweb.dragonflybsd.org/dragonfly.git/commitdiff/337acc4483de8c3f37e3efcda91cad4249ba6d61 -- DragonFly BSD source repository
git: fexecve(2): Return ENOENT if exec a script opened with O_CLOEXEC
commit 941642e84ed84b735224d17d3114379f1ed0920c Author: Aaron LI Date: Wed Feb 17 21:47:03 2021 +0800 fexecve(2): Return ENOENT if exec a script opened with O_CLOEXEC If a script (i.e., interpreter file) is opened with the O_CLOEXEC flag, it would be closed by the time the interpreter is executed, and then the executation would fail. So just return ENOENT from fexecve(2). This behavior aligns with Linux's. See Linux's fexecve(2) man page. See also: https://bugzilla.kernel.org/show_bug.cgi?id=74481 Thank dillon for implementing the holdvnode2() function to obtain the fileflags together with the fp from fd. Summary of changes: lib/libc/sys/execve.2 | 12 ++ sys/kern/kern_descrip.c | 62 + sys/kern/kern_exec.c| 18 ++ sys/sys/filedesc.h | 2 ++ sys/sys/kern_syscall.h | 2 +- 5 files changed, 91 insertions(+), 5 deletions(-) http://gitweb.dragonflybsd.org/dragonfly.git/commitdiff/941642e84ed84b735224d17d3114379f1ed0920c -- DragonFly BSD source repository
git: ching.6: Mention mandoc(1) together with nroff(1)
commit d99c2c2f9395ecc65f9b38063211923263960299 Author: Aaron LI Date: Sat Feb 20 14:51:09 2021 +0800 ching.6: Mention mandoc(1) together with nroff(1) Summary of changes: games/ching/ching/ching.6 | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) http://gitweb.dragonflybsd.org/dragonfly.git/commitdiff/d99c2c2f9395ecc65f9b38063211923263960299 -- DragonFly BSD source repository
git: ching(6): Simplify the sed expression
commit e95199c5312c3f65c4aa018a18f3b8dd3e58b3d8 Author: Aaron LI Date: Sat Feb 20 14:50:50 2021 +0800 ching(6): Simplify the sed expression No functional/style changes. Summary of changes: games/ching/ching/ching.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) http://gitweb.dragonflybsd.org/dragonfly.git/commitdiff/e95199c5312c3f65c4aa018a18f3b8dd3e58b3d8 -- DragonFly BSD source repository
git: games: Bring in monop(6) from NetBSD
commit 11c3b524747d8c5b8633b938fd0fceb1d5878a2e Author: Aaron LI Date: Sat Feb 20 18:39:42 2021 +0800 games: Bring in monop(6) from NetBSD monop is reminiscent of the Parker Brother's game Monopoly, and monitors a game between 2 to 9 users. It is assumed that the rules of Monopoly are known. The game follows the standard rules, with the exception that, if a property goes up for auction and there are only two solvent players, no auction is held and the property remains unowned. Summary of changes: games/Makefile| 1 + games/monop/Makefile | 9 + games/monop/cards.c | 390 ++ games/monop/deck.h| 58 games/monop/execute.c | 754 ++ games/monop/getinp.c | 112 games/monop/houses.c | 380 + games/monop/jail.c| 116 games/monop/misc.c| 292 +++ games/monop/monop.6 | 178 games/monop/monop.c | 348 +++ games/monop/monop.h | 221 +++ games/monop/morg.c| 222 +++ games/monop/print.c | 190 + games/monop/prop.c| 217 +++ games/monop/rent.c| 89 ++ games/monop/roll.c| 51 games/monop/spec.c| 108 games/monop/trade.c | 322 + 19 files changed, 4058 insertions(+) create mode 100644 games/monop/Makefile create mode 100644 games/monop/cards.c create mode 100644 games/monop/deck.h create mode 100644 games/monop/execute.c create mode 100644 games/monop/getinp.c create mode 100644 games/monop/houses.c create mode 100644 games/monop/jail.c create mode 100644 games/monop/misc.c create mode 100644 games/monop/monop.6 create mode 100644 games/monop/monop.c create mode 100644 games/monop/monop.h create mode 100644 games/monop/morg.c create mode 100644 games/monop/print.c create mode 100644 games/monop/prop.c create mode 100644 games/monop/rent.c create mode 100644 games/monop/roll.c create mode 100644 games/monop/spec.c create mode 100644 games/monop/trade.c http://gitweb.dragonflybsd.org/dragonfly.git/commitdiff/11c3b524747d8c5b8633b938fd0fceb1d5878a2e -- DragonFly BSD source repository
git: games: Bring in gomoku(6) from NetBSD
commit 00b5bfed606f09b3980f2138f99c802b608cb5a5 Author: Aaron LI Date: Sat Feb 20 18:37:34 2021 +0800 games: Bring in gomoku(6) from NetBSD gomoku is a two player game where the object is to get 5 in a row horizontally, vertically or diagonally on a 19 by 19 grid. Summary of changes: games/Makefile |1 + games/gomoku/Makefile |9 + games/gomoku/bdinit.c | 247 games/gomoku/bdisp.c| 459 +++ games/gomoku/gomoku.6 | 120 games/gomoku/gomoku.h | 294 ++ games/gomoku/main.c | 568 ++ games/gomoku/makemove.c | 300 ++ games/gomoku/pickmove.c | 1492 +++ games/gomoku/stoc.c | 106 10 files changed, 3596 insertions(+) create mode 100644 games/gomoku/Makefile create mode 100644 games/gomoku/bdinit.c create mode 100644 games/gomoku/bdisp.c create mode 100644 games/gomoku/gomoku.6 create mode 100644 games/gomoku/gomoku.h create mode 100644 games/gomoku/main.c create mode 100644 games/gomoku/makemove.c create mode 100644 games/gomoku/pickmove.c create mode 100644 games/gomoku/stoc.c http://gitweb.dragonflybsd.org/dragonfly.git/commitdiff/00b5bfed606f09b3980f2138f99c802b608cb5a5 -- DragonFly BSD source repository
git: cgram(6): Reformat code styles
commit a22b106baf921abb02e1ebfd7afbf550e975656a Author: Aaron LI Date: Sat Feb 20 19:03:49 2021 +0800 cgram(6): Reformat code styles Apply indent(1) and then manually adjust a bit. Summary of changes: games/cgram/cgram.c | 560 +++- 1 file changed, 288 insertions(+), 272 deletions(-) http://gitweb.dragonflybsd.org/dragonfly.git/commitdiff/a22b106baf921abb02e1ebfd7afbf550e975656a -- DragonFly BSD source repository
git: grdc(6): Allow 'q' to quit immediately
commit 8f2695f272807c488393d73a919c4affb3b4cf49 Author: Aaron LI Date: Sun Feb 21 15:04:55 2021 +0800 grdc(6): Allow 'q' to quit immediately Add support to allow pressing 'q' to quit immediately. Partially based on OpenBSD's implementation: https://github.com/openbsd/src/commit/8ca82b000914eb1e6f45d22092c9358df4233247 Summary of changes: games/grdc/grdc.6 | 7 +-- games/grdc/grdc.c | 31 +++ 2 files changed, 28 insertions(+), 10 deletions(-) http://gitweb.dragonflybsd.org/dragonfly.git/commitdiff/8f2695f272807c488393d73a919c4affb3b4cf49 -- DragonFly BSD source repository
git: cgram.6: Mention that cursor keys can also be used
commit d835119e4008598f58f315c51f7a601976d9e7d0 Author: Aaron LI Date: Sat Feb 20 22:43:17 2021 +0800 cgram.6: Mention that cursor keys can also be used Summary of changes: games/cgram/cgram.6 | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) http://gitweb.dragonflybsd.org/dragonfly.git/commitdiff/d835119e4008598f58f315c51f7a601976d9e7d0 -- DragonFly BSD source repository