Commit Graph

14271 Commits

Author SHA1 Message Date
Mark Johnston
601848d2b2 Include descriptions of the flags and fields printed when dumping the
IPv6 prefix list.

Reviewed by:	hrs
MFC after:	1 week
2013-05-23 19:50:36 +00:00
Mark Johnston
dcc8e5487b Correct the description of the -a option: rtsol(d) -a will in fact send out
router solicitations on multiple interfaces.

Reviewed by:	hrs
MFC after:	1 week
2013-05-23 19:47:35 +00:00
Jung-uk Kim
9c5a52cf88 Work around build breakages with GCC 4.2.
Reported by:	tinderbox
2013-05-23 05:42:35 +00:00
Peter Wemm
41b886b61c Don't mess with /etc/localtime if it is a symlink. 2013-05-22 19:00:05 +00:00
Jung-uk Kim
a9d8d09c46 Merge ACPICA 20130517. 2013-05-20 23:52:49 +00:00
Bryan Drewery
a261d76121 Update location to ports INDEX file.
PR:		bin/164561
Approved by:	bapt
2013-05-18 19:18:03 +00:00
Konstantin Belousov
5d6787cfb2 Decode new HT 3.00 and 3.10 capabilities.
Submitted by:	Dmitry Luhtionov <dmitryluhtionov@gmail.com>
MFC after:	1 week
2013-05-17 14:05:31 +00:00
Dag-Erling Smørgrav
75f75375d4 Add a -N option that prints the jail name rather than its number.
MFC after:	3 weeks
2013-05-17 08:48:16 +00:00
Devin Teske
f82ca17bbe Fix a typo in a comment. 2013-05-16 16:51:52 +00:00
Devin Teske
60d8a2b517 Add a handy function for truncating variables to a specific byte-length. It
should be noted that newlines are both preserved and included in said byte-
count. If you want to truncate single-line values without regard to line
termination, there's always f_substr() which already exists herein.
2013-05-16 16:46:02 +00:00
Devin Teske
c3755aa30c Centralize standard getopts arguments, both for convenience and to correct
a bug in which certain combinations of arguments produced unexpected results
such as `-dX' (now properly produces debugging and X11), `-XS' (now properly
produces X11 in secure mode), `-df-' (enables debugging when reading a
script from standard-input, etc. Multi-word variations such as `-d -X',
`-X -S', `-d -f-', `-d -f -', etc. also work as expected. Also tested were
variations in argument order, which are now working as expected.
2013-05-14 03:21:13 +00:00
Marcel Moolenaar
a92b168892 Set st_nlink in the stat structure within the inode to 1 as well.
The cd9660 file system uses that field for the link count and it
was 0. This impacts pwd_mkdb(8) as it checks for st_nlink not being
0 as part of closing a race.
2013-05-13 18:34:33 +00:00
Joel Dahl
37b983c09b mdoc sweep 2013-05-13 18:13:50 +00:00
Mark Johnston
252d859338 Add a remark to the effect that a manually started relearn will always
result in the battery being completely drained, even in transparent learning
mode.

MFC in:		3 days
Sponsored by:	Sandvine Inc.
2013-05-13 15:00:36 +00:00
Joel Dahl
2710751bc3 mdoc sweep. 2013-05-12 22:22:12 +00:00
Mikolaj Golub
e0505d2826 Revert r250394, which disabled snmp_hast due to libl dependency issue --
the dependency has been removed in r250503.
2013-05-12 13:42:49 +00:00
Mark Johnston
3cc26586e6 Some filesystems (NFS in particular) do not fill out the d_type field when
returning directory entries through readdir(3). In this case we need to
obtain the file type ourselves; otherwise newsyslog -t will not be able to
find archived log files and will fail to both delete old log files and to
do interval-based rotations properly.

Reported by:	jilles
Reviewed by:	jilles
MFC after:	2 weeks
2013-05-12 01:58:04 +00:00
Devin Teske
20b371f541 Comment. 2013-05-12 00:50:18 +00:00
Devin Teske
5cf9b06b6b Fix i18n violations in the package management module. A few words like
`packages', `installed', and `selected' were not internationalized.
2013-05-12 00:46:18 +00:00
Devin Teske
cfde4beeda Remove duplicated string. 2013-05-12 00:44:40 +00:00
Devin Teske
a104b9056a Comments. 2013-05-12 00:40:49 +00:00
Devin Teske
4f82901ca5 Whitespace. 2013-05-12 00:39:25 +00:00
Eitan Adler
ffa7c28828 Teach wpa_supplicant to properly compute wireless signal strength.
PR:		bin/170631
Submitted by:	Daan Vreeken <Daan@vitsch.nl>
Reviewed by:	adrian
2013-05-11 20:55:14 +00:00
Antoine Brodin
290b7b224a Add some missing DPADD. 2013-05-11 13:46:05 +00:00
Eitan Adler
a8de143c02 The M_VESA_MODE_MAX is latest valid mode - not the first invalid.
Permit its use in vidcontrol -i

PR:		bin/119483
Submitted by:	Dan Lukes <dan@obluda.cz>
Arrival-Date:	Wed Jan 09 10:30:01 UTC 2008
Reviewed by:	ed
MFC after:	3 days
2013-05-11 13:32:38 +00:00
Gleb Smirnoff
5d81d09598 Rate limit the number of remotely triggered ARP log messages
to 1 log message per second.
2013-05-11 10:51:32 +00:00
Mikolaj Golub
1df892f44c Get rid of libl dependency. We needed it only to provide yywrap. But
yywrap is not necessary when parsing a single hast.conf file.

Suggested by:	kib
Reviewed by:	pjd
2013-05-11 09:51:44 +00:00
Eitan Adler
1bfbcedae9 Permit relative paths with mergemaster -m
Reviewed by:	dim, brooks
MFC after:	3 days
2013-05-10 17:42:13 +00:00
Eitan Adler
7a2b450ff8 Fxi a bunch of typos.
PR:	misc/174625
Submitted by:	Jeremy Chadwick <jdc@koitsu.org>
2013-05-10 16:41:26 +00:00
Jaakko Heinonen
4343d321e2 Check the return value of sbuf_finish().
MFC after:	1 week
2013-05-10 09:58:32 +00:00
Devin Teske
a28232e303 Fix a bug that would cause the category menu to display the wrong value
for number of packages available in the "All" category. Problem caused by
re-using a variable that was still needed; fixed by variable name change.
2013-05-09 16:09:39 +00:00
Brooks Davis
43e8dbd316 Remove duplicated copies of various NetBSD compatibility shims used by
makefs and use libnetbsd, contrib/mtree, and contrib/mknod instead.

Sponsored by:	DARPA, AFRLo
MFC after:	1 month
2013-05-09 14:43:36 +00:00
Mikolaj Golub
198ee3001d Move snmp_hast manual to section 3, where all other manual pages for
bsnmp modules are located.

Section 3 (Library Functions) looks wrong for this manual page, which
contains only module description, that is why initially it was located
to section 8 (System Manager's Manual).  On the other hand manual
pages for all other bsnmpd modules are already located in the section
3, and having all pages in one section looks more consistent.  Also,
currently, similarly to manuals for other modules, snmp_hast manual
contains LIBRARY section, which is not good style for section 8.

Requested by:	joel
X-MFC with:	r250379
2013-05-09 11:10:46 +00:00
Peter Wemm
35fdad8420 Unbreak build - this can only build on i386 as-is due to use of libl in
a .so file, and we currently (intentionally) only build libl.a.
2013-05-08 23:30:24 +00:00
Mikolaj Golub
7297a2ff53 HAST module for bsnmpd(1).
Reviewed by:	harti, pjd
MFC after:	2 weeks
2013-05-08 20:03:37 +00:00
Devin Teske
87c1627502 Commit first portion of package module -- this includes the ability to view
categories, view packages, mark packages for installation, de-installation,
or re-installation, calculate and track dependencies, as well as ability to
review selections.

Still to come is the actual processing of selections (performing the
various actions associated with the user's selections, such as installing
dependencies first, then selections, etc.).
2013-05-07 05:40:20 +00:00
Devin Teske
7f6380ef8d Explicitly track "script.subr" which wasn't showing up in the graph because
it's not used by anything within bsdconfig nor any modules (rather, the
script.subr include is designed to be used externally -- nonetheless we
want to track it in the modular graph outputs showing includes).
2013-05-07 04:47:56 +00:00
Devin Teske
8f1dd43b55 Recursively calculate includes. This solves the problem of some includes
missing from the graph, but it also unfortunately forces yet another bug
in graphviz dot(1) to appear. When edge labels are enabled (using '\T')
with this many edges, dot(1) will do bad things in init_rank() and often
crash. So while we're here, let's disable edge labels for the include-
relationship graph feature.
2013-05-07 04:46:08 +00:00
Devin Teske
7de72ac1f8 Remove unused variables. 2013-05-07 04:40:57 +00:00
Devin Teske
a185dd378c Alphabetize strings by variable names. 2013-05-07 04:23:50 +00:00
Devin Teske
24e8d2827a Re-organize and add missing installVarDefaults and mediaSetDirectory. 2013-05-07 04:03:59 +00:00
Devin Teske
1d17434b64 Add f_isset() utility subroutine for checking if a variable is set but in
a more readable fashion.
2013-05-07 03:57:45 +00:00
Hiren Panchasara
28a83c9fc1 objdump output changed indentation from 1 space to 2 spaces somewhere between
FreeBSD9 and CURRENT. Removing this rather unnecessary check which expects the
second character of assembly line to be a hex number to make pmcannotate
actually annotate the code and assembly.

PR: 165654
Submitted by:	Vitaly Magerya <vmagerya@gmail.com>
Reviewed by:	attilio
Approved by:	sbruno (mentor)
MFC after:	3 weeks
2013-05-06 18:30:49 +00:00
Eitan Adler
a32ae73071 Fix a typo in an error message.
Obtained From:	DragonFlyBSD (commit 66e72101cc32272ae370b895ca3d9e3e99c5c3a8)
2013-05-06 17:21:28 +00:00
Jung-uk Kim
a7880d59c9 Improve compatibility with recent flex from flex.sourceforge.net. 2013-05-03 23:51:32 +00:00
Neel Natu
b1f3124565 Implement the NOTIFY_ON_EMPTY capability in the virtio-net device.
If this capability is negotiated by the guest then the device will
generate an interrupt when it runs out of available tx/rx descriptors.

Reviewed by:	grehan
Obtained from:	NetApp
2013-05-03 01:16:18 +00:00
Rick Macklem
d1e9aa46c5 Fix the getpwuid_r() call in the gssd daemon so that it handles
the ERANGE error return case. Without this fix, authentication
of users for certain system setups could fail unexpectedly.

Reported by:	Elias Martenson (lokedhs@gmail.com)
Tested by:	Elias Martenson (earlier version)
MFC after:	2 weeks
2013-05-02 12:43:56 +00:00
Rick Macklem
2eec079956 Document the fact that an NFSv4 mount against a volume on the same host
can result in a hung NFS server and is not recommended.
This is a content change.

MFC after:	2 weeks
2013-05-01 22:50:45 +00:00
Wojciech A. Koszek
7002629c49 Make the internal assertion correct--only fail when '\0' is found in
places other than the end of the test section. Otherwise, with kernel
compiled with Clang which happens to be setting ELF section alignment
differently config(8) was throwing assert() failure unnecessarily

Reported by:	Kimmo Paasiala <kpaasial (at) gmail.com>
Tested by:	Kimmo Paasiala <kpaasial (at) gmail.com>
MFC after:	10 days
2013-05-01 05:14:59 +00:00
Neel Natu
3b207d1e34 Reset some more softc state when the guest resets the virtio network device.
Obtained from:	NetApp
2013-04-30 01:14:54 +00:00
Neel Natu
2a80be7b2b Use a separate mutex for the receive path instead of overloading the softc
mutex for this purpose.

Reviewed by:	grehan
2013-04-30 00:36:16 +00:00
Neel Natu
88d1272e3c Get rid of the 'vsc_rxpend' state - it doesn't serve any purpose because we
drop any frames that arrive while the device is starved for receive buffers.

This makes the receive path to only execute in context of the receive thread
and allows for further simplification.

Reviewed by:	grehan
2013-04-28 01:02:59 +00:00
Jilles Tjoelker
f35bb1a01e syslogd: Use closefrom() instead of getdtablesize()/close() loop.
When syslogd forks a process for '|' destinations, it closes all file
descriptors greater than 2.

Use closefrom() for this instead of a getdtablesize()/close() loop because
it is both faster and avoids leaving file descriptors open because the limit
was lowered after they were opened.

MFC after:	1 week
2013-04-27 13:26:35 +00:00
Devin Teske
f780b9f529 Properly sanitize --menu results (guards against Gtk library warnings from
X11 side of things from bleeding into Xdialog(1) stderr output). It should
be duely noted that such errors are not a by-product of anything in the
Xdialog(1) utility or API, but optional libraries that it can link against
(such as Gtk1 versus Gtk2; if you compile xdialog from ports against Gtk2
AND misconfigure your fonts or generally make Gtk2 unhappy, these warning
messages can bleed into the captured stderr -- that is we we sanitize!).
2013-04-26 21:28:24 +00:00
Devin Teske
76c853ae67 Comments. 2013-04-26 21:19:05 +00:00
Peter Grehan
199fee4ea3 Use a thread for the processing of virtio tx descriptors rather
than blocking the vCPU thread. This improves bulk data performance
by ~30-40% and doesn't harm req/resp time for stock netperf runs.

Future work will use a thread pool rather than a thread per tx queue.

Submitted by:	Dinakar Medavaram
Reviewed by:	neel, grehan
Obtained from:	NetApp
2013-04-26 05:13:48 +00:00
Neel Natu
b05c77ff84 Gripe if some <slot,function> tuple is specified more than once instead of
silently overwriting the previous assignment.

Gripe if the emulation is not recognized instead of silently ignoring the
emulated device.

If an error is detected by pci_parse_slot() then exit from the command line
parsing loop in main().

Submitted by (initial version):	Chris Torek (chris.torek@gmail.com)
2013-04-26 02:24:50 +00:00
Brooks Davis
20e0cc0abb Use the system MAKEOBJDIRPREFIX when running make targets in
mergemaster.  This allows bootstrap verions of tools to be used.

Add a note to UPDATING about this change.

Discussed with:	jhb
Sponsored by:	DARPA, AFRL
MFC after:	5 days
2013-04-25 21:19:50 +00:00
Devin Teske
89efe20ff6 Fix copy/paste error. 2013-04-24 03:15:55 +00:00
Devin Teske
cd35d3c349 Add missing include. 2013-04-23 22:55:59 +00:00
Jung-uk Kim
d5af120c3b Fix declarations to slightly increase WARNS level. 2013-04-23 19:42:45 +00:00
Jung-uk Kim
1be30821d9 Clean up generated files added in r233250. 2013-04-23 19:29:49 +00:00
Neel Natu
3bf0823c5c Teach the virtio block device to deal with direct as well as indirect
descriptors. Prior to this change the device would only work with guests
that chose to use indirect descriptors.

Modify the device reset callback to actually reset the device state.

Submitted by:	Tycho Nightingale (tycho.nightingale@pluribusnetworks.com)
2013-04-23 16:40:39 +00:00
Devin Teske
2e35ea7323 Prevent device.subr from auto-loading in the nameservers module.
This module doesn't need device support (but device.subr is loaded
indirectly through media/tcpip.subr which contains resolv stuff).
2013-04-23 00:10:33 +00:00
Devin Teske
dcfa0eb36f Preserve debugFile preference across the exec boundary. 2013-04-22 21:19:44 +00:00
Devin Teske
d4fd7c1336 Partially uncommit r249779. The changes to share/common.subr were good
while the remaining changes were part of a much larger ``secret sauce''
involved in an up-coming commit that I'm still laboring on.
2013-04-22 21:11:27 +00:00
Devin Teske
8c944ff559 Fix "-D file" to automagically enable debugging if not explicitly disabled. 2013-04-22 21:03:44 +00:00
Joel Dahl
6a7ac072e5 Minor update about rc.conf. 2013-04-22 18:31:39 +00:00
Devin Teske
c4091add1f Clarify to the user the amount of time required to load the menus for
each view in the details dialog.
2013-04-22 06:30:29 +00:00
Devin Teske
dbc6a6e179 New helper functions for common widgets. 2013-04-22 06:28:45 +00:00
Devin Teske
efc0f5e2d7 Proper fix for copy/paste error (first attempt r249756). 2013-04-22 06:27:14 +00:00
Devin Teske
a17c2d6e2b Fix a copy/paste error. 2013-04-22 06:20:34 +00:00
Devin Teske
33a14d6fd2 Update comment for accuracy. 2013-04-22 06:13:30 +00:00
Devin Teske
c7acfca832 Style nit (to be consistent across project). 2013-04-22 06:12:22 +00:00
Devin Teske
143c3d9f14 Fix two bugs when setting up a plip interface. First, dhcp status was not
being properly cleared each iteration of the loop. Second, values weren't
properly quoted when sent to the editor function.
2013-04-22 06:10:27 +00:00
Devin Teske
d3a0f91816 UI improvements. First, implement --default-item whenever and wherever
possible to save keystrokes. Second, overhaul startup/rcdelete for much
improved performance. Last, but not least, kill-off useage of --clear
and implement --keep-tite in harmony to minimize jarring transitions.
Also, fix local variable names where necessary while we're here with
other minor comment-enhancements/typo-corrections.
2013-04-22 05:52:06 +00:00
Devin Teske
5421f6b13f Use new f_getvar for clarity and general code follow-up to r249746. 2013-04-22 05:32:27 +00:00
Devin Teske
e14ddd1f16 Add new flags -d' (sets debug=1) and -D file' (sets debugFile) and
improve debugging initialization. Also fixup USAGE statements while we're
here. Also, change initialization of main program to _not_ change working
directory, allowing the debugFile to be relative without confusion.
2013-04-22 05:02:34 +00:00
Ed Schouten
d0e5fa31a4 Add missing static keyword, to make the code build with WARNS=6. 2013-04-21 22:47:24 +00:00
Jung-uk Kim
895f26a936 Merge ACPICA 20130418. 2013-04-19 23:49:34 +00:00
Ed Schouten
7e659f9491 Add the Clang specific -Wmissing-variable-declarations to WARNS=6.
This compiler flag enforces that that people either mark variables
static or use an external declarations for the variable, similar to how
-Wmissing-prototypes works for functions.

Due to the fact that Yacc/Lex generate code that cannot trivially be
changed to not warn because of this (lots of yy* variables), add a
NO_WMISSING_VARIABLE_DECLARATIONS that can be used to turn off this
specific compiler warning.

Announced on:	toolchain@
2013-04-19 19:45:00 +00:00
Gabor Kovesdan
a2098fea6d - Correct mispellings of the word necessary
Submitted by:	Christoph Mallon <christoph.mallon@gmx.de> (via private mail)
2013-04-17 11:42:40 +00:00
Gabor Kovesdan
ab3f6b347e - Correct mispellings of the word occurrence
Submitted by:	Christoph Mallon <christoph.mallon@gmx.de> (via private mail)
2013-04-17 11:40:10 +00:00
Neel Natu
9f08548d20 Setup accesses to the memory hole below 4GB to return all 1's on read and
consume all writes without any side effects.

Obtained from:	NetApp
2013-04-17 02:03:12 +00:00
Joel Dahl
2063b2c09b Minor spelling and grammar fixes. 2013-04-11 19:05:24 +00:00
Joel Dahl
b1edef175b Remove contractions. 2013-04-11 18:46:41 +00:00
Neel Natu
0e2ca4e625 Need to call init_mem() to really initialize the MMIO range lookups.
This was working by accident because:
- the RB_HEADs were being initialized to zero as part of BSS
- the pthread_rwlock functions were implicitly initializing the lock object

Obtained from:	NetApp
2013-04-10 18:59:20 +00:00
Neel Natu
f1280b3805 Remove obsolete comment about lack of locking for MMIO range lookup.
Pointed out by:	Tycho Nightingale (tycho.nightingale@plurisbusnetworks.com)
2013-04-10 18:53:14 +00:00
Edward Tomasz Napierala
57cdcaa6df Make ctladm(8) try to load ctl.ko kernel module if needed.
Reviewed by:	ken
2013-04-10 08:48:10 +00:00
Neel Natu
1472b87f2f Unsynchronized TSCs on the host require special handling in bhyve:
- use clock_gettime(2) as the time base for the emulated ACPI timer instead
  of directly using rdtsc().

- don't advertise the invariant TSC capability to the guest to discourage it
  from using the TSC as its time base.

Discussed with:	jhb@ (about making 'smp_tsc' a global)
Reported by:	Dan Mack on freebsd-virtualization@
Obtained from:	NetApp
2013-04-10 05:59:07 +00:00
Neel Natu
ae551da6a1 Change name of variable from 'rwlock' to more descriptive 'mmio_rwlock'
Requested by:	grehan
Obtained from:	NetApp
2013-04-10 02:18:17 +00:00
Neel Natu
028d9311cd Improve PCI BAR emulation:
- Respect the MEMEN and PORTEN bits in the command register
- Allow the guest to reprogram the address decoded by the BAR

Submitted by:	Gopakumar T
Obtained from:	NetApp
2013-04-10 02:12:39 +00:00
Ed Schouten
edd6bc7670 Import a new version of NetBSD's mtree.
This version of mtree implements a new flag (-O) that can be used to
restrict the tool to certain pathnames. Also, it fixes a compiler
warning generated by -Wmissing-variable-declarations.

Acked by:	brooks
2013-04-09 06:50:11 +00:00
Mark Johnston
8f66059200 Switch to a 2-clause license.
Approved by:	emaste (co-mentor)
X-MFC with:	r249257
2013-04-08 18:25:07 +00:00
Mark Johnston
dee3e845aa Add support for getting and setting BBU properties related to battery
relearning. Specifically, add subcommands to mfiutil(8) which allow the
user to set the BBU and autolearn modes when the firmware supports it,
and add a subcommand which kicks off a battery relearn.

Reviewed by:	sbruno, rstone
Tested by:	sbruno
Approved by:	rstone (co-mentor)
MFC after:	2 weeks
Sponsored by:	Sandvine Incorporated
2013-04-08 17:46:45 +00:00
Ed Schouten
5e49d30e89 Mark the act_tbl static/const.
This table is only used within this source file and is only accessed
read-only.

MFC after:	1 week
2013-04-08 08:05:15 +00:00
Marius Strobl
220fa950ce Add some missing newlines and static declarations.
MFC after:	3 days
2013-04-07 15:33:06 +00:00
Adrian Chadd
fb522624d3 Extend ath3kfw to include overridable device / vendor IDs.
This is required for ar3k series bluetooth devices who need firmware
but have a different vendor ID than normal.

Reviewed by:	maksim
2013-04-05 23:42:22 +00:00
Peter Grehan
6c2cb80e64 Remove dangling ISA uart stubs.
Obtained from:	NetApp
2013-04-05 22:19:02 +00:00
Peter Grehan
f82d0672c7 config checksum is over the entire fixed portion, not just the
config header. FreeBSD doesn't check this but other o/s's do.

Obtained from:	NetApp
2013-04-05 22:14:07 +00:00
Jung-uk Kim
9c7c683c56 Merge ACPICA 20130328. 2013-04-04 22:11:30 +00:00
Alexander Motin
b296309582 Remove some more references to legacy ATA.
Submitted by:	Dmitry Luhtionov <dmitryluhtionov@gmail.com>
2013-04-04 12:03:30 +00:00
Alexander Motin
256cb4aa44 Remove usr.sbin/burncd, useless after legacy ATA stack removal. 2013-04-04 09:21:24 +00:00
Edward Tomasz Napierala
a1593396d3 Fix dates in manual pages modified in 249009. 2013-04-02 09:44:59 +00:00
Edward Tomasz Napierala
325621458d Make it possible to build CTL as a module.
Reviewed by:	ken
Sponsored by:	FreeBSD Foundation
2013-04-02 09:42:42 +00:00
Matthew D Fleming
e324bf91e8 Fix return type of extattr_set_* and fix rmextattr(8) utility.
extattr_set_{fd,file,link} is logically a write(2)-like operation and
should return ssize_t, just like extattr_get_*.  Also, the user-space
utility was using an int for the return value of extattr_get_* and
extattr_list_*, both of which return an ssize_t.

MFC after:	1 week
2013-04-02 05:30:41 +00:00
Neel Natu
b5aaf7b22b Add some more stats to keep track of all the reasons that a vcpu is exiting. 2013-03-30 17:46:03 +00:00
Jamie Gritton
bea2eefca4 Reverse the order of some implicit commands (FS mounts and ifconfigs)
when stopping jails.  This matters particularly for nested filesystem
mounts.

PR:		kern/177325
Submitted by:	Harald Schmalzbauer
MFC after:	3 days
2013-03-28 21:02:49 +00:00
Jung-uk Kim
52569792bd Loosen restrictions for quoted strings. Now we can use more complex strings
and "escaped" quote characters.

MFC after:	1 month
2013-03-26 23:58:13 +00:00
Mark Johnston
91ba008fc5 Fix interval-based rotations when the -t flag is used. In this case, find
the most-recently archived logfile and use its mtime to determine whether
or not to rotate, as in the non-timestamped case.

Previously we would just try to use the mtime of <logfile>.0, which always
results in a rotation since it generally doesn't exist in the -t case.

PR:		bin/166448
Approved by:	emaste (co-mentor)
Tested by:	Marco Steinbach <coco executive-computing.de>
MFC after:	2 weeks
2013-03-26 23:11:30 +00:00
Mark Johnston
8d7ad01f94 Invert the meaning of -S (added in r247405) and document its meaning. Also,
don't carp about the watchdog command taking too long until after the
watchdog has been patted, and don't carp via warnx(3) unless -S is set
since syslog(3) already logs to standard error otherwise.

Discussed with:	alfred
Reviewed by:	alfred
Approved by:	emaste (co-mentor)
2013-03-26 19:43:18 +00:00
Mikolaj Golub
aebd8de674 hrStorageSize and hrStorageUsed are 32 bit integers, reporting a fs
size and usage in hrStorageAllocationUnits. If the file system has
more than 2^31 allocations it can not be shown correctly and the
meters are useless.

In such cases follow net-snmp behaviour and increase
hrStorageAllocationUnits so the values fit under INT_MAX.

PR:		bin/177183
Submitted by:	Eugene Grosbein egrosbein rdtc.ru
MFC after:	2 weeks
2013-03-25 19:12:36 +00:00
Martin Matuska
ebb8fc42be Replace deprecated (or remove obsolete) libarchive 2.8 functions
with libarchive 3.0 counterparts
2013-03-22 10:17:42 +00:00
Joel Dahl
f11731eba1 mdoc: remove superfluous paragraph macro. 2013-03-19 07:25:58 +00:00
Jung-uk Kim
569d8f7e27 Add preliminary support for IBM/Lenovo TrackPoint.
PR:		kern/147237 (based on the initial patch for 8.x)
Tested by:	glebius (device detection and suspend/resume)
MFC after:	1 month
2013-03-18 23:22:47 +00:00
Neel Natu
b060ba5024 Simplify the assignment of memory to virtual machines by requiring a single
command line option "-m <memsize in MB>" to specify the memory size.

Prior to this change the user needed to explicitly specify the amount of
memory allocated below 4G (-m <lowmem>) and the amount above 4G (-M <highmem>).

The "-M" option is no longer supported by 'bhyveload' and 'bhyve'.

The start of the PCI hole is fixed at 3GB and cannot be directly changed
using command line options. However it is still possible to change this in
special circumstances via the 'vm_set_lowmem_limit()' API provided by
libvmmapi.

Submitted by:	Dinakar Medavaram (initial version)
Reviewed by:	grehan
Obtained from:	NetApp
2013-03-18 22:38:30 +00:00
Joel Dahl
c65b9b0bd9 Move example to EXAMPLES. 2013-03-17 06:54:04 +00:00
Neel Natu
1e7d750c75 Change the type of 'ndesc' from 'int' to 'uint16_t' so that descriptor index
wraparound is handled correctly.

The gory details are available here:
http://lists.freebsd.org/pipermail/freebsd-virtualization/2013-March/001119.html

This fixes a regression introduced in r247871.

Pointed out by:	Bruce Evans, Chris Torek
2013-03-16 05:40:29 +00:00
Hans Petter Selasky
6619413096 - Make the FreeBSD's USB library compile under Linux.
- Fix a compile warning where the return value of a call
to a write() function was ignored.
- Remove redundant include files from userland USB header files.
- Add some now needed include files to various C-files.
2013-03-13 12:23:14 +00:00
Neel Natu
4b5e84f615 Convert the offset into the bar that contains the MSI-X table to an offset
into the MSI-X table before using it to calculate the table index.

In the common case where the MSI-X table is located at the begining of the
BAR these two offsets are identical and thus the code was working by accident.

This change will fix the case where the MSI-X table is located in the middle
or at the end of the BAR that contains it.

Obtained from:	NetApp
2013-03-11 17:36:37 +00:00
Antoine Brodin
1f9712deb7 Fix a typo in DPADD. 2013-03-10 17:10:16 +00:00
Attilio Rao
a92189b377 Garbage collect NWFS and NCP bits which are now completely disconnected
from the tree since few months.

This patch is not targeted for MFC.
2013-03-09 12:45:36 +00:00
Baptiste Daroussin
968d04c371 Fix bootstrapping pkgng by not appending "/latest/" to PACKAGESITE.
Reporter by :	Alexander Yerenkow (via irc)
2013-03-08 10:43:03 +00:00
Peter Grehan
6be7c5e31c Simplify virtio ring num-available calculation.
Submitted by:	Chris Torek, torek at torek dot net
2013-03-06 07:28:20 +00:00
Peter Grehan
ba02487a0e Reorder code to avoid the stat buffer being used uninitialized.
Obtained from:	NetApp
2013-03-06 06:24:09 +00:00
Hiroki Sato
833d853cbf Fix SIGSEGV when set_short_delay() is called when ifi->ifi_ra_timer is NULL.
This can happen in a short period when a prefix is changed by a rtmsg and a
new interface arrives.
2013-03-06 04:58:48 +00:00
Baptiste Daroussin
d5bf8a8b57 choose in priority the allocated ABI if any to do the ${ABI} substitution in PACKAGESITE
Reviewed by:	bdrewery
2013-03-05 14:08:36 +00:00
Baptiste Daroussin
9950eceee6 Add the ability to correctly read pkg.conf is exists.
Only look for boostrap useful options:
 - PACKAGESITE
 - ABI
 - MIRROR_TYPE
 - ASSUME_ALWAYS_YES

While here makes PACKAGESITE expand the ${ABI} variable.
Allow to deactivate any SRV record look up (MIRROR_TYPE=none)
Use the same mechanism as for pkgng itself: first get configuration out of
environment variable and fallback on pkg.conf if exists.

Reviewed by:	bdrewery
2013-03-05 13:31:06 +00:00
Devin Teske
d2dc532df5 Fix VERBOSE reporting on results when removing _PATH_LOCALTIME for UTC option.
PR:		bin/164976
Submitted by:	dteske
2013-03-04 11:34:31 +00:00
Josh Paetzel
4a99f3fcc1 Use GNOP to force ZFS pools to 4k.
Obtained from:	PC-BSD
2013-03-03 23:07:27 +00:00
Josh Paetzel
9090eb778e Improves and enhances using the "installPackages=" variable.
Adds "pkgExt=" variable to set if pkgs are .tbz or .txz or other.
Auto-detects if packages are PKGNG or old PKG format.
Auto-bootstrap of PKGNG for the new installed environment.
Fixes issues with installing packages from local media, such as DVD/USB.

Switch to using a space-delimiter for installPackages, since a number
of packages use a "," in their version string.

Fix pc-sysinstall to ignore install scripts, and not hang on
user interaction prompts when installing pkgs.

Add pkg2ng command as apart of pkgng bootstrap process.

Obtained from:	PC-BSD
2013-03-03 23:01:46 +00:00
Josh Paetzel
b771592d97 Fix a bug extracting files from dist scheme
Obtained from:	PC-BSD
2013-03-03 09:47:47 +00:00
Attilio Rao
4eb0218ace Garbage collect PORTALFS bits which are now completely disconnected from
the tree since few months.

This patch is not targeted for MFC.
2013-03-02 16:43:28 +00:00
Neel Natu
91039bb268 Specify the length of the mapping requested from 'paddr_guest2host()'.
This seems prudent to do in its own right but it also opens up the possibility
of not having to mmap the entire guest address space in the 'bhyve' process
context.

Discussed with:	grehan
Obtained from:	NetApp
2013-03-01 02:26:28 +00:00
Joel Dahl
06db73ec2b Remove EOL whitespace. 2013-02-27 20:16:30 +00:00
Joel Dahl
42e7fa7e09 mdoc: begin sentence on new line. 2013-02-27 20:15:06 +00:00
Alfred Perlstein
4b9b732ac0 watchdogd(8) and watchdog(4) enhancements.
The following support was added to watchdog(4):
- Support to query the outstanding timeout.
- Support to set a software pre-timeout function watchdog with an 'action'
- Support to set a software only watchdog with a configurable 'action'

'action' can be a mask specifying a single operation or a combination of:
 log(9), printf(9), panic(9) and/or kdb_enter(9).

Support the following in watchdogged:
- Support to utilize the new additions to watchdog(4).
- Support to warn if a watchdog script runs for too long.
- Support for "dry run" where we do not actually arm the watchdog,
  but only report on our timing.

Sponsored by:   iXsystems, Inc.
MFC after:      1 month
2013-02-27 19:03:31 +00:00
Neel Natu
58a6b0338a Ignore the BARRIER flag in the virtio block header.
This capability is not advertised by the host so ignore it even if the guest
insists on setting the flag.

Reviewed by:	grehan
Obtained from:	NetApp
2013-02-26 20:02:17 +00:00
Neel Natu
42b4049c34 Get rid of unused struct member.
Pointed out by:	Gopakumar T
Obtained from:	NetApp
2013-02-25 20:31:47 +00:00
Devin Teske
7323adac99 Import media selection/preparation framework (sysinstall inspired). Makes
accessing files from various types of media nice and abstracted away from
the wet-work involved in preparing, validating, and initializing those
types of media. This will be used for the package management system module
and other modules that need access to files and want to allow the user to
decide where those files come from (either in a scripted fashion, prompted
fashion, or any combination thereof).

Heavily inspired by sysinstall and even uses the same reserved words so
that scripts are portable. Coded over months, tested continuously through-
out, and reviewed several times.

Some notes about the changes:
- Move network-setting acquisition/validation routines to media/tcpip.subr
- The options screen from sysinstall has been converted to a dialog menu
- The "UFS" media choice is renamed to "Directory" to reflect how sysinstall
  treats the choice and a new [true] "UFS" media choice has been added that
  acts on real UFS partitions (such as external disks with disklabels).
- Many more help files have been resurrected from sysinstall (I noticed that
  some of the content seems a bit dated; I gave them a once-over but they
  could really use an update).
- A total of 10 media choices are presented (via mediaGetType) including:
  CD/DVD, FTP, FTP Passive, HTTP Proxy, Directory, NFS, DOS, UFS, Floppy, USB
- Novel struct/device management layer for managing the issue of passing
  more information than can comfortably fit in an argument list.
2013-02-25 19:55:32 +00:00
Devin Teske
11c5cac53f Fix typo and update copyright. 2013-02-25 19:14:06 +00:00
Dag-Erling Smørgrav
c1803a93a4 - Implement and use usage().
- Document the -C option.
- Allow rtadvd to be invoked without any interfaces on the command line,
  and document that possibility.

MFC after:	1 week
2013-02-25 16:47:09 +00:00
Pawel Jakub Dawidek
081b42f93c Don't print an empty line for files with no attributes when -q is given for
lsextattr(8).
2013-02-22 20:49:50 +00:00
Peter Grehan
0ab13648f5 Add the ability to have a 'fallback' search for memory ranges.
These set of ranges will be looked at if a standard memory
range isn't found, and won't be installed in the cache.
Use this to implement the memory behaviour of the PCI hole on
x86 systems, where writes are ignored and reads always return -1.
This allows breakpoints to be set when issuing a 'boot -d', which
has the side effect of accessing the PCI hole when changing the
PTE protection on kernel code, since the pmap layer hasn't been
initialized (a bug, but present in existing FreeBSD releases so
has to be handled).

Reviewed by:	neel
Obtained from:	NetApp
2013-02-22 00:46:32 +00:00
Baptiste Daroussin
ff75c36ae1 Do not use deprecated functions from libarchive 2013-02-20 22:51:42 +00:00
Brooks Davis
1f0ed3c00e Support hardlinks in manifest files by the same logic as the treewalk
code.

Reviewed by:	marcel
Sponsored by:	DARPA, AFRL
2013-02-20 19:32:31 +00:00
Brooks Davis
17b3e6f746 Allow '.' components in manifest paths. They are always the first
component of mtree -C and install -M output and are easily skipped.

Reviewed by:	marcel
Sponsored by:	DARPA, AFRL
2013-02-20 15:28:40 +00:00
Brooks Davis
e9a03238b0 Fix the -N option in manifest mode by using pwcache(3). This also
speeds up image creation appreciably.

Reviewed by:	marcel
Sponsored by:	DARPA, AFRL
2013-02-20 15:25:40 +00:00
Brooks Davis
b0d9adde80 Add a -D flag that causes duplicate entries in an mtree manifest to be
treated as warnings rather than errors.

Reviewed by:	marcel
Sponsored by:	DARPA, AFRL
2013-02-20 15:18:42 +00:00
Sergey Kandaurov
dcdc127b07 Check if the -sec option is given without an argument.
PR:		bin/170413
Submitted by:	Andrey Simonenko <simon@comsys.ntu-kpi.kiev.ua>
MFC after:	1 week
2013-02-20 12:40:26 +00:00
Dimitry Andric
a7449e3cca Since clang 3.2 now has an option to suppress warnings about implicitly
promoted K&R parameters, remove the workarounds added for sendmail
components in r228558.

MFC after:	1 week
2013-02-16 20:17:31 +00:00
Jung-uk Kim
9c48c75ed6 Merge ACPICA 20130214. 2013-02-15 20:36:28 +00:00
Neel Natu
74f80b236d Advertise PCI-E capability in the hostbridge device presented to the guest.
FreeBSD wants to see this capability in at least one device in the PCI
hierarchy before it allows use of MSI or MSI-X.

Obtained from:	NetApp
2013-02-15 18:41:36 +00:00
Jamie Gritton
e593549587 Handle (ignore) when a process disappears before it can be tracked. 2013-02-14 19:27:52 +00:00
Neel Natu
a58ed3e913 Add option "--unassign-pptdev=<bus/slot/func>" to allow 'bhyvectl' to detach
passthru devices from the guest.

Obtained from:	NetApp
2013-02-14 18:41:12 +00:00
Philippe Charnier
3e687cf089 remove old-style function definition
reduce WARNS=6 output
2013-02-14 14:44:08 +00:00
Baptiste Daroussin
86e220abc9 In case of failure of the pkg boostrap advice the user to either change the
PACKAGESITE they use or install from ports directly indicating where the port
is localted in the port collection

Submitted by:	kientzle
2013-02-14 12:42:09 +00:00
Hans Petter Selasky
aafcb73207 Add USB API to read power draw on USB devices.
Update usbconfig to print power draw on USB devices.

MFC after:	2 weeks
Submitted by:	Matt Burke @ icritical.com
2013-02-14 12:22:40 +00:00
Xin LI
535875c734 Simplify r243637 and make sure that nfsdargs.{min,max}threads are always set
to meaningful value:

 - When nfsdcnt is set, it dictates all values;
 - Otherwise, nfsdargs.minthreads is set to user specified value, or the
   automatically detected value if there is no one specified;
   nfsdargs.maxthreads is set to the user specified value, or the value
   of nfsdargs.minthreads if there is no one specified; when it is smaller
   than nfsdargs.minthreads, the latter's value is always used.

MFC after:	2 weeks
2013-02-14 02:00:41 +00:00
Xin LI
2a0b6dc5c3 Abstract out setting of nfsdcnt and consistently use MAXNFSDCNT when the
proposed value is too high and DEFNFSDCNT when proposed value is too low.

MFC after:	2 weeks
2013-02-14 01:25:14 +00:00
Xin LI
f33fce4865 Use static for all functions that do not need to be exported.
MFC after:	2 weeks
2013-02-14 01:01:53 +00:00
Neel Natu
485b3300cc Implement guest vcpu pinning using 'pthread_setaffinity_np(3)'.
Prior to this change pinning was implemented via an ioctl (VM_SET_PINNING)
that called 'sched_bind()' on behalf of the user thread.

The ULE implementation of 'sched_bind()' bumps up 'td_pinned' which in turn
runs afoul of the assertion '(td_pinned == 0)' in userret().

Using the cpuset affinity to implement pinning of the vcpu threads works with
both 4BSD and ULE schedulers and has the happy side-effect of getting rid
of a bunch of code in vmm.ko.

Discussed with:	grehan
2013-02-11 20:36:07 +00:00
Neel Natu
f37ba72632 Use the entire 64 bits of 'bar.pbi_length' when printing the bar size.
This allows bar sizes greater than or equal to 4GB to be displayed correctly.
2013-02-10 19:35:40 +00:00
Colin Percival
4bd1e0bbf8 Don't try to suppress the inclusion of the build date in named's version
string by undefining __DATE__, since (unlike gcc) clang doesn't allow us
to do that.  Instead, define NO_VERSION_DATE, which was helpfully added
to the named source code for exactly this purpose.
2013-02-10 17:58:44 +00:00
Devin Teske
efef5e5c1e Remove NO_OBJ from Makefiles that generate manuals because this causes the
GZIP compressed manuals to appear in ./src instead of the appropriate obj dir.

PR:		conf/175844
Submitted by:	Dominique Goncalves <dominique.goncalves@gmail.com>
2013-02-08 11:14:01 +00:00
John Baldwin
0895e9c70c Install <dev/agp/agpreg.h> and <dev/pci/pcireg.h> as userland headers
in /usr/include.

MFC after:	2 weeks
2013-02-05 18:55:09 +00:00
Pedro F. Giffuni
2ebed5db20 crunchgen: Permit use of alternative linkers.
Submitted by:	Pete Chou
MFC after:	1 week
2013-02-05 02:57:59 +00:00
Pedro F. Giffuni
e8ee1a1ea5 crunchide(1): Put e_shnum into a local variable.
This simplifies the code a bit.

Submitted by:	Cristoph Mallon
MFC after:	2 weeks
2013-02-03 21:16:33 +00:00
Pedro F. Giffuni
b5782a4705 crunchide(1): support non-custom elf object layout
The crunchide utility presumes the last 3 chunks of an ELF object
layout are section headers, symbol table, and then string table.
However, this is  not specified in the ELF standards, and linkers
may generate different layouts when doing partial linking (-r).

This change is required to build FreeBSD with mclinker or the
gold linker.

PR:		bin/174011
Submitted by:	Pete Chou
Reviewed by:	Cristoph Mallon
MFC after:	2 weeks
2013-02-03 20:35:37 +00:00
Pedro F. Giffuni
bf861ada38 crunch: Sync some NetBSD changes
Fix a couple of free's in previous commit.

Obtained from:	NetBSD
MFC after:	1 week
2013-02-03 01:54:25 +00:00
Pedro F. Giffuni
997d42d7a7 crunch: Sync some NetBSD changes
Revert a comment that was not supposed to go away.

Obtained from:	NetBSD
2013-02-02 22:39:21 +00:00
Pedro F. Giffuni
96acb2c4fa crunch: Sync some NetBSD changes.
crunchide:
Apr 11, 2009: fix some -Wsign-compare issues.
Sep 20, 1999: Free the right thing.

crunchgen:
Apr 14, 2009: Fix some WARNS=4 issues (-Wshadow -Wcast-qual)
Oct 30, 2004: Add (unsigned char) cast to ctype functions
Feb 5, 2001: fix nested extern.

examples:
Aug 30, 2007: NetBSD 36867 - trsp references are deprecated

Obtained from:	NetBSD
MFC after:	1 week
2013-02-02 21:51:14 +00:00
Neel Natu
609933c61b Display MSI-X table and PBA offsets when displaying information about MSI-X
capability.

Reviewed by:	jhb, jimharris (initial version)
2013-02-01 19:24:16 +00:00
Neel Natu
445e089e21 Add support for MSI-X interrupts in the virtio block device and make that
the default.

The current behavior of advertising a single MSI vector can be requested by
setting the environment variable "BHYVE_USE_MSI" to "yes". The use of MSI
is not compliant with the virtio specification and will be eventually phased
out.

Submitted by:	Gopakumar T
Obtained from:	NetApp
2013-02-01 16:58:59 +00:00
Philippe Charnier
acd8b77456 Change old-style function definition 2013-02-01 14:26:54 +00:00
Daniel Eischen
605e5bbc41 Prevent a null pointer dereference in pw userdel when deleting
a user whose group != username.
2013-02-01 05:19:49 +00:00
Neel Natu
2b89a04496 Fix a broken assumption in the passthru implementation that the MSI-X table
can only be located at the beginning or the end of the BAR.

If the MSI-table is located in the middle of a BAR then we will split the
BAR into two and create two mappings - one before the table and one after
the table - leaving a hole in place of the table so accesses to it can be
trapped and emulated.

Obtained from:	NetApp
2013-02-01 03:49:09 +00:00
Neel Natu
aa12663f49 Fix a bug in the passthru implementation where it would assume that all
devices are MSI-X capable. This in turn would lead it to treat bar 0 as
the MSI-X table bar even if the underlying device did not support MSI-X.

Fix this by providing an API to query the MSI-X table index of the emulated
device. If the underlying device does not support MSI-X then this API will
return -1.

Obtained from:	NetApp
2013-02-01 02:41:47 +00:00
Gleb Smirnoff
9711a168b9 Retire struct sockaddr_inarp.
Since ARP and routing are separated, "proxy only" entries
don't have any meaning, thus we don't need additional field
in sockaddr to pass SIN_PROXY flag.

New kernel is binary compatible with old tools, since sizes
of sockaddr_inarp and sockaddr_in match, and sa_family are
filled with same value.

The structure declaration is left for compatibility with
third party software, but in tree code no longer use it.

Reviewed by:	ru, andre, net@
2013-01-31 08:55:21 +00:00
John Baldwin
2d5d7a0c83 Allow the address and ports to be separated by a colon or period rather
than a space to permit directly pasting the output of commands such as
netstat and sockstat on the command line.

Reviewed by:	net
MFC after:	1 week
2013-01-30 18:24:29 +00:00
Neel Natu
c9b4e98754 Add support for MSI-X interrupts in the virtio network device and make that
the default.

The current behavior of advertising a single MSI vector can be requested by
setting the environment variable "BHYVE_USE_MSI" to "true". The use of MSI
is not compliant with the virtio specification and will be eventually phased
out.

Submitted by:	Gopakumar T
Obtained from:	NetApp
2013-01-30 04:30:36 +00:00
Nathan Whitehorn
4bdf739335 If no resolv.conf has been made for the new system already and the install
media has one already, copy it in lieu of leaving things blank. This
reduces the foot-shooting potential for PXE installs that immediately
add packages.
2013-01-27 23:12:37 +00:00
Nathan Whitehorn
c3955762b9 Properly quote argument.
MFC after:	3 days
2013-01-27 14:49:54 +00:00
Mark Johnston
6a82e4291b Rename the run_cmd field to sw_runcmd to make it consistent with the
other fields in struct sigwork_entry.

Approved by:	rstone (co-mentor)
MFC after:	1 week
2013-01-27 06:03:57 +00:00
Mark Johnston
6df0ff43f0 Ensure that newsyslog -n prints the correct message for a rotation rule
that uses the 'R' flag.

Reviewed by:	gad
Approved by:	rstone (co-mentor)
MFC after:	1 week
2013-01-27 06:02:38 +00:00
Mark Johnston
3b58eef59e When the 'R' flag is used with a newsyslog.conf entry, some fields of
the corresponding struct sigwork_entry were left uninitialized,
potentially causing an early return from do_sigwork(). Ensure that these
fields are initialized, and handle the 'R' flag properly in
do_sigwork().

PR:		bin/175330
Reviewed by:	gad
Approved by:	rstone (co-mentor)
MFC after:	1 week
2013-01-27 06:01:35 +00:00
Pedro F. Giffuni
646a7fea0c Clean some 'svn:executable' properties in the tree.
Submitted by:	Christoph Mallon
MFC after:	3 days
2013-01-26 22:08:21 +00:00
Ian Lepore
3c5bfb5885 Revert accidental regression to previous misspelling.
Approved by:	cognet (mentor)
2013-01-26 22:02:40 +00:00
Ian Lepore
e6af9f3a37 Reduce watchdogd's memory footprint when running daemonized.
This uses the recently-added jemalloc(3) feature of setting the lg_chunk
tuning option to zero to request that memory be allocated in the smallest
chunks possible.  Without this option, the default is to initally map 8MB,
and then the mlockall() call wires that entire allocation even though the
program only uses a few Kbytes of it at runtime.

PR:		bin/173332
Approved by:	cognet (mentor)
2013-01-26 21:29:45 +00:00
Peter Grehan
2838f343c8 Improve correctness of rtc register implementation.
Submitted by:	tycho nightingale at pluribusnetworks com
2013-01-25 22:43:20 +00:00
Neel Natu
1caafc47a3 Use the correct type (uint64_t) to retrieve sysctl machdep.tsc_freq.
Simplify the function a bit by falling through after initialization and
return via the normal code path.

Reviewed by:	grehan
Obtained from:	NetApp
2013-01-25 06:27:03 +00:00
Brooks Davis
0ebbdcbea4 manctl is conditionally added to SUBDIRS later on. Don't unconditionally
include in the main list.
2013-01-23 23:51:44 +00:00
Jason Evans
44728051fd Fix compilation errors. 2013-01-23 07:22:33 +00:00
Baptiste Daroussin
5771a68296 Use snprintf instead of strc* functions and add bounds checking when creating
pkgngpath

Submitted by:	sbz, gahr
2013-01-22 22:41:12 +00:00
Nathan Whitehorn
f0ddc92d27 Improve error handling and remove an unnecessary check on geom provider
type. GEOM provider names can't duplicate (or shouldn't -- devfs will either
break or only use the first one if they do) so using the first provider
by that name is a sufficient check. This also lets the scripted partitioner
install onto gmirror and geli and such things.
2013-01-22 17:06:28 +00:00
Nathan Whitehorn
aeff2fb371 Improve documentation of BSDINSTALL_DISTSITE and mdoc. 2013-01-22 15:26:19 +00:00
Nathan Whitehorn
3193ad883a Clarify that the setup script is optional. 2013-01-22 02:57:53 +00:00
Nathan Whitehorn
790f1bb70c Update change date. 2013-01-22 02:47:08 +00:00
Nathan Whitehorn
53f01f3a8a Document bsdinstall scripting as it currently operates. It may change in
the future depending on feedback from people using it to do unattended
system setup.
2013-01-22 02:40:06 +00:00
Neel Natu
2e81a7e8ab Allocate the memory for the MSI-X table dynamically instead of allocating 32KB
statically. In most cases the number of table entries will be far less than
the maximum of 2048 allowed by the PCI specification.

Reuse macros from pcireg.h to interpret the MSI-X capability instead of rolling
our own.

Obtained from:	NetApp
2013-01-21 22:07:05 +00:00
Neel Natu
c3cbaac942 Get rid of redundant 'table_size' field in struct pi_msix. If needed it can
always be calculated from the number of entries in the MSI-X table.

Obtained from:	NetApp
2013-01-21 08:12:59 +00:00
Nathan Whitehorn
bd67b82b61 Remove some debugging code that snuck in. 2013-01-21 02:47:14 +00:00
Nathan Whitehorn
2ffbec1872 Add a scripting frontend. Documentation and release(7) support coming later.
Scripts take the form:

------------------------------------
PARTITIONS=ada0
DISTRIBUTIONS="kernel.txz base.txz ports.txz"

#!/bin/sh
echo "sshd_enable=YES" >> /etc/rc.conf
pkg add puppet
echo "System setup complete"
------------------------------------

The second part of the script (beginning with #!) is run in the newly
installed system after the installation onto ada0 (with default partitioning,
see scriptedpart for more complicated scenarios) is complete.
2013-01-21 01:01:32 +00:00
Nathan Whitehorn
a6b612e920 If no partition configuration is specified in {}, use the automatic setup
the interactive installer uses.

Example: bsdinstall scriptedpart ada0
Result: Use entire disk for a FreeBSD system with default partition layout
2013-01-20 23:04:21 +00:00
Nathan Whitehorn
5eca7e06a1 Add a simple scripted partitioner. Documentation and more scripting support
will come soon. This lets the install process have a line like:

bsdinstall scriptedpart 'ada0 GPT {1.5G freebsd-ufs /, 10G freebsd-swap,
    auto freebsd-ufs /usr}'

to set up a system with a 1.5GB /, some swap space, and a /usr using the
rest of ada0.

MFC after:	1 month
2013-01-20 22:25:58 +00:00
Andrey Zonov
ec89b1f97c - Force inetd to have listen queue size to be set to the value of
kern.ipc.somaxconn instead of hardcoded value 64.

Submitted by:	Andrey Ignatov <rdna@rdna.ru>
MFC after:	2 weeks
2013-01-20 19:44:33 +00:00
Devin Teske
8ff9900c28 Backward compatibility fix: treat cmds loaded as a script as nonInteractive 2013-01-20 17:48:56 +00:00
Joel Dahl
9c17a1c7fe Fix minor nit in usage output.
Reviewed by:	neel
2013-01-20 08:18:56 +00:00
Nathan Whitehorn
c4bd43b00b Make "Finish" the default choice in the partition editor. This lets you
successfully complete an installation with all defaults by pressing
Enter repeatedly until your machine reboots.

MFC after:	3 weeks
2013-01-20 03:55:08 +00:00
Neel Natu
24be8623c6 Use <vmname> in a consistent manner in usage messages output by 'bhyve',
'bhyveload' and 'bhyvectl'.

Pointed out by:	joel@
2013-01-20 03:47:13 +00:00
Joel Dahl
bf77e2dbfc Remove EOL whitespace. 2013-01-19 07:07:05 +00:00
Joel Dahl
edccda4d08 Minor mdoc fixes. 2013-01-19 07:04:30 +00:00
Neel Natu
c458fc1ed4 Merge projects/bhyve to head.
'bhyve' was developed by grehan@ and myself at NetApp (thanks!).

Special thanks to Peter Snyder, Joe Caradonna and Michael Dexter for their
support and encouragement.

Obtained from:	NetApp
2013-01-19 04:18:52 +00:00
Eitan Adler
38d90616e6 Add option to make pc-sysinstall optional
Approved by:	cperciva
2013-01-18 15:57:09 +00:00
Alfred Perlstein
b647367061 Spelling: exitting -> exiting
MFC after:	2 weeks
2013-01-18 02:36:06 +00:00
Jung-uk Kim
efcc2a3054 Merge ACPICA 20130117. 2013-01-17 23:56:43 +00:00
Neel Natu
c2217b9848 IFC @ r245509 2013-01-17 07:04:37 +00:00
Eitan Adler
535460c7dc Remove unused variables
Approved by:	cperciva
MFC After:	3 days
2013-01-16 05:03:49 +00:00
Eitan Adler
bab89cefc7 Avoid clobbering errno with a call to fprintf
PR:		bin/173923
Submitted by:	Garrett Cooper <yanegomi@gmail.com>
Approved by:	cperciva
MFC After:	3 days
2013-01-16 05:00:51 +00:00
Devin Teske
db7b0ba78f Don't use f_show_msg() unless printf(1) syntax is required (this reduces the
number of unnecessary forks).
2013-01-14 21:03:34 +00:00
Baptiste Daroussin
8cc0ef19d2 Directly uses calloc(3) instread of malloc(3) + memset(3)
Reported by:	Jeremy Chadwick <jdc@koitsu.org>
MFC after:	3 days
2013-01-14 07:17:38 +00:00
Devin Teske
27ff90aa87 Add new f_yesno/f_noyes wrapper functions (which take printf(1) syntax). 2013-01-14 01:15:25 +00:00
Devin Teske
3c91c65a2b Add missing dialog(1) arguments to internationalize "Help"-button label. 2013-01-14 01:09:23 +00:00
Nathan Whitehorn
aa333a1880 Note that cpufreq(4) is not available on all hardware.
PR:		bin/175139
MFC after:	2 weeks
2013-01-12 16:01:58 +00:00
Joel Dahl
0510534298 Remove EOL whitespace. 2013-01-12 08:44:54 +00:00
Brooks Davis
624c4889c7 Always install our mtree as /usr/sbin/fmtree and link it as
/usr/sbin/mtree by default.

Add a src.conf option WITH_NMTREE that causes NetBSD's mtree to be linked
as /usr/sbin/mtree as well as /usr/sbin/nmtree.
2013-01-09 21:07:08 +00:00
Hajimu UMEMOTO
164051cea5 Add no_prefer_iface option.
It stops treating the address on the interface as special by source
address selection rule even when the interface is outgoing interface.
This is desired in some situation.

Requested by:	hrs
Reviewed by:	IHANet folks including hrs
MFC after:	1 week
2013-01-09 18:18:08 +00:00
Neel Natu
c83f77500c Get rid of 'sample.sh' from here - it belongs in the /usr/share/examples
directory.

Obtained from:	NetApp
2013-01-09 04:04:30 +00:00
Neel Natu
0ff4c70271 Sort the 'bhyvectl' subdir alphabetically.
Obtained from:	NetApp
2013-01-09 04:02:23 +00:00
Neel Natu
1b54fbe69d IFC @ r245178 2013-01-09 02:26:50 +00:00
Neel Natu
83994ddc7c Add the 'bhyveload(8)' man page.
Obtained from:	NetApp
Reviewed by:	grehan
2013-01-08 06:00:32 +00:00
Neel Natu
e37bc32183 Reduce the default memory allocation for a VM from 768MB to 128MB.
Obtained from:	NetApp
2013-01-08 01:56:05 +00:00
Peter Grehan
70d980fc34 Don't completely drain the read file descriptor. Instead, only
fill up to the uart's rx fifo size, and leave any remaining input
for when the rx fifo is read. This allows cut'n'paste of long lines
to be done into the bhyve console without truncation.

Also, introduce a mutex since the file input will run in the mevent
thread context and may corrupt state accessed by a vCPU thread.

Reviewed by:	neel
Approved by:	NetApp
2013-01-07 07:33:48 +00:00
Peter Grehan
5fdfc2b893 Use 64-bit arithmetic throughout, and lock accesses to globals.
With this change, dbench with >= 4 processes runs without getting
weird jumps forward in time when the APCI pmtimer is the default
timecounter.

Obtained from:	NetApp
2013-01-07 04:51:43 +00:00
Devin Teske
1d70f5f445 Update copyright following last commit. 2013-01-07 00:18:03 +00:00
Devin Teske
3da75d2e7b Add nonInteractive support to f_dialog_yesno/noyes(). 2013-01-07 00:15:52 +00:00
Mateusz Guzik
1f09eec3f8 pw: free group returned by gr_add 2013-01-06 21:56:58 +00:00
Devin Teske
31a41563c0 Update copyrights and dates following last commit. 2013-01-06 18:18:09 +00:00
Devin Teske
99bc932ec2 Add support for scripting (sysinstall style).
Reviewed by:	jilles
2013-01-05 02:08:47 +00:00
Benjamin Kaduk
e8ab2920c7 Grammar fixes and some wordsmithing
Discussed with:	rmacklem
Approved by:	hrs (mentor)
MFC after:	2 weeks
2013-01-05 00:27:08 +00:00
Neel Natu
46b1c55d9e IFC @ r244983. 2013-01-04 19:28:32 +00:00
Neel Natu
5f0677d392 The "unrestricted guest" capability is a feature of Intel VT-x that allows
the guest to execute real or unpaged protected mode code - bhyve relies on
this feature to execute the AP bootstrap code.

Get rid of the hack that allowed bhyve to support SMP guests on processors
that do not have the "unrestricted guest" capability. This hack was entirely
FreeBSD-specific and would not work with any other guest OS.

Instead, limit the number of vcpus to 1 when executing on processors without
"unrestricted guest" capability.

Suggested by:	grehan
Obtained from:	NetApp
2013-01-04 02:04:41 +00:00
Hiroki Sato
e0418c03e7 - Print scopeid for link-local scope addresses.
- Do not print the flags= part when flags == 0.
2013-01-03 22:27:57 +00:00
Rick Macklem
8ac5ae563b Fix r244604 so that it builds when MK_KERBEROS_SUPPORT == "no".
Reported by:	bf
Tested by:	bf
Reviewed by:	gcooper
MFC after:	3 days
2013-01-03 22:24:39 +00:00
Mark Johnston
9df22a6e88 Make sure to update the mtime of a logfile after archiving it. This
ensures that the next rotation happens at the correct time when using
interval-based rotations.

PR:		bin/174438
Reviewed by:	gad
Approved by:	rstone (co-mentor)
MFC after:	1 week
2013-01-03 16:14:51 +00:00
Mark Johnston
468d206524 Have -n imply -r, since dry-run mode obviously doesn't require root
privileges.

Approved by:	rstone (co-mentor)
MFC after:	1 week
2013-01-03 16:12:48 +00:00
Mark Johnston
220936938f Fix a typo in an error message.
Approved by:	rstone (co-mentor)
MFC after:	1 week
2013-01-03 16:11:24 +00:00
Devin Teske
450f13a446 Comments. 2013-01-03 15:48:00 +00:00
Marius Strobl
7c0360c4c8 Remove bogus '-' from getopt(3) string hit when porting daemon(8) to
GNU/Linux *duck*.

MFC after:	1 week
2013-01-03 00:49:11 +00:00
Nathan Whitehorn
ec8edf9362 Make sade actually be a symlink to partedit, as per the commit message in
r244859, rather than a hardlink. This fixes installation if /usr/sbin
is on a different filesystem than /usr/libexec.

Submitted by:	se
2013-01-02 13:25:11 +00:00