git: vm: Change 'kernel_map' global to type of 'struct vm_map *'

2021-06-19 Thread Aaron LI
commit 1eeaf6b2bb3621f01159723feaba3aa2c5d933fd Author: Aaron LI Date: Thu May 20 22:40:00 2021 +0800 vm: Change 'kernel_map' global to type of 'struct vm_map *' Change the global variable 'kernel_map' from type 'struct vm_map' to a pointer to this struct. This simplify

git: x86_64/specialreg.h: Reorganize SPEC_CTRL_* macros

2021-06-19 Thread Aaron LI
commit 3494e47e40086b9d6546a7c3ee4f066fce620c9a Author: Aaron LI Date: Wed May 26 19:38:00 2021 +0800 x86_64/specialreg.h: Reorganize SPEC_CTRL_* macros Move the SPEC_CTRL_* bit defines near to the corresponding MSR_SPEC_CTRL MSR definition. Summary of changes: sys/cpu

git: x86_64/specialreg.h: Deprecate old defines of Spectre mitigation

2021-06-19 Thread Aaron LI
commit 60625a4d1658bfed1df03f89cd1a4885ceafe918 Author: Aaron LI Date: Wed May 26 19:40:58 2021 +0800 x86_64/specialreg.h: Deprecate old defines of Spectre mitigation Migrate the old defines of Spectre mitigation to the new ones obtained from NetBSD and FreeBSD

git: x86_64/specialreg.h: Rename MSR_SYSENTER_* defines for consistency

2021-06-19 Thread Aaron LI
commit 05c3b54eba4dd0d32bdeffe384358eac23103f0a Author: Aaron LI Date: Tue May 11 14:18:42 2021 +0800 x86_64/specialreg.h: Rename MSR_SYSENTER_* defines for consistency Remove the _MSR suffix from these 3 MSR defines. Summary of changes: sys/cpu/x86_64/include/specialreg.h | 6

git: x86_64/specialreg.h: Add several MSR defines for NVMM

2021-06-19 Thread Aaron LI
commit 96abf295cceae8bf5fdf9fc300e96babad661a38 Author: Aaron LI Date: Tue May 11 14:19:55 2021 +0800 x86_64/specialreg.h: Add several MSR defines for NVMM * Add MSR_IA32_FLUSH_CMD define, together with one bit define. * Add various bit defines for MSR_IA32_MISC_ENABLE

git: x86_64/specialreg.h: Reorganize and sort various MSR defines

2021-06-19 Thread Aaron LI
commit 2dc35628584318d7d5730f484c43bbd72bd49445 Author: Aaron LI Date: Tue May 11 13:13:30 2021 +0800 x86_64/specialreg.h: Reorganize and sort various MSR defines Sort some MSR defines by their addresses. Reorganize some MSR bit defines to group with their corresponding

git: x86_64/specialreg.h: Rename two IA32_ARCH_* defines for consistency

2021-06-19 Thread Aaron LI
commit 41c6e41833cddf2be6e89b10a09c4847c9968c68 Author: Aaron LI Date: Tue May 11 13:18:43 2021 +0800 x86_64/specialreg.h: Rename two IA32_ARCH_* defines for consistency Rename IA32_ARCH_SSB_NO -> IA32_ARCH_CAP_SSB_NO, and IA32_ARCH_MDS_NO -> IA32_ARCH_CAP_MDS_NO, for

git: x86_64/specialreg.h: Rename several CR4 defines

2021-06-19 Thread Aaron LI
commit fb3360ae7302a04a037d7fd38233bb7709bc1785 Author: Aaron LI Date: Tue May 11 12:39:54 2021 +0800 x86_64/specialreg.h: Rename several CR4 defines Rename CR4_FXSR -> CR4_OSFXSR, CR4_XMM -> CR4_OSXMMEXCPT, and CR4_XSAVE -> CR4_OSXSAVE, so that they match t

git: x86_64/specialreg.h: Rename MSR_PERFCTRx to avoid #undef's

2021-06-19 Thread Aaron LI
commit d060dd23ef78103f961c2fa095c99b4d1524efc7 Author: Aaron LI Date: Tue May 11 01:06:00 2021 +0800 x86_64/specialreg.h: Rename MSR_PERFCTRx to avoid #undef's Rename MSR_PERFCTRx to MSR_K7_PERFCTRx, following the same names as in FreeBSD and NetBSD. This also avoids

git: x86_64/specialreg.h: Rename MSR_TSCAUX to MSR_TSC_AUX

2021-06-19 Thread Aaron LI
commit a7c3d10506f1d6086706ff2e50732c36566d076b Author: Aaron LI Date: Tue May 11 01:07:45 2021 +0800 x86_64/specialreg.h: Rename MSR_TSCAUX to MSR_TSC_AUX Align better with the specification, and FreeBSD also use it. Summary of changes: sys/cpu/x86_64/include/specialreg.h | 2

git: x86_64/specialreg.h: Improve MSR_AMD_VM_CR bits defines

2021-06-19 Thread Aaron LI
commit b2fc28ab8cda024debf50410f0a27ce3e4474ecd Author: Aaron LI Date: Tue May 11 00:44:13 2021 +0800 x86_64/specialreg.h: Improve MSR_AMD_VM_CR bits defines Rename bit define MSR_AMD_VM_CR_SVMDIS to VM_CR_SVMDIS for better consistency. Add more VM_CR bit defines

git: x86_64/specialreg.h: Add CPUID Fn8000_000A (AMD SVM) defines

2021-06-19 Thread Aaron LI
commit eb06f8987f134e93092dbe7a07a53b5f8e223792 Author: Aaron LI Date: Tue May 11 00:20:18 2021 +0800 x86_64/specialreg.h: Add CPUID Fn8000_000A (AMD SVM) defines These defines are taken from NetBSD, with comments from the AMD manual. Some of the defines will be used in NVMM

git: x86_64/specialreg.h: Add more CPUID Fn8000_0008 defines

2021-06-19 Thread Aaron LI
commit 0c0a2e78aace4e8658b3186758778644b7f19edb Author: Aaron LI Date: Tue May 11 00:14:21 2021 +0800 x86_64/specialreg.h: Add more CPUID Fn8000_0008 defines CPUID Fn8000_0008 - AMD Processor Capacity Parameters and Extended Features These CPUID defines are taken from

git: x86_64/specialreg.h: Improve CPUID Fn8000_0007 defines

2021-06-19 Thread Aaron LI
commit ceb3a337578626b6aa3b1736491315bd71c05e9a Author: Aaron LI Date: Tue May 11 00:08:37 2021 +0800 x86_64/specialreg.h: Improve CPUID Fn8000_0007 defines CPUID Fn8000_0007 - Advanced Power Management Add CPUID_APM_* defines with some comments, taken from NetBSD

git: x86_64/specialreg.h: Improve CPUID Fn8000_0001 defines

2021-06-19 Thread Aaron LI
commit 281bbd3c287c5decb6c5b198b223224b6835e232 Author: Aaron LI Date: Tue May 11 00:03:39 2021 +0800 x86_64/specialreg.h: Improve CPUID Fn8000_0001 defines CPUID Fn8000_0001 - Extended Features Add many more defines for this CPUID function, taken from NetBSD

git: x86_64/specialreg.h: Add CPUID Fn0000_000D defines

2021-06-19 Thread Aaron LI
commit 3ca0bf32e3c78c6adf67004276c4f88a75aa2282 Author: Aaron LI Date: Mon May 10 23:59:39 2021 +0800 x86_64/specialreg.h: Add CPUID Fn_000D defines Add CPUID Fn_000D (Processor Extended State Enumeration) defines, taken from NetBSD, and will be used by NVMM

git: x86_64/specialreg.h: Reorganize CPUID Fn0000_000B defines

2021-06-19 Thread Aaron LI
commit eaa6dfa6604a847f54550f10d7c5d66a6d56e7b0 Author: Aaron LI Date: Mon May 10 23:56:19 2021 +0800 x86_64/specialreg.h: Reorganize CPUID Fn_000B defines Summary of changes: sys/cpu/x86_64/include/specialreg.h | 28 ++-- 1 file changed, 14 insertions

git: x86_64/specialreg.h: Add various CPUID Fn0000_0007 defines

2021-06-19 Thread Aaron LI
commit 275d4ff718468f6fcd16dd955b9af8069e2e41fd Author: Aaron LI Date: Mon May 10 23:46:06 2021 +0800 x86_64/specialreg.h: Add various CPUID Fn_0007 defines These Structured Extended Features (SEF) defines are taken from FreeBSD, but with comments taken from NetBSD

git: x86_64/specialreg.h: Improve XCR0 defines a bit

2021-06-19 Thread Aaron LI
commit 7beb824d3201042b90bb69176b83cbb07b2f8e35 Author: Aaron LI Date: Mon May 10 23:17:04 2021 +0800 x86_64/specialreg.h: Improve XCR0 defines a bit * Move XCR0 defines CPU_XFEATURE_* before the CPUID feature defines, so the CPUID/AMDID defines groups better. * Add

git: x86_64/specialreg.h: Improve CPUID Fn0000_000[456] feature defines

2021-06-19 Thread Aaron LI
commit 06f581a070f14d52b938fdf5a99fa26eec64af62 Author: Aaron LI Date: Mon May 10 23:39:27 2021 +0800 x86_64/specialreg.h: Improve CPUID Fn_000[456] feature defines * Reorganize these define groups in CPUID function ordering. * Add basic comments to various items (mostly

git: x86_64/specialreg.h: Remove CPUID_XMM alias to favor CPUID_SSE

2021-06-19 Thread Aaron LI
commit 9463bdaf8eab470ffb65e978661492204c945967 Author: Aaron LI Date: Sat Jun 19 12:16:45 2021 +0800 x86_64/specialreg.h: Remove CPUID_XMM alias to favor CPUID_SSE The CPUID_XMM is defined as an alias to CPUID_SSE. So just remove CPUID_XMM and always use CPUID_SSE instead

git: x86_64/specialreg.h: Improve CPUID Fn0000_0001 feature defines

2021-06-19 Thread Aaron LI
commit f7d6196283d717c6f62c0d35101f22b67fae89b5 Author: Aaron LI Date: Mon May 10 22:36:39 2021 +0800 x86_64/specialreg.h: Improve CPUID Fn_0001 feature defines * Add/improve comments to various feature defines. * Add some missing feature defines. * Remove unused

git: x86_64/specialreg.h: Add more defines for EFER bits

2021-06-19 Thread Aaron LI
commit 1d0dec791208ba85c1698bf2124d084f74b52244 Author: Aaron LI Date: Mon May 10 22:20:06 2021 +0800 x86_64/specialreg.h: Add more defines for EFER bits Add several more EFER bits define, and move them close to the MSR_EFER define to organize better. Taken from

git: x86_64/specialreg.h: Add more defines for CR4 bits

2021-06-19 Thread Aaron LI
commit 241e6c075c591c45ca2105623ff4ee74fe85a68e Author: Aaron LI Date: Mon May 10 22:16:21 2021 +0800 x86_64/specialreg.h: Add more defines for CR4 bits Taken from NetBSD and the submit in bug #3265 by chicken: https://bugs.dragonflybsd.org/issues/3265 Summary of changes

git: x86_64/specialreg.h: Add more defines for CR0 bits

2021-06-19 Thread Aaron LI
commit 8e7f036b77d2b2176f3cc83f7505dd06a12e2d3d Author: Aaron LI Date: Mon May 10 22:03:20 2021 +0800 x86_64/specialreg.h: Add more defines for CR0 bits Taken from NetBSD, also referred to FreeBSD. Specifically, CR0_ET is used by NVMM. Meanwhile, improve

git: x86_64/segments.h: Fix typo of an unused struct member

2021-06-19 Thread Aaron LI
commit 0661e0301ea4fde72eb6e11f51786c7f4fa0e4af Author: Aaron LI Date: Tue May 18 14:25:12 2021 +0800 x86_64/segments.h: Fix typo of an unused struct member Change memeber name 'sd_xx1' to 'gd_xx1' in 'struct gate_descriptor', so it aligns with other struct members. Summary

git: x86_64/segments.h: Add more system segment defines

2021-06-19 Thread Aaron LI
commit 9e9beaf9e8d48ad13dbd851a18b37a13368be12e Author: Aaron LI Date: Mon May 10 07:23:03 2021 +0800 x86_64/segments.h: Add more system segment defines Taken from FreeBSD (also referred to NetBSD). Specifically, SDT_SYS286BSY is used by NVMM. Also improve

git: include: Some minor cleanups to Makefile

2021-06-19 Thread Aaron LI
commit 0982c5b8fe1e7ae3862680d6d4edbd70aabb00db Author: Aaron LI Date: Thu May 27 18:39:44 2021 +0800 include: Some minor cleanups to Makefile * Remove a duplicate item (bus/cam) from LSUBDIRS. * Adjust and improve comments for LSUBDIRS and LSYMSUBDIRS. * Amend

git: libutil: Allow suffix to be NULL in humanize_{number, unsigned}()

2021-06-19 Thread Aaron LI
commit 70fef11b9d0a96af862fff4144190fd5e01f32a8 Author: Aaron LI Date: Thu May 27 19:13:05 2021 +0800 libutil: Allow suffix to be NULL in humanize_{number,unsigned}() Allow to pass NULL to the suffix argument to these two functions. If suffix is NULL, then take

git: libutil: Fix a minor NULL deref issue in humanize_number()

2021-06-19 Thread Aaron LI
commit 88b59fa59633f7b2abac3df68d3bc78f3c745c27 Author: Aaron LI Date: Thu May 27 19:10:10 2021 +0800 libutil: Fix a minor NULL deref issue in humanize_number() Modify buf after checking it's not NULL. Although it's certainly a misuse to pass a NULL as buf but with len >

git: libutil: Sort files in Makefile

2021-06-19 Thread Aaron LI
commit dc8bfbab3b1f98de86b4ddcba3c918bf9558afa3 Author: Aaron LI Date: Wed May 26 07:32:22 2021 +0800 libutil: Sort files in Makefile Summary of changes: lib/libutil/Makefile | 81 ++-- 1 file changed, 60 insertions(+), 21 deletions

git: libutil: Bring in snprintb() and snprintb_m() from NetBSD

2021-06-19 Thread Aaron LI
commit 1d3001ef599cad179a2b2ad4b24a0f002ecdf498 Author: Aaron LI Date: Wed May 26 07:20:56 2021 +0800 libutil: Bring in snprintb() and snprintb_m() from NetBSD At least, nvmmctl(8) requires snprintb(). Summary of changes: lib/libutil/Makefile | 9 +- lib/libutil/libutil.h

git: tools: Sync 'install.sh' options with install(1)

2021-06-19 Thread Aaron LI
commit 8e34d37ead753ad5cc9007eb252a057c8657cde4 Author: Aaron LI Date: Mon Jun 14 15:43:46 2021 +0800 tools: Sync 'install.sh' options with install(1) The 'install.sh' script should recognize all install(1) options so as to ignore them. Sync it with install(1) which has

git: devfs: Change typedef 'cdevpriv_dtr_t' to 'd_priv_dtor_t'

2021-06-19 Thread Aaron LI
commit d56bec7aafcb41e86a641fd56bc4a9c6ab068eb3 Author: Aaron LI Date: Tue May 25 12:15:34 2021 +0800 devfs: Change typedef 'cdevpriv_dtr_t' to 'd_priv_dtor_t' The original 'cdevpriv_dtr_t' typedef was not able to be used in a function prototype like the other d_xxx_t

git: devfs: Add man page for devfs_{set,get,clear}_cdevpriv()

2021-06-19 Thread Aaron LI
commit c470a9c00bc0525f671a380c3660c86dc22080b3 Author: Aaron LI Date: Tue May 25 12:28:29 2021 +0800 devfs: Add man page for devfs_{set,get,clear}_cdevpriv() Derived from FreeBSD's devfs_set_cdevpriv.9 man page. Summary of changes: share/man/man9/Makefile | 3

git: DragonFly_RELEASE_5_8 od(1): Fix alignment issue in long double (-t fL) output

2021-03-16 Thread Aaron LI
commit a6cc6d1e10a639a2e41c31bdd3dcdca87086ccf6 Author: Aaron LI Date: Tue Mar 16 17:36:26 2021 +0800 od(1): Fix alignment issue in long double (-t fL) output Long double has one more digit in the exponential besides the longer fractional digits. So the output width should

git: DragonFly_RELEASE_5_8 od(1): Fix long ints (L) format output on x86_64 platform

2021-03-16 Thread Aaron LI
commit 5d3d014a147e0fc085a8121e69091795d60bbb34 Author: dczheng Date: Mon Mar 15 17:11:04 2021 + od(1): Fix long ints (L) format output on x86_64 platform Long ints are of size 8 bytes on x86_64 platform, and the handle of 8-byte integers was missing in od(1)/hexdump(1).

git: od(1): Fix alignment issue in long double (-t fL) output

2021-03-16 Thread Aaron LI
commit 938b9b20f864712c95a17b38b3f9e131d401c3a7 Author: Aaron LI Date: Tue Mar 16 17:36:26 2021 +0800 od(1): Fix alignment issue in long double (-t fL) output Long double has one more digit in the exponential besides the longer fractional digits. So the output width should

git: od(1): Fix long ints (L) format output on x86_64 platform

2021-03-16 Thread Aaron LI
commit fc57cf9eef1482add27630b7c6d7ec8005b48da2 Author: dczheng Date: Mon Mar 15 17:11:04 2021 + od(1): Fix long ints (L) format output on x86_64 platform Long ints are of size 8 bytes on x86_64 platform, and the handle of 8-byte integers was missing in od(1)/hexdump(1).

git: killall.1: Mention pkill(1)

2021-03-12 Thread Aaron LI
commit b7ff6841b245bed746660c49b3700227e1fdd155 Author: Aaron LI Date: Fri Mar 12 09:26:05 2021 +0800 killall.1: Mention pkill(1) While there, group the -h, -? and -help options together so it looks clearer. Summary of changes: usr.bin/killall/killall.1 | 9 - 1

git: killall(1): Handle -h and -? options as described in man page

2021-03-12 Thread Aaron LI
commit 2faa2b55024da00499acf75ba21453903de0c1fc Author: dczheng Date: Thu Mar 11 23:33:40 2021 + killall(1): Handle -h and -? options as described in man page As described in its man page, options -h and -? are supported to print the help text, same as -help option.

git: pkill(1): Add option -T to restrict to current terminal

2021-03-10 Thread Aaron LI
commit a2d71d01f5b798e1d53f2052232e39f6d185faf6 Author: Levente Kurusa Date: Tue Dec 4 23:07:52 2018 +0100 pkill(1): Add option -T to restrict to current terminal This option is introduced for feature parity with killall(1) where it restricts to matching processes in the

git: cgram(6): Sync with NetBSD

2021-03-01 Thread Aaron LI
commit 4ed49c920e15bdfb481b90139d3c9cde7357f5a2 Author: Aaron LI Date: Wed Feb 24 22:16:45 2021 +0800 cgram(6): Sync with NetBSD * Properly handle input errors from child fortune(6) process. * Add advanced cursor movement with tab, shift+tab, return. * Fix the assertion

git: cgram(6): Don't move over the last char and fix an assertion

2021-02-22 Thread Aaron LI
commit 18d09f18cf4c93d9a07b8129fed0bdc0d0b967a7 Author: Aaron LI Date: Mon Feb 22 22:22:53 2021 +0800 cgram(6): Don't move over the last char and fix an assertion The maximum value of cursor_x was the text length and thus also *equaled* to extent_x, which broke the assertion

git: cgram(6): Sync the rewritten version from NetBSD

2021-02-22 Thread Aaron LI
commit 564d76995a9b0d872beace4bedee44a79e102dce Author: Aaron LI Date: Mon Feb 22 21:51:58 2021 +0800 cgram(6): Sync the rewritten version from NetBSD Fixes: * Do not consider the puzzle solved if all letters in the visible area are substituted correctly

git: DragonFly_RELEASE_5_8 grdc(6): Fix 100% CPU usage and make timeout work again

2021-02-21 Thread Aaron LI
commit 3e77f79f44e10f45b9577c79980287f57928d308 Author: Aaron LI Date: Sun Feb 21 12:02:19 2021 +0800 grdc(6): Fix 100% CPU usage and make timeout work again grdc(6) was passing a timespec with tv_nsec = 100*1000, which is invalid. So every nanosleep() call just returns

git: grdc(6): Add '-t' option to show time in 12-hour format

2021-02-21 Thread Aaron LI
commit ffe1d30b7611d4b27d06edc40cc191b74be21252 Author: Aaron LI Date: Sun Feb 21 16:12:49 2021 +0800 grdc(6): Add '-t' option to show time in 12-hour format Partially based on FreeBSD's implementation (revision 112749). But I moved the AM/PM mark to the upper-left corner

git: ching(6): More minor code cleanups

2021-02-21 Thread Aaron LI
commit d60ecdb4b9cebd874b9a7b12e82f625cce9f614b Author: Aaron LI Date: Sat Feb 20 22:47:08 2021 +0800 ching(6): More minor code cleanups Summary of changes: games/cgram/cgram.c | 43 +++ 1 file changed, 19 insertions(+), 24 deletions(-) http

git: ching(6): Fix HOME key to move to the beginning of line

2021-02-21 Thread Aaron LI
commit 359c8e75e0e1fea7155d310959ced55d80fcca14 Author: Aaron LI Date: Sun Feb 21 09:28:25 2021 +0800 ching(6): Fix HOME key to move to the beginning of line Summary of changes: games/cgram/cgram.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) http://gitweb.dragonflybsd.org

git: grdc(6): Improve handling of long scroll delays

2021-02-21 Thread Aaron LI
commit 9f62ef8c5664703913ebcf1f918e3559ab7806ba Author: Aaron LI Date: Sun Feb 21 13:05:42 2021 +0800 grdc(6): Improve handling of long scroll delays Add the scroll delay to the current time, so that the finally showed time matches the real current time. In addition

git: grdc(6): Fix 100% CPU usage and make timeout work again

2021-02-21 Thread Aaron LI
commit cf2f35f41de10cbe6d13ea1ae381dba3a5b08a55 Author: Aaron LI Date: Sun Feb 21 12:02:19 2021 +0800 grdc(6): Fix 100% CPU usage and make timeout work again grdc(6) was passing a timespec with tv_nsec = 100*1000, which is invalid. So every nanosleep() call just returns

git: games: Bring in cgram(6) from NetBSD

2021-02-21 Thread Aaron LI
commit 1efcf41be2ab5dc10b26e8830d8ad970f685cc8e Author: Aaron LI Date: Sat Feb 20 18:41:17 2021 +0800 games: Bring in cgram(6) from NetBSD cgram is a curses-based widget for solving Sunday-paper-type cryptograms based on substitution ciphers. A random cleartext is chosen

git: grdc(6): Allow 'q' to quit immediately

2021-02-21 Thread Aaron LI
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

git: cgram.6: Mention that cursor keys can also be used

2021-02-21 Thread Aaron LI
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

git: grdc(6): Improve scrolling timestamp precisions

2021-02-21 Thread Aaron LI
commit 6159ff08e48698c1e9482f2b02adc457b88d4d71 Author: Aaron LI Date: Sun Feb 21 15:48:46 2021 +0800 grdc(6): Improve scrolling timestamp precisions Use clock_gettime() to obtain the current time with higher precision, which is used to improve the scrolling timestamp

git: grdc(6): Various code cleanups

2021-02-21 Thread Aaron LI
commit 7b8d5f41223d4cefae24cc6968f9663fad01e75b Author: Aaron LI Date: Sun Feb 21 12:23:19 2021 +0800 grdc(6): Various code cleanups * Staticize various variables and functions. * Reduce file-global variables. * Minor style updates. * Add a copyright header (as did

git: cgram(6): Reformat code styles

2021-02-21 Thread Aaron LI
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

git: games: Bring in gomoku(6) from NetBSD

2021-02-21 Thread Aaron LI
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

git: games: Bring in monop(6) from NetBSD

2021-02-21 Thread Aaron LI
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

git: ching(6): Simplify the sed expression

2021-02-21 Thread Aaron LI
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

git: ching.6: Mention mandoc(1) together with nroff(1)

2021-02-21 Thread Aaron LI
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

git: fexecve(2): Return ENOENT if exec a script opened with O_CLOEXEC

2021-02-20 Thread Aaron LI
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

git: Implement the fexecve(2) system call

2021-02-20 Thread Aaron LI
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

git: kern: Clean error paths in kern_execve()

2021-02-20 Thread Aaron LI
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

git: kern: Return error from exec_copyin_strings() if fname copy failed

2021-02-20 Thread Aaron LI
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

git: kern: Staticize several functions and variables in kern_exec.c

2021-02-20 Thread Aaron LI
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

git: execve.2: Document reopening of standard descriptors

2021-02-20 Thread Aaron LI
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

git: execve(2): Minor markup improvements

2021-02-20 Thread Aaron LI
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

git: ching(6): Tweak roff(7) macros to properly format with mandoc(1)

2021-02-19 Thread Aaron LI
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

git: ching(6): Support to format with mandoc(1)

2021-02-19 Thread Aaron LI
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

git: games: Bring in ching(6) -- The Book of Changes -- from NetBSD

2021-02-19 Thread Aaron LI
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

git: libthread_xu: Add clock_nanosleep symbols to pthread.map

2021-02-19 Thread Aaron LI
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

git: rc.d/mounttmpfs: Avoid duplicate tmpfs mount at /tmp

2021-02-14 Thread Aaron LI
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

git: clock_settime(2): Return EINVAL if tv_sec < 0

2021-01-20 Thread Aaron LI
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 chan

git: : Remove a deprecated and duplicate union member

2021-01-20 Thread Aaron LI
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

git: syscall.9: Add some missing info and fix outdated contents

2021-01-20 Thread Aaron LI
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

git: : Remove unused forward declarations

2021-01-20 Thread Aaron LI
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

git: Use 'sysmsg_result' macro for consistency

2021-01-20 Thread Aaron LI
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

git: : Add missing copyright and license header

2021-01-19 Thread Aaron LI
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

git: Implement clock_nanosleep(2) system call

2021-01-19 Thread Aaron LI
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

git: nanosleep(2): Plug a memory disclourse and be POSIX-compliant

2021-01-19 Thread Aaron LI
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

git: nanosleep(2): Return EINVAL if tv_sec < 0 (POSIX-compliant)

2021-01-19 Thread Aaron LI
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

git: kern/makesyscalls.sh: Revert change to '#endif' comment

2021-01-19 Thread Aaron LI
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

git: : Regenerate after 'makesyscalls.sh' update

2021-01-19 Thread Aaron LI
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

git: kern/makesyscalls.sh: Better place #undef and fix #endif comments

2021-01-19 Thread Aaron LI
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

git: test/vmm: Refactor Makefile by using

2021-01-19 Thread Aaron LI
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

git: Use ${} instead of $() in various makefiles

2021-01-19 Thread Aaron LI
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

git: timeout(1): Add -v/--verbose option to show diagnosis info

2021-01-02 Thread Aaron LI
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

git: timeout(1): Reduce some duplicate code

2021-01-02 Thread Aaron LI
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

git: timeout(1): Some minor tweaks and improvements

2021-01-02 Thread Aaron LI
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

git: Import timeout(1) from FreeBSD

2021-01-02 Thread Aaron LI
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

git: timeout(1): Port to DragonFly

2021-01-02 Thread Aaron LI
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

git: libutil: Add sockaddr_snprintf() (taken from NetBSD).

2021-01-02 Thread Aaron LI
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:

git: Import getaddrinfo(1) from FreeBSD

2021-01-02 Thread Aaron LI
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

git: setbuf.3: Mention stdbuf(1) and update HISTORY & BUGS sections

2021-01-01 Thread Aaron LI
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

git: Import stdbuf(1) together with libstdbuf(3) from FreeBSD

2021-01-01 Thread Aaron LI
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

git: libc/gen/devname.c: No need to include

2020-12-31 Thread Aaron LI
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

git: Remove obsolete dev_mkdb(8)

2020-12-31 Thread Aaron LI
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

git: devname.3: Add a little example

2020-12-31 Thread Aaron LI
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

git: devname(3): Remove obsolete code that queries dev.db

2020-12-31 Thread Aaron LI
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

<    1   2   3   4   5   6   7   >