John Marino [Mon, 29 Aug 2016 13:21:47 +0000 (08:21 -0500)]
Merge branch 'vendor/BMAKE'
John Marino [Mon, 29 Aug 2016 17:10:29 +0000 (12:10 -0500)]
contrib/bmake: remove 2 local modifications to prepare for merge
Matthew Dillon [Mon, 29 Aug 2016 18:15:51 +0000 (11:15 -0700)]
kernel - Fix coredump race with threaded processes
* Fix an issue where a threaded process trying to coredump could race
and cause some threads to get stuck in tstop() when the main thread
is trying to finally exit. This creates an unkillable blocked process.
Reported-by: zrj, marino
Matthew Dillon [Mon, 29 Aug 2016 17:43:14 +0000 (10:43 -0700)]
kernel - Remove coredump spew on console
* Remove coredump warnings on the console when descriptors cannot be
converted to file-handles in the coredump (NFS related descriptors
typ).
Matthew Dillon [Mon, 29 Aug 2016 17:27:57 +0000 (10:27 -0700)]
kernel - Attempt to fix panic during shutdown from tmpfs
* When doing a forced-unmount on tmpfs an active vnode may wind up
staying on the mount's dirty worklist, resulting in an assertion.
* Try to handle the case by forcefully removing the vnode from the dirty
worklist in the forced-unmount case.
Reported-by: zrj (Rimvydas Jasinskas)
Matthew Dillon [Mon, 29 Aug 2016 17:26:14 +0000 (10:26 -0700)]
kernel - Fix STOP/CONT race
* Normally we should not be in LSSLEEP in the tsleep resume code, but a
pending signal related to STOP/CONT or TSTOP/TCONT can cause us
to skip the sleep and an interrupt race can change the lp status from
STOP to SLEEP. Make sure we are back in the RUN state.
John Marino [Mon, 29 Aug 2016 16:40:03 +0000 (11:40 -0500)]
Update to bmake-
20160818 on the vendor branch
John Marino [Mon, 29 Aug 2016 08:35:26 +0000 (10:35 +0200)]
Remove NO_OPENSSH variable functionality
There doesn't seem to be a legit use case for building with OpenSSL but
without ssh. Remove the ability to do so to simplify makefiles which
also has the benefit of reducing the number of make.conf options.
The ssh program and openssh private library only consume about 2Mb.
Tomohiro Kusumi [Mon, 29 Aug 2016 15:28:02 +0000 (00:28 +0900)]
sys/vfs/hammer: Use typedef'd for struct hammer_inode_data*
The whole hammer code is mix of using struct and typedef'd.
Use typedef'd because majority of the code use typedef'd.
Tomohiro Kusumi [Mon, 29 Aug 2016 15:25:28 +0000 (00:25 +0900)]
sys/vfs/hammer: Use typedef'd for struct hammer_snapshot_data*
The whole hammer code is mix of using struct and typedef'd.
Use typedef'd because majority of the code use typedef'd.
Tomohiro Kusumi [Mon, 29 Aug 2016 15:10:18 +0000 (00:10 +0900)]
sys/vfs/hammer: Add typedefs for ondisk structures without typedefs
Some ondisk data structures have typedefs, but others don't.
Tomohiro Kusumi [Mon, 29 Aug 2016 13:13:21 +0000 (22:13 +0900)]
sys/kern: Make struct buf::b_dep a member of union
struct buf::b_dep being a list head is too specific to UFS.
HAMMER or other filesystems want this to be a void* pointer.
It also forces HAMMER or other filesystems to define their own
struct worklist because no such struct is defined outside of
the UFS source which is insane in terms of a kernel structure
for general blk i/o.
Also see
71199586f.
Tomohiro Kusumi [Mon, 29 Aug 2016 11:24:14 +0000 (20:24 +0900)]
sbin/hammer: Fix irrelevant comments
Tomohiro Kusumi [Mon, 29 Aug 2016 11:16:39 +0000 (20:16 +0900)]
sbin/hammer: Sync zone statistics format with print_blockmap()
Tomohiro Kusumi [Mon, 29 Aug 2016 10:45:37 +0000 (19:45 +0900)]
sbin/hammer: Don't expose softprune specific data structure
Expose softprune function rather than both function and data structure.
Sascha Wildner [Sun, 28 Aug 2016 20:38:08 +0000 (22:38 +0200)]
mount_{cd9660,ntfs}(8): Link dynamically to enable -C again.
Sascha Wildner [Sun, 28 Aug 2016 20:36:54 +0000 (22:36 +0200)]
mount_cd9660(8): Add -b and -j to usage().
Imre Vadász [Sun, 24 Jul 2016 18:54:35 +0000 (20:54 +0200)]
if_iwm - Add some pcie device stop code from iwlwifi. Adjust a delay.
* Make iwm_apm_stop put the device in Uninitialized state, like in iwlwifi.
* Add a device reset from iwlwifi to iwm_apm_stop, and make the DELAY
after device reset in iwm_apm_init match the duration in iwlwifi.
* Swap iwm_disable_interrupts() and on-board processor reset in
iwm_stop_device() corresponding to Linux git commit
03d6c3b0fa4f5f0379cede079ec828a6c999fe43.
Taken-From: Linux iwlwifi
Imre Vadász [Sun, 28 Aug 2016 15:46:39 +0000 (17:46 +0200)]
if_iwm - Use htole16 for policy field in struct iwm_time_event_cmd_v2.
* This didn't really matter on DragonFly, which currently only runs on a
little-endian architecture.
Tomohiro Kusumi [Sun, 28 Aug 2016 14:13:11 +0000 (23:13 +0900)]
sys/vfs/hammer: Remove unused struct hammer_io_list
This struct is no longer used after
1afb73cf in 2011.
Tomohiro Kusumi [Sun, 28 Aug 2016 14:08:01 +0000 (23:08 +0900)]
sys/vfs/hammer: Use typedef'd for enum hammer_io_type
Tomohiro Kusumi [Sun, 28 Aug 2016 13:27:20 +0000 (22:27 +0900)]
sys/vfs/hammer: Typedef struct on declaration
Most structs in hammer are typedef'd.
Some structs define it on declaration, but others don't.
Imre Vadász [Sun, 28 Aug 2016 13:29:09 +0000 (15:29 +0200)]
if_iwm - Fix comments and struct definition for struct iwm_sf_cfg_cmd.
* Use uint32_t instead of "enum iwm_sf_state" for the state field in
struct iwm_sf_cfg_cmd, because that struct is declared __packed.
Taken-From: FreeBSD (the typos in struct iwm_sf_cfg_cmd comments)
Imre Vadász [Sun, 28 Aug 2016 13:21:14 +0000 (15:21 +0200)]
if_iwm - Remove unused wantresp field in iwm_rx_data struct.
Imre Vadász [Sat, 27 Aug 2016 20:11:59 +0000 (22:11 +0200)]
if_iwm - Remove two duplicate const qualifiers.
Tomohiro Kusumi [Sun, 28 Aug 2016 10:23:52 +0000 (19:23 +0900)]
sys/vfs/hammer: Remove prototypes for not existing functions
Tomohiro Kusumi [Sun, 28 Aug 2016 11:06:34 +0000 (20:06 +0900)]
sys/vfs/hammer: Use typedef'd for struct hammer_mount*
The whole hammer code is mix of using struct and typedef'd.
Use typedef'd because majority of the code use typedef'd.
The last 17 commits including this one don't affect binary.
Tomohiro Kusumi [Sun, 28 Aug 2016 10:57:03 +0000 (19:57 +0900)]
sys/vfs/hammer: Use typedef'd for struct hammer_node_lock*
The whole hammer code is mix of using struct and typedef'd.
Use typedef'd because majority of the code use typedef'd.
Tomohiro Kusumi [Sun, 28 Aug 2016 10:54:55 +0000 (19:54 +0900)]
sys/vfs/hammer: Use typedef'd for struct hammer_node*
The whole hammer code is mix of using struct and typedef'd.
Use typedef'd because majority of the code use typedef'd.
Tomohiro Kusumi [Sun, 28 Aug 2016 10:50:24 +0000 (19:50 +0900)]
sys/vfs/hammer: Use typedef'd for struct hammer_buffer*
The whole hammer code is mix of using struct and typedef'd.
Use typedef'd because majority of the code use typedef'd.
Tomohiro Kusumi [Sun, 28 Aug 2016 10:22:07 +0000 (19:22 +0900)]
sys/vfs/hammer: Use typedef'd for struct hammer_volume*
The whole hammer code is mix of using struct and typedef'd.
Use typedef'd because majority of the code use typedef'd.
Tomohiro Kusumi [Sun, 28 Aug 2016 10:14:23 +0000 (19:14 +0900)]
sys/vfs/hammer: Use typedef'd for struct hammer_io*
The whole hammer code is mix of using struct and typedef'd.
Use typedef'd because majority of the code use typedef'd.
Tomohiro Kusumi [Sun, 28 Aug 2016 09:10:42 +0000 (18:10 +0900)]
sys/vfs/hammer: Use typedef'd for struct hammer_record*
The whole hammer code is mix of using struct and typedef'd.
Use typedef'd because majority of the code use typedef'd.
Tomohiro Kusumi [Sun, 28 Aug 2016 09:08:02 +0000 (18:08 +0900)]
sys/vfs/hammer: Use typedef'd for struct hammer_inode*
The whole hammer code is mix of using struct and typedef'd.
Use typedef'd because majority of the code use typedef'd.
Tomohiro Kusumi [Sun, 28 Aug 2016 08:58:23 +0000 (17:58 +0900)]
sys/vfs/hammer: Use typedef'd for struct hammer_transaction*
The whole hammer code is mix of using struct and typedef'd.
Use typedef'd because majority of the code use typedef'd.
Tomohiro Kusumi [Sun, 28 Aug 2016 08:39:50 +0000 (17:39 +0900)]
sys/vfs/hammer: Use typedef'd for struct hammer_node_ondisk*
The whole hammer code is mix of using struct and typedef'd.
Use typedef'd because majority of the code use typedef'd.
Tomohiro Kusumi [Sun, 28 Aug 2016 08:28:43 +0000 (17:28 +0900)]
sys/vfs/hammer: Use typedef'd for struct hammer_btree_leaf_elm*
The whole hammer code is mix of using struct and typedef'd.
Use typedef'd because majority of the code use typedef'd.
Tomohiro Kusumi [Sun, 28 Aug 2016 07:57:19 +0000 (16:57 +0900)]
sys/vfs/hammer: Use typedef'd for struct hammer_base_elm*
The whole hammer code is mix of using struct and typedef'd.
Use typedef'd because majority of the code use typedef'd.
Tomohiro Kusumi [Sun, 28 Aug 2016 07:50:56 +0000 (16:50 +0900)]
sys/vfs/hammer: Use typedef'd for union hammer_data_ondisk*
The whole hammer code is mix of using struct and typedef'd.
Use typedef'd because majority of the code use typedef'd.
Tomohiro Kusumi [Sun, 28 Aug 2016 07:48:42 +0000 (16:48 +0900)]
sys/vfs/hammer: Use typedef'd for struct hammer_pseudofs_data*
The whole hammer code is mix of using struct and typedef'd.
Use typedef'd because majority of the code use typedef'd.
Tomohiro Kusumi [Sun, 28 Aug 2016 07:46:09 +0000 (16:46 +0900)]
sys/vfs/hammer: Conform to typical hammer code format
Tomohiro Kusumi [Sun, 28 Aug 2016 07:38:55 +0000 (16:38 +0900)]
sys/vfs/hammer: Use typedef'd for struct hammer_volume_ondisk*
The whole hammer code is mix of using struct and typedef'd.
Use typedef'd because majority of the code use typedef'd.
Tomohiro Kusumi [Sun, 28 Aug 2016 07:22:30 +0000 (16:22 +0900)]
sys/vfs/hammer: Use typedef'd for struct hammer_blockmap_xxx*
The whole hammer code is mix of using struct and typedef'd.
Use typedef'd because majority of the code use typedef'd.
Sascha Wildner [Sun, 28 Aug 2016 09:30:24 +0000 (11:30 +0200)]
Link mount_msdos(8) dynamically.
This makes -L and -D work properly.
It used to work statically linked but that code was all overwritten
in
0d5acd7467.
Tested-by: Ivan Bezrodny <ivan.bezrodny@gmail.com>
Sascha Wildner [Sun, 28 Aug 2016 09:26:41 +0000 (11:26 +0200)]
<sys/iconv.h>: Fix typo in a comment (taken from FreeBSD).
Sascha Wildner [Sun, 28 Aug 2016 09:25:45 +0000 (11:25 +0200)]
kernel/libiconv: Sync with FreeBSD.
Sascha Wildner [Sun, 28 Aug 2016 09:24:17 +0000 (11:24 +0200)]
libkiconv: Sync a bit with FreeBSD.
* Adds kiconv_lookupconv() and kiconv_lookupcs().
* It also moves libkiconv to /lib in preparation for linking various
mount_*(8) tools which have locale/charset support dynamically.
Sascha Wildner [Sun, 28 Aug 2016 08:14:34 +0000 (10:14 +0200)]
libkiconv: Remove dead code.
ICONV_DLOPEN is never defined on DragonFly because we build iconv()
into libc by default.
John Marino [Sun, 28 Aug 2016 00:30:07 +0000 (02:30 +0200)]
gcc50: Upgrade version 5.3.1 => 5.4.1 + 3 months
John Marino [Sat, 27 Aug 2016 20:25:21 +0000 (22:25 +0200)]
Merge branch 'vendor/GCC50'
John Marino [Sun, 28 Aug 2016 00:05:50 +0000 (02:05 +0200)]
Update gcc-50 to SVN version 239798 (gcc-5-branch)
This is equivalent to the gcc 5.4 release + 3 months
Last Changed Date: 2016-08-27 02:16:05 +0200 (Sat, 27 Aug 2016)
Tomohiro Kusumi [Sat, 27 Aug 2016 09:29:45 +0000 (18:29 +0900)]
sbin/hammer: Use . for pfs-status if no arg
hammer pfs-status can take 1 or more args unlike other pfs-xxx,
so allow 0 arg for default ".".
Tomohiro Kusumi [Sat, 27 Aug 2016 03:48:57 +0000 (12:48 +0900)]
sys/vfs/hammer: Remove wrong comment
Tomohiro Kusumi [Sat, 27 Aug 2016 02:13:30 +0000 (11:13 +0900)]
sbin/hammer: Use "objid" for inode#
"objid" is a commonly used one in kprintf as well as this command.
so change "obj", "ino" to "objid" which are all inode#.
Tomohiro Kusumi [Thu, 25 Aug 2016 12:40:12 +0000 (21:40 +0900)]
sbin/newfs_hammer: Set HAMMER_OBJTYPE_DIRECTORY for ondisk PFS#0 data
Ondisk PFS data is a record part of the root ip (inode) when
a new PFS is created via ioctl, so it's normal for ondisk PFS
data to have HAMMER_OBJTYPE_DIRECTORY for obj_type. It's
rather insane that PFS#0 (the only PFS created without ioctl)
has 0 (HAMMER_OBJTYPE_UNKNOWN) for obj_type while the root ip
(not PFS root but HAMMER root) is apparently a directory.
Although PFS#0 and the rest of the PFS are a bit different,
PFS ioctls treat all the ondisk PFS data in the same fashion.
Having consistent obj_type value for the same data type is
considered better than not having.
This change does affect 1 byte of ondisk PFS#0 data initially
created by newfs_hammer, but doesn't break compatibility.
Also see hammer_mkroot_pseudofs().
Sepherosa Ziehau [Wed, 24 Aug 2016 11:36:33 +0000 (19:36 +0800)]
acpi: Save I/O ports for I/O ports range, as long as its reasonable.
Reported-by: karu.pruun <karu.pruun gmail com>
Tomohiro Kusumi [Wed, 24 Aug 2016 10:54:31 +0000 (19:54 +0900)]
sbin/hammer: Sync
dce7ae2c format with zone statistics
Add "zone #" and change "next_tid" to "vol0_next_tid".
Sascha Wildner [Wed, 24 Aug 2016 11:51:14 +0000 (13:51 +0200)]
Correct some spelling mistakes/typos in manual pages.
Tomohiro Kusumi [Tue, 23 Aug 2016 14:48:35 +0000 (23:48 +0900)]
lib/libhammer: Fix segmentation fault by null dereference
If libhammer cares about mountpoints of hammer and null,
it needs to care about the case where pfs0 happens to be NULL.
This occurs when a PFS(>#0) is null mounted on the mountpoint of PFS#0.
This commit avoids segmentation fault, but that doesn't mean the
result is correct. It's basically that this library doesn't fully
consider the complexity of ondisk PFS data within HAMMER's B-Tree.
Sascha Wildner [Tue, 23 Aug 2016 13:21:05 +0000 (15:21 +0200)]
Add/fix some HISTORY sections in bin/ manual pages.
Submitted-by: Sevan Janiyan
Dragonfly-bugs: 2937-2945
Tomohiro Kusumi [Tue, 23 Aug 2016 10:59:26 +0000 (19:59 +0900)]
sbin/hammer: Don't print mountpoint of PFS
/sbin/hammer should not care if PFS are null mounted or where PFS are
mounted. It has nothing to do with the filesystem itself. PFS is just
a pointer to jump into a subset of HAMMER's B-Tree (clustered by
localization parameter). Just because DragonFly's installer used to
use PFS (not anymore) and null mount by default doesn't mean /sbin
/hammer needs to provide null mount info.
If someone does mount PFS to somewhere and want to know where PFS are
mounted, one needs to just type mount. In fact this is much better
than getting mountpoints info via hammer info command because mount(8)
doesn't use hammer's ioctl which may cause B-Tree lookup, but instead
retrieves mountpoints directly from vfs.
Also note that printing such info gives users wrong assumption that
PFS in HAMMER is something equivalent of ZFS (created out of storage
zpool) which is not true. As mentioned above, PFS is just a pointer to
a subset of a single HAMMER filesystem. These are not independent fs.
Also note that hammer info still has bugs due to bugs from libhammer
and its attached ioctl as mentioned in
e0f42079, including things under
investigation now. Whatever it is, hammer info needs to be rewritten
(as a different command like hammer fsinfo) in short and straight
forward code like other commands, without unnecessary abstraction.
I've been fixing and adding missing stuff to this hammer info command,
however hammer info is basically going nowhere because this command is
too tightly attached to libhammer.
Peter Avalos [Mon, 22 Aug 2016 22:09:18 +0000 (15:09 -0700)]
Allow make.conf to override ssh's xauth location.
This allows dports to install xauth based on the make.conf definition,
and was the original reason this functionality was added in
eb12d1cc.
Note that this is a slightly different implementation than
eb12d1cc.
This centralizes the definition instead of scattering it across multiple
Makefiles. Also, since we're doing this via a Makefile, revert the
change to vendor code in
e00185f1.
Requested-by: swildner, marino
Tomohiro Kusumi [Mon, 22 Aug 2016 12:23:32 +0000 (21:23 +0900)]
sbin/hammer: Make sizetostr() print B if <1KB
Tomohiro Kusumi [Sun, 21 Aug 2016 12:16:19 +0000 (21:16 +0900)]
sbin/hammer: Add print_blockmap() for common blockmap output format
This is for hammer blockmap,checkmap,show,show-undo commands.
These hammer commands print blockmap information prior to checking
whatever filesystem structure they're looking for, with slightly
different format but essentially the same thing.
print_blockmap() defines a common format so that these commands
can print blockmap information in the same format. print_blockmap()
is based on hammer blockmap command's output format since it has
the best readable format.
Tomohiro Kusumi [Sun, 21 Aug 2016 07:49:54 +0000 (16:49 +0900)]
sbin/hammer: Make get_buffer() static
This is always called via other get functions (but not directly)
from various hammer commands.
zrj [Sun, 21 Aug 2016 08:30:47 +0000 (11:30 +0300)]
buildworld - bootstrap compatibility compiling older DragonFly's
* Fix buildworld issue bootstrapping gencat/uudecode utilities which does not
expect newer header files (POSIX getline general visibility from <stdio.h>).
Could be MFC'd to DragonFly 4.6 branch for easier switching <-> master.
zrj [Sat, 20 Aug 2016 15:10:40 +0000 (18:10 +0300)]
lib/libexecinfo: Fix sysctl wrong argument order.
Not fatal, procfs fallback should still work (provided /proc is mounted).
Thus fix and prefer using the KERN_PROC_PATHNAME variant.
zrj [Sat, 20 Aug 2016 14:41:23 +0000 (17:41 +0300)]
sed(1): Fix issue with basename()/dirname() invoke.
Use copies when calling these POSIX functions.
Taken-from: FreeBSD r303047
zrj [Fri, 19 Aug 2016 11:07:27 +0000 (14:07 +0300)]
libc/readpassphrase: Sync with OpenBSD
Mainly for better terminal and signal handling.
Also include few fixes done by FreeBSD.
Taken-from: FreeBSD
zrj [Fri, 19 Aug 2016 10:39:18 +0000 (13:39 +0300)]
Sync arc4random() with OpenBSD a bit.
Simplify calculation of "2**32 % upper_bound".
While there, perform some stylistic changes.
Taken-from: OpenBSD
Tomohiro Kusumi [Sun, 21 Aug 2016 06:45:30 +0000 (15:45 +0900)]
sbin/hammer: Remove unused AssertOnFailure
After the previous commit, AssertOnFailure is no longer needed
as a global variable. It can be removed or replaced with DebugOpt
which is what AssertOnFailure was based on in some commands.
Tomohiro Kusumi [Sun, 21 Aug 2016 06:07:30 +0000 (15:07 +0900)]
sbin/hammer: Remove AssertOnFailure assertion in blockmap lookup
This isn't necessary as blockmap_lookup() callers are going to
check returned offset and/or *errorp value. Callers don't want
blockmap_lookup() to kill the process instantly via errx()
especially when the callers are diagnostic commands like hammer
show or blockmap or checkmap.
This is also the only place where AssertOnFailure needs to be
a global variable. Once this gets removed, other ones can be
removed or changed to local variables.
Tomohiro Kusumi [Sun, 21 Aug 2016 02:02:57 +0000 (11:02 +0900)]
sbin/hammer: Drop bug fix by
750beaef after
9376f71b
Since ondisk PFS data is no longer degraded or updated,
a bug fix made by
750beaef in 2015 can be removed.
Tomohiro Kusumi [Thu, 18 Aug 2016 14:00:44 +0000 (23:00 +0900)]
sbin/hammer: Don't ioctl(SET_PFS) before attempt to destroy PFS
This is part 1/2 of what's mentioned in below post.
Two ondisk PFS data (deleted PFS followed by undeleted PFS data) will
still appear with this commit, like what's mentioned in below post.
(This comes from HAMMER's flushing mechanism, so it's basically a bad
idea to try to fix it unless it's possible without touching core part
of HAMMER's flusher code, provided that this extra ondisk PFS data
does nothing bad. This may be fixed in the future as part 2/2 patch.)
http://lists.dragonflybsd.org/pipermail/users/2016-August/313004.html
This part 1/2 patch alone is still effective even without part 2/2.
If the PFS is successfully destroyed, the ondisk PFS data written by
ioctl(HAMMERIOC_SET_PSEUDOFS) prior to destroying (which is the code
removed by this commit) gets shadowed by the one with deleted flag,
so no one is to (or no one needs to) access that.
If failed to destroy the PFS, the original ondisk PFS data is restored
using a copy of the original data, so ioctl(HAMMERIOC_SET_PSEUDOFS)
prior to destroying is still unnecessary. Also see
750beaef.
Restoring part by
750beaef could be removed too since the PFS is not
downgraded or updated anymore.
Tomohiro Kusumi [Sat, 20 Aug 2016 04:14:54 +0000 (13:14 +0900)]
sys/vfs/hammer: Add comments on filesystem capacity
Tomohiro Kusumi [Sat, 20 Aug 2016 04:01:56 +0000 (13:01 +0900)]
sys/vfs/hammer: Integrate ondisk uint32 reserveds into []
Reserved field id's aren't in order from 00 to 11, so keeping them
with id's isn't that important, but rather confusing.
Also remove obsolete comment from
ddfdf542 in 2008.
The idea of "birth time" was never explained in neither source nor
commit messages.
Sascha Wildner [Thu, 18 Aug 2016 20:10:16 +0000 (22:10 +0200)]
kernel/msdosfs: Add pathconf(3) support for FILESIZEBITS.
Sascha Wildner [Thu, 18 Aug 2016 20:08:12 +0000 (22:08 +0200)]
kernel/msdosfs: Sort pathconf cases in msdosfs_pathconf().
While here, break a long line.
Sascha Wildner [Thu, 18 Aug 2016 20:03:11 +0000 (22:03 +0200)]
kernel/vfs: Sort pathconf cases in the default pathconf.
Tomohiro Kusumi [Thu, 18 Aug 2016 14:25:11 +0000 (23:25 +0900)]
sys/vfs/hammer: Remove unused HAMMER_IOC_PFS_XXX macros
These were added in
5fa5c92f in 2008, but never used.
Tomohiro Kusumi [Thu, 18 Aug 2016 12:35:39 +0000 (21:35 +0900)]
sbin/hammer: Remove if(QuietOpt) conditionals in hammer show/checkmap
mostly since it doesn't make much difference anyway.
The only QuietOpt conditional left is for print_record(elm) in
print_btree_elm() which makes amount of output text quite diffrent.
Tomohiro Kusumi [Thu, 18 Aug 2016 11:33:58 +0000 (20:33 +0900)]
sbin/hammer: Add inode size check to hammer show
Do the same sanity check as what hammer_crc_set|test_leaf()
do in kernel space.
Tomohiro Kusumi [Thu, 18 Aug 2016 11:28:55 +0000 (20:28 +0900)]
sbin/hammer: Minor hammer show cleanups
Tomohiro Kusumi [Wed, 17 Aug 2016 11:08:01 +0000 (20:08 +0900)]
sys/vfs/hammer: Fix wrong comment and unnecessary argument
B-Tree code isn't aware of PFS (or other HAMMER record types built
on top of B-Tree) by design. In fact pfsm argument is unused and
no longer necessary after sometime in 2008.
Tomohiro Kusumi [Tue, 16 Aug 2016 11:45:44 +0000 (20:45 +0900)]
sbin/hammer: Fix memory leak
strsep moves * by taking **, so the caller need to keep a pointer to strdup'd address.
Tomohiro Kusumi [Tue, 16 Aug 2016 11:11:46 +0000 (20:11 +0900)]
sbin/hammer: Refactoring
Tomohiro Kusumi [Mon, 15 Aug 2016 12:11:31 +0000 (21:11 +0900)]
sbin/newfs_hammer: Add -h option
Tomohiro Kusumi [Mon, 15 Aug 2016 12:06:14 +0000 (21:06 +0900)]
sbin/newfs_hammer: Add exit_code arg to usage()
Tomohiro Kusumi [Mon, 15 Aug 2016 11:48:37 +0000 (20:48 +0900)]
sbin/hammer: Cleanups
Tomohiro Kusumi [Sun, 14 Aug 2016 15:54:05 +0000 (00:54 +0900)]
sbin/newfs_hammer: Add -C option from hammer(8)
Just to support the same options given that these are both based
on the same volume/buffer structure.
Sascha Wildner [Mon, 15 Aug 2016 06:45:33 +0000 (08:45 +0200)]
Update the pciconf(8) database.
July 31, 2016 snapshot from http://pciids.sourceforge.net/
Tomohiro Kusumi [Sun, 14 Aug 2016 06:37:03 +0000 (15:37 +0900)]
sys/vfs/hammer: Drop redundant error initialization
error is always 0 when it hits here.
(It would have already returned non-zero error otherwise)
Tomohiro Kusumi [Sat, 13 Aug 2016 07:03:39 +0000 (16:03 +0900)]
sys/vfs/hammer: Rename HAMMERIOC_PFS_ITERATE to HAMMERIOC_SCAN_PSEUDOFS
The name of this ioctl is misleading.
It has nothing to do with iteration, as all it does is a single lookup.
This ioctl is just a variant of the existing HAMMER_IOC_GET_PSEUDOFS
as mentioned in the previous commit.
This commit breaks userspace, and requires buildworld, though it
only affects libhammer and hammer info command. See the previous
commit for justification of doing this.
Tomohiro Kusumi [Sat, 13 Aug 2016 05:52:29 +0000 (14:52 +0900)]
sys/vfs/hammer: Change/Fix ioctl API for HAMMERIOC_PFS_ITERATE
Rewrite hammer_ioc_iterate_pseudofs() as a proper hammer ioctl.
This commit requires buildworld, but it only affects libhammer and
hammer info command.
This ioctl has had lots of design issues as mentioned in
898f9540
and
d8c56f70 in 2015. This ioctl is also just a variant of the
existing HAMMER_IOC_GET_PSEUDOFS which originally existed before
HAMMERIOC_PFS_ITERATE was added.
(It can't be replaced with HAMMER_IOC_GET_PSEUDOFS at the moment,
because of the difference in handling ondisk PFS data with deleted
flag set, but it should be replaced or removed in the future.
This interface is too tightly coupled with libhammer that no one
else really needs this, and there is a way to do the same thing
without using this ioctl. There is also a possible bug that comes
from the way this ioctl and libhammer is assuming about PFS data
with deleted flag set)
This commit breaks userspace that's been directly using this ioctl,
but I doubt anyone has done except for libhammer, as the existence
of such an ioctl has never been mentioned in DragonFly manpages or
other documents. Also note that this ioctl was added for libhammer,
so no one else is likely to really care about it.
Tomohiro Kusumi [Sat, 13 Aug 2016 04:29:17 +0000 (13:29 +0900)]
sbin/hammer: Cleanups
Peter Avalos [Sun, 14 Aug 2016 02:50:50 +0000 (19:50 -0700)]
Unbreak build.
Somehow I forgot to include version.h in the servconf.c change that
appended our DragonFly-specific VersionAddendum to sshd.
Peter Avalos [Sat, 13 Aug 2016 21:54:53 +0000 (14:54 -0700)]
Patch ssh vendor code for xauth's default location.
This puts the change in one obvious place instead of scattering it
around different Makefiles and makes documention correct.
Peter Avalos [Sat, 13 Aug 2016 20:49:59 +0000 (13:49 -0700)]
sshd(8): Disable tunneled cleartext passwords.
This was previously our default that got wiped away when I removed our
local changes to OpenSSH. It's unlikely that anyone running master saw
any change to their sshd behavior, because they likely had the
PasswordAuthentication line uncommented in their configuration file.
Sascha Wildner [Sat, 13 Aug 2016 19:24:19 +0000 (21:24 +0200)]
<sys/errno.h>: Use __BSD_VISIBLE instead of !_POSIX_SOURCE.
_POSIX_SOURCE is no longer set since it was superseded by
_POSIX_C_SOURCE. In other words, #ifndef _POSIX_SOURCE is
always true, unless IEEE Std 1003.1-1988 is explicitly
requested.
While here, clean up the visibility of all errno defines.
Those not mentioned in any standard are __BSD_VISIBLE now.
We can further restrict the standard ones at some later
point.
Sascha Wildner [Sat, 13 Aug 2016 19:23:54 +0000 (21:23 +0200)]
<sys/errno.h>: Adjust whitespace (no functional change).