14975 Commits

Author SHA1 Message Date
bdrewery
3d4b7b45ca MFC r291081:
Rename checked-in 'includes' to 'includes.sh' to avoid colliding with
  share/mk target 'make includes'.
2015-12-04 18:39:57 +00:00
bdrewery
ca2c0718a7 MFC r290084:
Remove unneeded NAME override.
2015-12-04 18:22:31 +00:00
bdrewery
21a7306566 MFC r290083:
Use more appropriate ${SHAREDIR} rather than /usr/share.
2015-12-04 18:21:05 +00:00
des
72c7e45913 MFH (r287917, r287918, r289063): upgrade to latest Unbound
MFH (r283301, r289592, r291582): rc script improvements
MFH (r287880): respect manually configured forwarders when using DHCP
MFH (r289321): deconfuse man page

PR:		184047 203580 204931
2015-12-04 13:26:12 +00:00
mav
426cc1280e MFC r290615: Introduce portal group options in ctl.conf.
While CTL has concept of port options, used at least for iSCSI ports now,
before this change it was impossible to set them manually.  There still
no user-configurable port options now, but I am planning to change that.
2015-11-27 15:19:36 +00:00
hselasky
fd44bd05b4 MFC r291145:
Fix scancodes for Kana and Eisu keys.

PR:		204709
2015-11-24 12:25:34 +00:00
ngie
0e1eba29eb MFC r290645:
Fix some trivial warnings with bootparamd/main.c

- Convert K&R to something a bit less ancient
- Remove an incorrect, duplicate prototype for bootparamprog_1(..)

PR: 71667
Submitted by: bcran
Sponsored by: EMC / Isilon Storage Division
2015-11-19 00:14:23 +00:00
ngie
2eb395533f Bump .Dd 2015-11-15 20:49:03 +00:00
ngie
56148b3223 MFC r290259,r290601:
r290259:

Sync makefs(8) content a bit with src/usr.sbin/makefs/makefs.8@1.53

Sections involving unimplemented filesystems (chfs, msdosfs, udf, v7fs) and
options have been omitted.

Obtained from: NetBSD
Sponsored by: EMC / Isilon Storage Division

r290601:

Follow up to r290259 dealing with makefs(8)

- Don't use contractions (don't -> do not)
- Change "throw away" to "discard" when describing the -o keep-bad-images option
- Revert author e-mail split I brought over from NetBSD, effectively reverting
  the change bapt made in r267668

Submitted by: bjk
Sponsored by: EMC / Isilon Storage Division
2015-11-15 20:48:10 +00:00
ngie
1688d7a0b1 MFC r290260,r290262:
r290260:

Document undocumented long options for -t cd9660

Note which options have been implemented and which options haven't
been implemented

Submitted as the following NetBSD PRs: bin/50390 and bin/50392

Sponsored by: EMC / Isilon Storage Division

r290262:

Fix spelling of `isolevel` cd9660 option

Sponsored by: EMC / Isilon Storage Division
2015-11-15 20:44:01 +00:00
delphij
2222968ca1 MFC r290174:
In pw_userlock, set 'name' to NULL when we encounter an all number string
because it is also used as an indicator of whether a name or an UID is
being used and we may have undefined results as 'name' may contain
uninitialized stack contents.
2015-11-15 07:14:17 +00:00
delphij
0db8d82692 MFC r290173:
Use strlcpy().
2015-11-15 07:10:02 +00:00
jhb
eef9ad01d6 MFC 290412:
Note if relaxed ordering or no snoop is enabled for each PCI-express device.
2015-11-13 22:33:51 +00:00
ngie
f1478935ff MFC r266930,r289225:
r266930 (by jmg):

convert to using the _daddr_t types like newfs was...

Put the superblock in the correct possition for UFS2... There is a bug
in FFS that if we don't put it here (for UFS2), it will forcefully
relocate the superblock, and I believe cause data loss..

I have a fix for that, but w/ how many releases are broken, we won't be
able to switch to the better _FLOPPY (block 0) for this for a while..

r289225 (by sbruno):

makefs(8) leaves sblock.fs_providersize uninitialized (zero) that can be easily
checked with dumpfs(8). This may lead to other problems, f.e. geom_label kernel
module sanity checks do not like zero fs_old_size value and skips such UFS1
file system while tasting (fs_old_size derives from sblock.fs_providersize).

PR:	203704
Submitted by:	eugen@grosbein.net
Reviewed by:	marcel
2015-11-09 09:28:34 +00:00
ngie
5af653d140 MFC r290268:
Sync minor whitespace / type changes in ffs_csum_swap and ffs_sb_swap with
src/sys/ufs/ffs/ffs_bswap.c@1.39

Obtained from: NetBSD
Sponsored by: EMC / Isilon Storage Division
2015-11-09 09:23:35 +00:00
ngie
3142453fa3 MFC r290264:
Limit isoLevel to 1 and 2 to avoid segfaulting when isoLevel is set to 3 by
dereferencing a NULL function pointer

Add some asserts to ensure that isolevel is always either 1 or 2.

PR: 203645
Reported by: Thomas Schmitt <scdbackup@gmx.net>
Sponsored by: EMC / Isilon Storage Division
2015-11-09 09:22:11 +00:00
ngie
b57d6dcae3 MFC r290265,r290267,r290270:
r290265:

Add testcases for -t cd9660 -o isolevel=[1-3]

-- -o isolevel=1 currently fails because of path comparison issues,
   so mark it as an expected failure.
-- -o isolevel=3 is not implemented, so expect it to fail as an out
   of bounds value [*].

PR: 203645
Sponsored by: EMC / Isilon Storage Division

r290267:

Clean up mtree keyword support a slight bit and add a few more default keywords

- Parameterize the mtree keywords as $DEFAULT_MTREE_KEYWORDS
- Test with the extra mtree keywords, `mode,gid,uid`.
- Add a note about mtrees with time support not working with makefs right now

Sponsored by: EMC / Isilon Storage Division

r290270:

Add testcases for -t ffs -o version=[12]

Verify the filesystem type using dumpfs. Add preliminary support
for NetBSD (needs to be validated)

Sponsored by: EMC / Isilon Storage Division
2015-11-09 09:20:01 +00:00
ngie
cc0f248e7c MFC r289902:
Add a regression test for r289899 to validate rockridge encoding
of device types

Sponsored by: EMC / Isilon Storage Division
2015-11-09 09:04:11 +00:00
ngie
e62170cbe6 MFC r289899:
Import the fix from NetBSD kern/48852 (sic) to fix rockridge encoding of
device nodes

In particular, use st_rdev (the device type), not st_dev (the device inode),
and fix the comparison to be correct with the st_rdev field

Bug 203648
Submitted by: Thomas Schmitt <scdbackup@gmx.net>
Coverity CID: 1008927
Sponsored by: EMC / Isilon Storage Division
2015-11-09 09:03:24 +00:00
ngie
d82b6ff939 MFC r289203,r290180:
r289203 (by adrian):

makefs: introduce a new option to specify what to round the resulting
image up to.

From ticket:

While trying to run FreeBSD/mips on some device having very small flash media,
one is forced to compress file system with mkulzma(8) utility. It is desirable
to specify small UFS block/fragment sizes like 4096/512 bytes for makefs(8)
and big compression block size like 65535 bytes to mkulzma at the same time.
Then one obtains very good comression ratios (like 75% and more) but faces
the following problem.

geom_uncompress kernel module reports GEOM provider size rounded up to its
compression block size. Generally, this changes original media size and now
it fails to match the size of embedded UFS file system that leads to other
problems, f.e. geom_label kernel module does not like this and skips the
file system while tasting the GEOM and looking for UFS label.

This makes it impossible to refer to the file system using known UFS label
instead of something like /dev/map/rootfs.uncompress.

The following patch introduces new command line option "-r roundup" for makefs
that makes it round up the image to specified block size. Hence, geom_uncompress
does not change GEOM media size for images rounded that way and geom_label
accepts such GEOMs just fine.

With the patch applied, one can use following commands:

$ makefs -t ffs -r 65536 -o bsize=4096,fsize=512,label=flash optimization=space fs.img fs
$ mkulzma -s 65536 -o fs.img.ulzma fs.img

PR:		bin/203707
Submitted by:	<eugen@grosbein.net>

r290180:

Follow up to roundup feature addition in r289203

- Rename -r to -R to avoid the clash with makefs -r in NetBSD
- Note that -R is an FFS-specific option because it's not implemented
  in cd9660 today
- Rename the roundup variable to "roundup-size" in the manpage and help
  text for consistency with other variables.
- Bump .Dd (missed in r289203)

PR: 203707
Differential Revision: https://reviews.freebsd.org/D3959
Reviewed by: adrian (earlier patch), emaste
Sponsored by: EMC / Isilon Storage Division
2015-11-09 08:59:55 +00:00
ngie
f79bd9b3f6 MFC r289687,r289693:
r289687:

Free buffer before returning from cd9660_write_path_table to avoid
leaking it after returning from the function

PR: 203647
Submitted by: Thomas Schmitt <scdbackup@gmx.net>
Coverity CID: 978431
Sponsored by: EMC / Isilon Storage Division

r289693:

Unbreak makefs -t cd9660 after r289687

buffer_head needs to be freed -- not buffer

Detected by jemalloc, i.e. running makefs failed the arena assert
because my copy of malloc on CURRENT is compiled with the default
!MALLOC_PRODUCTION asserts on

Pointyhat to: ngie
PR: 203647
Sponsored by: EMC / Isilon Storage Division
2015-11-09 08:03:15 +00:00
ngie
bc7ac4fb8b MFC r289739,r289743,r289897,r289901:
r289739:

Correctly reintroduce the rudimentary smoke tests I botched up
in r289684

Sponsored by: EMC / Isilon Storage Division

r289743:

Revise "create_test_inputs" to simplify the file structure as
these testcases don't need to be nested as much as bin/ls/ls_tests.sh
do when verifying ls -a, ls -A, etc. This allows the tests to make
all paths relative to the top of the temporary directory instead of
always tacking on $ATF_TMPDIR, thus complicating things unnecessarily

Create non-empty files in create_test_inputs as well now, similar to
create_test_inputs2 in bin/ls/ls_tests.sh

Compare the input files to the output file contents using diff where
possible:
- Skip over the fifo comparison for now because it always fails
- Skip over the symlink comparison on cd9660 because it always fails
  today

Sponsored by: EMC / Isilon Storage Division

r289897:

Add more cd9660/FFS makefs testcases

General changes:
- Parameterize out the mount command.
- Use mtree to verify the contents of an image (check_image_contents) instead
  of using diff (diff verifies content, but not file metadata).
- Move common logic out to functions (common_cleanup, mount_image,
  check_image_contents)
- Add stub testcases for makefs -D (crashes with SIGBUS, similar to bug # 192839)
- Add a note about the ISO-9660 and rockridge specs
- Add testcases that exercise:
-- Creating disk images from an mtree and multiple directories.
-- -F flag use (not really an extensive testcase right now)

cd9660-specific test changes:

- Remove an XXX comment about symlinks; I forgot that non-rockridge images turn
  symlinks into hardlinks.
- Add testcases that exercise:
-- -o allow-deep-trees
-- -o allow-max-name stub testcase (doesn't seem to be implemented in makefs)
-- -o preparer (existence in image; not conformance to spec)
-- -o publisher (existence in image; not conformance to spec)
-- -o rockridge (basic)

Sponsored by: EMC / Isilon Storage Division

r289901:

Remove an ls -l I was using for debugging

Sponsored by: EMC / Isilon Storage Division
2015-11-09 07:56:06 +00:00
ngie
4d013aec81 MFC r290182:
Fix rtsold's usage message

- Remove -a from the usage message example dealing with specific
  interfaces. -a only makes sense when not specifying an interface,
  such that it's to be run on all interfaces
- Fix the pidfile option (it's -p, not -P)
- Change `interfaces` to `interface` to match the manpage

PR: 173744
Sponsored by: EMC / Isilon Storage Division
2015-11-09 07:07:25 +00:00
emax
94580a0106 MFC r289637
check boundaries while parsing SDP responses

Reported by:	hps
Reviewed by:	hps
2015-11-05 16:08:38 +00:00
ngie
6244443504 MFC r289746:
Exit with a user-friendly message instead of tripping an assert
if vm_activate_cpu(..) fails when called from fbsdrun_addcpu(..)

PR: 203884
Reviewed by: grehan
Submitted by: William Orr <will@worrbase.com>
2015-11-05 08:27:45 +00:00
dteske
2f6ac8211d MFC r287413: Minor code cleanups (no functional changes). 2015-11-02 22:56:10 +00:00
dteske
9c72dfc636 MFC r287390: Bump version for altered long-opts processing 2015-11-02 22:55:25 +00:00
dteske
6d490545cd MFC r287389: Simplify long-option processing 2015-11-02 22:54:45 +00:00
dteske
468b412653 MFC r287385: Bump version for prior fix (SVN r287381) 2015-11-02 22:42:07 +00:00
dteske
4a9ba34e5f MFC r287384:
Style: Remove whitespace around brackets from function syntax options
2015-11-02 22:37:56 +00:00
dteske
7ef4dc7baa MFC r287383: Comment for escape() function. 2015-11-02 22:35:48 +00:00
dteske
bbb0bf0718 MFC r287382: Comment 2015-11-02 22:33:34 +00:00
dteske
d82df1ca6e MFC r287381: Properly escape arguments when moving into jail or chroot 2015-11-02 22:32:59 +00:00
dteske
6f21d4f39f MFC r287380: Style: comments 2015-11-02 22:32:13 +00:00
dteske
d17f948c64 MFC r287379: Style consistency: add single space before each `;;' case entry 2015-11-02 22:31:32 +00:00
dteske
69dc80f482 MFC r287378:
Remove `SYSRC_' prefix from $SYSRC_VERBOSE (prefix unnecessary since
 this is a non-inheritable attribute; was previously).
2015-11-02 22:30:55 +00:00
dteske
2c0c536f59 MFC r287421: Fix mandoc(1) "WARNING: end of line whitespace" 2015-11-02 22:24:57 +00:00
dteske
8c0c186c65 Snap to breuffer's r286660 (incorrectly merged) 2015-11-02 22:22:48 +00:00
dteske
1bffadb22b MFC r287420: Remove non-functional examples. 2015-11-02 22:12:51 +00:00
dteske
8fd4a44c75 MFC r287683: Ignore error results from newaliases(1) 2015-11-02 22:11:19 +00:00
dteske
b61918fd35 MFC r287685: Remove use of return outside of function 2015-11-02 22:10:39 +00:00
dteske
f8362e9d6c MFC r287686: Produce meaningful exit code 2015-11-02 22:09:43 +00:00
dteske
ee854dc81d MFC r287687: Update copyrights 2015-11-02 22:08:59 +00:00
dteske
334ccc01af MFC r287688: Explicitly exit with success 2015-11-02 22:08:11 +00:00
dteske
14185b9813 MFC r287689: Explicitly exit with success 2015-11-02 22:07:25 +00:00
dteske
f8f428460f MFC r287690: Produce meaningful exit code 2015-11-02 22:06:44 +00:00
dteske
9d735decd6 MFC r287691: Remove trailing newline at EOF 2015-11-02 22:05:41 +00:00
dteske
50d3f9bbb4 MFC r287694: Use a variable for readability 2015-11-02 22:05:04 +00:00
dteske
8701ebe105 MFC r287695: Replace `return' outside of function with exit
Pointy hat to:	me
2015-11-02 22:04:22 +00:00
dteske
2123c18eab MFC r287692: Better to reset trap and explicitly exit success 2015-11-02 22:03:24 +00:00