Commit Graph

13449 Commits

Author SHA1 Message Date
Glen Barber
f85ad80c6f As cron(8) is started with '-s' by default, timezones that observe
DST should not need to worry about scheduling jobs when the DST time
changes.

Rather than removing the BUGS section in crontab(5) regarding this,
note that disabling '-s' may still cause jobs to be executed twice or
not at all.

PR:		166318
Submitted by:	Florian k Unglaub (f.unglaub%googlemail!com)
MFC After:	1 week
2012-04-28 22:48:00 +00:00
Bernhard Schmidt
d9246288a0 Move crypto stuff into a common Makefile. While here fix the
WITHOUT_OPENSSL build by using the wpa's internal crypto support if
openssl is not available, this allows us to unconditionally enable
EAP support.

MFC after:	2 weeks
2012-04-28 11:11:53 +00:00
Bernhard Schmidt
80bcb7437d not only the file names have changed from eap_xxx.c to eap_server_xxx.c,
the defines too

MFC after:	2 weeks
2012-04-28 11:02:32 +00:00
Bernhard Schmidt
2e8de11a06 enable EAP_GTC and EAP_OTP to match upstream's default configuration
MFC after:	2 weeks
2012-04-28 11:01:12 +00:00
Bernhard Schmidt
9243c06122 Follow up r234711 and do same for the supplicant, one file/option per
line. While here merge the options which are always enabled.

MFC after:	2 weeks
2012-04-28 10:59:29 +00:00
Jamie Gritton
901fc7b51f Fix the dates and history as of the move to HEAD. 2012-04-27 23:39:21 +00:00
David Chisnall
57c4d565e2 Add a note to hostapd.conf about an unhelpful error message in the hope that
it won't confuse anyone else in the future.

MFC after:	1 week
2012-04-27 15:35:09 +00:00
Jamie Gritton
91b24c185b A new jail(8) with a configuration file, ultimately to replace the work
currently done by /etc/rc.d/jail.

MFC after:	3 months
2012-04-26 17:36:05 +00:00
Bernhard Schmidt
54ad8e8273 fix EAP server support after the 0.7.3 import:
- eap_xxx.c files have been renamed to eap_server_xxx.c
- additional crypto files are required for some options
- EAP_MD5 and EAP_GTC is now enabled by default to match vendor config
- move each file on its own line to hopefully make further diffs easier
  to read

EAP_SERVER is now enabled by default. Fiddling with HOSTAPD_CFLAGS in
src.conf is no longer required to get a basic WPA-EAP/radius setup
running.

Tested by:	Johann Hugo <jhugo at meraka.csir.co.za>
MFC after:	2 weeks
2012-04-26 17:35:11 +00:00
Hans Petter Selasky
4573cfdb11 Add missing and probably also mandatory -h option.
MFC after:	1 week
2012-04-24 14:06:07 +00:00
Hans Petter Selasky
fa00154522 Improve support for USB packet filtering also when reading dumps, and
allow filtered data to be dumped to a binary file.

MFC after:	1 week
2012-04-24 06:26:14 +00:00
Jung-uk Kim
eef1b955be Merge ACPICA 20120420. 2012-04-23 23:05:14 +00:00
Baptiste Daroussin
a6454741a8 - Use _PATH_TMP instead of hardcoded /tmp
- more style(9) fixes
- some refactoring
- better error detection
- Add the DPADD to Makefile

Submitted by:	Garrett Cooper <yanegomi@gmail.com>
Approved by:	des (mentor)
2012-04-16 20:41:25 +00:00
Baptiste Daroussin
3b05c2a8a7 - Fix style(9) bugs + inconsistencies
Submitted by:	marius
Approved by:	des (mentor)
2012-04-15 18:32:14 +00:00
Baptiste Daroussin
ce36f45d14 Do not do double initialisation
style(9) says for (;;) not while (1)

Reported by:	culot
Approved by:	des
2012-04-15 16:00:32 +00:00
Baptiste Daroussin
3aa4b42ae7 add usr.sbin/pkg which is a bootstrap tool for pkgng.
it respects PACKAGESITE, PACKAGEROOT, and a new environment variable ABI (if a user want to use a different API from the base one for its packages)
it has no man page on purpose to avoid hidding the pkg(8) man page from the pkgng package.
for now uses pkgbeta.FreeBSD.org as default mirror to find its package
it respects MK_PKGTOOLS

Approved by:	des (mentor)
2012-04-15 15:13:36 +00:00
Xin LI
2c81fb6a72 The scandir(3) function expects fourth parameter, compar, be in type of:
int (*compar)(const struct dirent **, const struct dirent **)

The current code defines sortq() to accept two void *, then cast them
to const struct dirent **.  Because the code does not really need this
cast, we can eliminate the casts by changing the function prototype
to match scandir(3) expectation.

MFC after:	1 month
2012-04-13 22:34:01 +00:00
Robert Millan
7b3b368344 Improve error reporting when no cpufreq(4) support is available.
Reviewed by:	njl, acpi
2012-04-09 20:59:14 +00:00
Joel Dahl
748611c9c0 mdoc: fix column names, indentation, column separation within each row, and
quotation. Also make sure we have the same amount of columns in each row as
the number of columns we specify in the head arguments.

Reviewed by:	brueffer
2012-04-07 09:05:30 +00:00
Nathan Whitehorn
ae2e7abf3c Fix typo.
Submitted by:	pawel dot worach at gmail dot com
MFC after:	3 days
2012-04-04 23:14:01 +00:00
Andreas Tobler
bff5cf1648 - Write the ISO9660 descriptor after the apm partition entries.
- Fill the needed pmPartStatus flags. At least the OpenBIOS
  implementation relies on these flags.

This commit fixes the panic seen on OS-X when inserting a FreeBSD/ppc disc.
Additionally OpenBIOS recognizes the partition where the boot code is located.
This lets us load a FreeBSD/ppc PowerMac kernel inside qemu.

PR:	powerpc/162091
MFC after:	1 week
2012-04-02 16:26:32 +00:00
Gleb Smirnoff
120a742b86 Historically arp(8) did a route lookup for the entry it is
about to add, and failed if it exist and had invalid data
link type.

Later on, in r201282, this check morphed to other code, but
message "proxy entry exists for non 802 device" still left,
and now it is printed in a case if route prefix found is
equal to current address being added. In other words, when
we are trying to add ARP entry for a network address. The
message is absolutely unrelated and disappointing in this
case.

I don't see anything bad with setting ARP entries for
network addresses. While useless in usual network,
in a /31 RFC3021 it may be necessary. This, remove this code.
2012-04-02 10:44:25 +00:00
Doug Ambrisko
b53011f9cf MFhead_mfi r233621
Remove the magic mfi_array is 288 bytes and just use the
        sizeof the array since it is not 288 bytes.

        Change reporting of a "SYSTEM" disk to "JBOD" to match
        LSI MegaCli and firmware reporting.

        This means that fiutil command to "create jbod" is now a
        little confusing since a RAID per drive is not really what
        LSI defines JBOD to be.  This should be fixed in the future
        and support added to really create LSI JBOD and enable that
        feature on cards that support it.
2012-03-30 23:39:39 +00:00
Eitan Adler
50d675f7a9 Remove trailing whitespace per mdoc lint warning
Disussed with:	gavin
No objection from:	doc
Approved by:	joel
MFC after:	3 days
2012-03-29 05:02:12 +00:00
Juli Mallett
84db023ec1 Assume a big-endian default on MIPS and drop the "eb" suffix from MACHINE_ARCH.
This makes our naming scheme more closely match other systems and the
expectations of much third-party software.  MIPS builds which are little-endian
should require and exhibit no changes.  Big-endian TARGET_ARCHes must be
changed:
	From:		To:
	mipseb		mips
	mipsn32eb	mipsn32
	mips64eb	mips64

An entry has been added to UPDATING and some foot-shooting protection (complete
with warnings which should become errors in the near future) to the top-level
base system Makefile.
2012-03-29 02:54:35 +00:00
Fabien Thomas
f5f9340b98 Add software PMC support.
New kernel events can be added at various location for sampling or counting.
This will for example allow easy system profiling whatever the processor is
with known tools like pmcstat(8).

Simultaneous usage of software PMC and hardware PMC is possible, for example
looking at the lock acquire failure, page fault while sampling on
instructions.

Sponsored by: NETASQ
MFC after:	1 month
2012-03-28 20:58:30 +00:00
Doug Ambrisko
1d8f043a74 Now that mfi(4) header files uses the absolute number of entries to
make the mfi_array 288 bytes, remove this magic number and the
calculations that go with it.  Use the MFI_MAX_ROW_SIZE and
sizeof(struct mfi_array) in place of the prior calculations.

Change reporting a disk as "SYSTEM" when it is a "JBOD" reported
by the firmware and MegaCli.  A JBOD appears as /dev/mfisyspd<n>.

This also means the mfiutil command to "create jbod" is now a
little confusing since a RAID per drive is not really what LSI
defines JBOD to be.  In the future mfiutil should have an option
to create real JBOD's and enable that option in RAID controllers
that support it.  In testing, it appears the RAID cache is not
used with JBOD but is with the RAID per disk.  When this is
implemented more testing should be done to determine the pro's and
con's of JBOD versus RAID per disk.

Reviewed by:	jhb
2012-03-28 18:35:07 +00:00
Fabien Thomas
fa18b0b2fa - Support inlined location in calltree output.
In case of multiple level of inlining all the locations are flattened.
  Require recent binutils/addr2line (head works or binutils from ports
  with the right $PATH order).
- Multiple fixes in the calltree output (recursion case, ...)
- Fix the calltree top view that previously hide some shared nodes.

Tested with Kcachegrind(kdesdk4)/qcachegrind(head).

Sponsored by: NETASQ
2012-03-28 16:23:40 +00:00
Joel Dahl
46355096e1 mdoc: correct .Bd/.Bl arguments.
Reviewed by:	brueffer
2012-03-26 21:22:53 +00:00
Joel Dahl
bea977e7f6 mdoc: sort prologue macros. 2012-03-26 19:23:57 +00:00
Joel Dahl
c2965cd185 mdoc: terminate quoted strings.
Reviewed by:	brueffer
2012-03-26 15:18:14 +00:00
Joel Dahl
7226ab98cf Fix date. 2012-03-26 14:56:23 +00:00
Joel Dahl
edf5bf9919 mdoc: document title should be all caps. 2012-03-25 19:34:05 +00:00
Joel Dahl
c0cbd1c6f1 Remove superfluous paragraph macro. 2012-03-25 09:18:34 +00:00
Oleksandr Tymoshenko
a4b7818ee6 Fix base vaddr detection for ELF binaries. PT_LOAD with offset 0 is not
mandatory for ELF binaries so we'll use the segment with offset less then
alignment and align it appropriately (which covers pt_offset == 0 case)
2012-03-22 17:44:36 +00:00
Gleb Smirnoff
7f06c60810 Fix a sentence in a paragraph that describes time and interval based
trimming. This sentence vaguely can be interpreted as if it was speaking
about time and size interaction, while it wasn't about it.
2012-03-21 07:02:17 +00:00
Gleb Smirnoff
7be124b0a8 Don't run through time checks when entry is definitely oversized. This
leads to newsyslog rotating on (size OR time) if both are specified.

PR:		100018, 160432
2012-03-21 06:51:45 +00:00
Jung-uk Kim
4c52cad2f9 Merge ACPICA 20120320. 2012-03-20 21:37:52 +00:00
Dimitry Andric
0aa9d419aa Fix the following warning from clang trunk:
usr.sbin/dconschat/dconschat.c:163:65: error: format specifies type 'size_t' (aka 'unsigned int') but the argument has type 'off_t' (aka 'long long') [-Werror,-Wformat]
        snprintf(buf, PAGE_SIZE, "\r\n[dconschat reset target(addr=0x%zx)...]\r\n", dc->reset);
                                                                     ~~^            ~~~~~~~~~
                                                                     %llx

Silence this by casting dc->reset to intmax_t, and using the appropriate
length modifier.  While here, wrap the line to a 80 character margin.

MFC after:	3 days
2012-03-19 19:17:55 +00:00
Josh Paetzel
a3471c39f7 An intel RAID can have any arbitrary name. 2012-03-19 16:13:14 +00:00
Josh Paetzel
fde89290d1 Redirect camcontrol stderr to /dev/null. 2012-03-18 21:19:21 +00:00
Hans Petter Selasky
9764cfdd05 The UMS module is now loaded by rules in /etc/devd/usb.conf which
are executed by devd. Remove duplicate kldload.

Reported by:	joel @
MFC after:	1 week
2012-03-17 16:40:15 +00:00
Hans Petter Selasky
9fe1e2282e Create new file header format to simplify the endian and cross platform issues.
This patch does not break binary compatibility with previous versions.

MFC after:	1 week
2012-03-16 17:30:22 +00:00
Hans Petter Selasky
3c27df12e0 Fix cross-platform issue about the file-format in which
usbdump stores data. Until this patch it was not possible
to exchange traces between 32-bit, 64-bit, big- and
little endian platforms. The problem is the dynamic nature
of the BPF timestamp in the header. All other fields are
fixed size and little endian.

MFC after:	5 days
2012-03-16 16:29:21 +00:00
Sean Bruno
815a08056d Update man page to present -T argument in synopsis
MFC with r183347

MFC after:	0 days
2012-03-14 21:26:06 +00:00
Juli Mallett
505a01e936 Fix crunchide on MIPS with other than the O32 ABI. 2012-03-13 05:21:14 +00:00
Juli Mallett
f4bbc13ba6 sysinstall was removed from usr.sbin/Makefile in r225937. Because per-arch
Makefiles were split out in this directory and others in userland, it makes it
quite easy to miss per-arch conditionals when changing something generally.
2012-03-13 00:45:27 +00:00
Josh Paetzel
089e2c44f4 Use gpart "-a" flag to 4k alignment.
Submitted by:	kris
Obtained from:	PC-BSD
2012-03-12 21:41:29 +00:00
Josh Paetzel
17cc933ec0 Add the ability to use a varity of ZFS dataset options.
While here fix a bug causing zpools with /tmp mount-points to fail

Submitted by:	kris
Obtained from:	PC-BSD
2012-03-12 21:32:43 +00:00
Josh Paetzel
af131fb089 Improve ZFS exporting functionality, only export pools which are on a
specific device we happen to be writing to. This fixes an issue when
running pc-sysinstall on a running system which needs ZFS and the main
disk gets exported.

Submitted by:	kris
Obtained from:	PC-BSD
2012-03-12 21:28:54 +00:00
Josh Paetzel
689d811165 Check for intel RAID devices
Submitted by:	kris
Obtained from:	PC-BSD
2012-03-12 21:24:40 +00:00
Josh Paetzel
de814251a2 Fix a couple of bugs saving network config.
Don't duplicate wlans_ lines.
Enable ipv6 on wireless devices correctly.

Submitted by:	kris
Obtained from:	PC-BSD
2012-03-12 20:44:44 +00:00
Josh Paetzel
2bcfa25df8 Make sure when creating new MBR partition it is set to active by default.
Submitted by:	kris
Obtained from:	PC-BSD
2012-03-12 20:41:36 +00:00
Josh Paetzel
610ced0a75 Fix a bug running the autoinstall functionality.
Submitted by:	kris
Obtained from:	PC-BSD
2012-03-12 18:50:37 +00:00
Ed Schouten
0ba64b2731 Perform even more style changes.
- Remove unneeded whitespace for function calls.
- Add empty line at the top of functions without local variables.
- Change while (1) to for (;;).

MFC after:	1 week
2012-03-10 14:38:34 +00:00
Ed Schouten
f10070765a Fix whitespace.
MFC after:	1 week
2012-03-10 14:35:09 +00:00
Edward Tomasz Napierala
6b381ff332 Improve error reporting in diskinfo(8) by not displaying errno when
it doesn't make sense.
2012-03-09 18:34:14 +00:00
Ed Maste
f3e566163f Work around broken BIOS memory reporting
Andrzej has a machine with 32GB of RAM, but only 16GB is reported by the
smbios.memory.enabled.  Thus, use the greater of hw.realmem and the smbios
value.

Reported by:	Andrzej Tobola <ato of iem pw edu pl>
2012-03-08 02:00:52 +00:00
Jung-uk Kim
012faf16c1 Make parallel build more safer.
Reviewed by:	tijl
2012-03-07 23:57:49 +00:00
Ed Maste
7ad50a360b Improve multi-line kernel ident parsing
Instead of blindly grabbing the line with 'Version string' and the
following one from the core info file, take all lines after 'Version
string' until the one one that matches the field format in the core info
file.  This provides compatibility with VendorBSD modifications that have
a different kernel ident format.

Reviewed by:	jhb
2012-03-07 18:46:21 +00:00
Bjoern A. Zeeb
7412cb7ef3 Fix building with WITHOUT_INET_SUPPORT set.
Reviewed by:	jamie (actually provided the real fix)
MFC after:	3 days
2012-03-06 18:39:07 +00:00
Edward Tomasz Napierala
811772950f Add LUN resizing to CTL. Also make it possible to explicitly set
size when creating file-backed or device-backed LUN.

Reviewed by:	ken (earlier version)
Sponsored by:	The FreeBSD Foundation
2012-03-06 13:43:57 +00:00
Nathan Whitehorn
0c3cc3c366 Make the chroot shell more functional by providing devfs.
Reported by:	Robert Simmons
MFC after:	4 days
2012-03-05 02:40:18 +00:00
Eitan Adler
d7c784b1a8 Permit the use of raidz3 in pc-sysinstall
PR:		conf/164709
Submitted by:	Garrett Cooper <yanegomi@gmail.com>
Reviewed by:	brd, brooks
Approved by:	cperciva
MFC after:	3 days
2012-03-04 17:33:22 +00:00
Ken Smith
ffd0e88f5d Add entry for packages-8.3-release directory. 2012-03-03 05:04:47 +00:00
Ed Maste
c8b4c0aa6c Grammar: tzsetup now has more than one option. 2012-02-29 14:44:42 +00:00
Martin Matuska
06531226e6 Bump .Dd to reflect latest update
Reported by:	bz
MFC after:	1 week
2012-02-29 07:33:07 +00:00
Martin Matuska
41c0675e6e Add procfs to jail-mountable filesystems.
Reviewed by:	jamie
MFC after:	1 week
2012-02-29 00:30:18 +00:00
Dimitry Andric
07b202a847 Define several extra macros in bsd.sys.mk and sys/conf/kern.pre.mk, to
get rid of testing explicitly for clang (using ${CC:T:Mclang}) in
individual Makefiles.

Instead, use the following extra macros, for use with clang:
- NO_WERROR.clang       (disables -Werror)
- NO_WCAST_ALIGN.clang  (disables -Wcast-align)
- NO_WFORMAT.clang	(disables -Wformat and friends)
- CLANG_NO_IAS		(disables integrated assembler)
- CLANG_OPT_SMALL	(adds flags for extra small size optimizations)

As a side effect, this enables setting CC/CXX/CPP in src.conf instead of
make.conf!  For clang, use the following:

CC=clang
CXX=clang++
CPP=clang-cpp

MFC after:	2 weeks
2012-02-28 18:30:18 +00:00
Martin Matuska
638f378253 mdoc(7) stype - start new sentences on new line
MFC after:	1 week
2012-02-28 07:35:07 +00:00
Jamie Gritton
0c4d49e94a Use the defvs_ruleset paramater when mounting a jail's /dev,
instead of a mount.devfs.ruleset pseudo-parameter.
2012-02-27 22:37:35 +00:00
Jamie Gritton
46571c7c00 From r224286:
Document the potential for jail escape.

From r224615:

  Always disable mount and unmount for jails with enforce_statfs==2.

From r231267:

  A new jail(8) option "devfs_ruleset" defines the ruleset enforcement for
  mounting devfs inside jails. A value of -1 disables mounting devfs in
  jails, a value of zero means no restrictions. Nested jails can only
  have mounting devfs disabled or inherit parent's enforcement as jails are
  not allowed to view or manipulate devfs(8) rules.

From r232059:

  To improve control over the use of mount(8) inside a jail(8), introduce
  a new jail parameter node with the following parameters:

  allow.mount.devfs:
	allow mounting the devfs filesystem inside a jail

  allow.mount.nullfs:
	allow mounting the nullfs filesystem inside a jail

From r232186:

  allow.mount.zfs:
	allow mounting the zfs filesystem inside a jail
2012-02-27 22:28:38 +00:00
Xin LI
cc427081a7 Drop setuid status while doing file operations to prevent potential
information leak.  This changeset is intended to be a minimal one
to make backports easier.

Reviewed by:	kevlo, remko
MFC after:	1 week
2012-02-27 05:49:00 +00:00
Nathan Whitehorn
bfd258f74e Fix segfault if distfetch and distextract binaries are run standalone
without the DISTRIBUTIONS environment variable set.

PR:		bin/165492
Submitted by:	Fernando Apesteguia
MFC after:	4 days
2012-02-26 22:09:21 +00:00
Martin Matuska
e7af90ab00 Analogous to r232059, add a parameter for the ZFS file system:
allow.mount.zfs:
	allow mounting the zfs filesystem inside a jail

This way the permssions for mounting all current VFCF_JAIL filesystems
inside a jail are controlled wia allow.mount.* jail parameters.

Update sysctl descriptions.
Update jail(8) and zfs(8) manpages.

TODO:	document the connection of allow.mount.* and VFCF_JAIL for kernel
	developers

MFC after:	10 days
2012-02-26 16:30:39 +00:00
Daniel Eischen
a2cdef71d1 When using uidstart in /etc/adduser.conf, get the next
available user id and show it in the "Uid [xxx]" prompt.

PR:		163863
Submitted by:	Moritz Wilhelmy (mw at wzff dot de)
MFC after:	2 weeks
2012-02-25 07:58:59 +00:00
Jaakko Heinonen
06eb5e92e2 Exit with proper status when wake() fails.
PR:		bin/153527
Submitted by:	Douglas Steinwand
MFC after:	2 weeks
2012-02-24 07:54:08 +00:00
Jaakko Heinonen
6acc4f15d0 style(9).
MFC after:	2 weeks
2012-02-24 07:49:55 +00:00
Martin Matuska
bf3db8aa65 To improve control over the use of mount(8) inside a jail(8), introduce
a new jail parameter node with the following parameters:

allow.mount.devfs:
	allow mounting the devfs filesystem inside a jail

allow.mount.nullfs:
	allow mounting the nullfs filesystem inside a jail

Both parameters are disabled by default (equals the behavior before
devfs and nullfs in jails). Administrators have to explicitly allow
mounting devfs and nullfs for each jail. The value "-1" of the
devfs_ruleset parameter is removed in favor of the new allow setting.

Reviewed by:	jamie
Suggested by:	pjd
MFC after:	2 weeks
2012-02-23 18:51:24 +00:00
Kevin Lo
29dcf726d2 Handle NULL return from crypt(3). Mostly from DragonFly 2012-02-22 06:27:20 +00:00
Mikolaj Golub
53c49998d5 If permitted protect the supervisor against pageout kill.
Suggested by:	Andrey Zonov <andrey zonov org>
MFC after:	2 weeks
2012-02-19 10:38:55 +00:00
Mikolaj Golub
b6193c2409 Add -r option to restart the program if it has been terminated.
Suggested by:	Andrey Zonov <andrey zonov org>
MFC after:	2 weeks
2012-02-19 10:36:29 +00:00
Mikolaj Golub
195fc497a2 If the supervising process receives SIGTERM, forward it to the spawned
process.  Normally it will cause the child to exit followed by the
termination of the supervisor after removing the pidfile.

This looks like desirable behavior, because termination of a
supervisor usually supposes termination of its charge. Also it will
fix the issue with stale pid files after reboot due to init kills a
supervisor before its child exits.

MFC after:	2 weeks
2012-02-19 10:23:51 +00:00
Mikolaj Golub
2ad4302785 The pidfile_open(3) is going to be fixed to set close-on-exec in order
not to leak the descriptor after exec(3). This raises the issue for
daemon(3) of the pidfile lock to be lost when the child process
executes.

To solve this and also to have the pidfile cleaned up when the program
exits, if a pidfile is specified, spawn a child to exec the command
and wait in the parent keeping the pidfile locked until the child
process exits and remove the file.

Reported by:	Andrey Zonov <andrey zonov org>
Suggested by:	pjd
Reviewed by:	pjd
MFC after:	2 weeks
2012-02-19 10:20:37 +00:00
Jung-uk Kim
a228e013c3 Fix a stupid typo. 2012-02-16 23:05:09 +00:00
Jung-uk Kim
a159c266a9 Merge ACPICA 20120215. 2012-02-16 22:59:29 +00:00
Hans Petter Selasky
79fcfd2e54 Add support for filtering USB devices and USB endpoints to the usbdump utility
when making software USB traces.

MFC after: 1 week
2012-02-16 21:18:36 +00:00
Eitan Adler
c1cb99c965 Fix warning when compiling with gcc46
Approved by:	cperciva
MFC after:	3 days
2012-02-16 05:17:06 +00:00
Kevin Lo
6e807fa629 - Remove some unnecessary cast when assigning NULL to a handle.
- Silent a warning
2012-02-15 02:01:24 +00:00
Kevin Lo
76a387fbba readlink len-1 2012-02-14 10:17:03 +00:00
Ed Schouten
6bbd04d0e4 Restore message in man page on VFS timestamp precision.
Requested by:	bde, jhb
2012-02-14 09:29:37 +00:00
Brooks Davis
df01f319c7 Prevent periodic scripts that run longer than the expected period from
starting up before the previous script finishes.  This prevents an
infinite number of them from piling up and slowing a system down.

Since all the refactoring to make this happen required churning the
indenting of most of this file, make the indentation more consistent.

Reviewed by:	simon
MFC after:	1 week
2012-02-12 23:18:05 +00:00
Ed Schouten
6b99842ada Globally replace u_int*_t from (non-contributed) man pages.
The reasoning behind this, is that if we are consistent in our
documentation about the uint*_t stuff, people will be less tempted to
write new code that uses the non-standard types.

I am not going to bump the man page dates, as these changes can be
considered style nits. The meaning of the man pages is unaffected.

MFC after:	1 month
2012-02-12 18:29:56 +00:00
Ed Schouten
71d8432f98 Replace utxrm(8) by utx(8).
At first, I added a utility called utxrm(8) to remove stale entries from
the user accounting database. It seems there are cases in which we need
to perform different operations on the database as well. Simply rename
utxrm(8) to utx(8) and place the old code under the "rm" command.

In addition to "rm", this tool supports "boot" and "shutdown", which are
going to be used by an rc-script which I am going to commit separately.
2012-02-11 20:28:42 +00:00
Ed Schouten
65f171c657 Correct date. It seems to be 2012. 2012-02-10 13:51:02 +00:00
Ed Schouten
e6ad3d22f4 Detect file modification properly by using tv_nsec.
POSIX 2008 standardizes st_mtim, meaning we can simply use nanosecond
precision to detect file modification.

MFC after:	2 weeks
2012-02-10 13:40:32 +00:00
Eitan Adler
2eb318b31d Fix r231300: Use correct test so we only bail out on error instead of on non-error.
Also, fix a style bug.

Submitted by:	ache
Approved by:	cperciva
MFC after:	1 month
2012-02-10 00:53:39 +00:00
Eitan Adler
839a18b056 Permit the use of relative paths for the prefix argument.
Remove an unnecessary cwd from created plists when -p is specified

PR:		bin/145000
Submitted by:	gcooper
Approved by:	portmgr (flo)
MFC after:	1 month
2012-02-09 20:51:03 +00:00
Martin Matuska
0cc207a6f5 Add support for mounting devfs inside jails.
A new jail(8) option "devfs_ruleset" defines the ruleset enforcement for
mounting devfs inside jails. A value of -1 disables mounting devfs in
jails, a value of zero means no restrictions. Nested jails can only
have mounting devfs disabled or inherit parent's enforcement as jails are
not allowed to view or manipulate devfs(8) rules.

Utilizes new functions introduced in r231265.

Reviewed by:	jamie
MFC after:	1 month
2012-02-09 10:22:08 +00:00
Kevin Lo
870a6d5181 Mention run(4) 2012-02-09 08:33:04 +00:00
Jamie Gritton
1ca35de448 Improvements in error messages:
Some errors printed the jail name for unnamed (command line) jails.

Attempting to create an already-existing jail from the command line
returned with no error (even for non-root) due to bad logic in
start_state.

Ignore kvm_proc errors, which are typically caused by permission
problems.  Instead, stop ignoring permission errors when removing
a jail (but continue to silently ignore other errors, i.e. the
jail no longer existing).  This makes non-root attempts at removing
a jail give a clearer error message.
2012-02-08 23:51:46 +00:00
Garrett Wollman
41b549dc80 It's not an error if unlink(2) fails because the pathname doesn't exist.
Noticed by: kevlo
Pointy hat to: wollman
2012-02-08 05:03:04 +00:00
Jamie Gritton
7ca65ae0fe Allow relative pathnames for jails generated on the command line
(but continue to flag when from a config file).
2012-02-07 22:13:24 +00:00
Dimitry Andric
5e0a19bdee Consistently set RPCGEN_CPP when running rpcgen, so the C preprocessor
set via ${CPP} is used, instead of always using hardcoded /usr/bin/cpp.

MFC after:	1 week
2012-02-07 09:27:07 +00:00
Konstantin Belousov
5c95e6ff60 Be as explicit as possible when describing relation between the -m mask
argument and slices. Adjust example for the same reason.

Submitted by:	Valentin Nechayev <netch netch kiev ua>
MFC after:	3 days
2012-02-04 13:12:52 +00:00
Guy Helmer
b34650e320 Change the notes about the pidfile to include Doug's preference
for pre-creating the pidfile with appropriate owner and permissions.

Requested by dougb
2012-02-01 16:40:59 +00:00
Jamie Gritton
4334a36a6a Better communicate the purpose of "-r *". 2012-01-31 19:45:32 +00:00
Kevin Lo
e01a4776d5 Fix a whitespace nit
Reviewed by:	bz
2012-01-31 05:49:49 +00:00
Jung-uk Kim
688aaa098d Allow contents of multiple directories to be merged to the current image.
Note this patch was submitted to NetBSD and they already adopted it.

http://mail-index.netbsd.org/source-changes/2012/01/28/msg031078.html

MFC after:	1 week
2012-01-31 00:32:37 +00:00
Sean Farley
fd2f39cb85 Since April 2, 2006, Indiana has observed DST.
MFC after:	5 days
2012-01-28 21:06:45 +00:00
Maxim Konovalov
10fa36f0bc o in6_ifinfo() does not do any kvm(3) operations, so
do not guard it by WITH_KVM ifdef.  This allows to build
ifmcstat(8) without kvm(3) support.

PR:		bin/164353
Submitted by:	Ivan Rozhuk
MFC after:	2 weeks
2012-01-27 17:16:44 +00:00
Alexander Motin
19e79b284d Return proper error message if recording device is not specified.
MFC after:	1 week
2012-01-27 09:15:55 +00:00
Kenneth D. Merry
e6bd5983ca Add CAM infrastructure to allow reporting when a drive's long read capacity
data changes.

cam_ccb.h:	Add a new advanced information type, CDAI_TYPE_RCAPLONG,
		for long read capacity data.

cam_xpt_internal.h:
		Add a read capacity data pointer and length to struct cam_ed.

cam_xpt.c:	Free the read capacity buffer when a device goes away.
		While we're here, make sure we don't leak memory for other
		malloced fields in struct cam_ed.

scsi_all.c:	Update the scsi_read_capacity_16() to take a uint8_t * and
		a length instead of just a pointer to the parameter data
		structure.  This will hopefully make this function somewhat
		immune to future changes in the parameter data.

scsi_all.h:	Add some extra bit definitions to struct
		scsi_read_capacity_data_long, and bump up the structure
		size to the full size specified by SBC-3.

		Change the prototype for scsi_read_capacity_16().

scsi_da.c:	Register changes in read capacity data with the transport
		layer.  This allows the transport layer to send out an
		async notification to interested parties.  Update the
		dasetgeom() API.

		Use scsi_extract_sense_len() instead of
		scsi_extract_sense().

scsi_xpt.c:	Add support for the new CDAI_TYPE_RCAPLONG advanced
		information type.

		Make sure we set the physpath pointer to NULL after freeing
		it.  This allows blindly freeing it in the struct cam_ed
		destructor.

sys/param.h:	Bump __FreeBSD_version from 1000005 to 1000006 to make it
		easier for third party drivers to determine that the read
		capacity data async notification is available.

camcontrol.c,
mptutil/mpt_cam.c:
		Update these for the new scsi_read_capacity_16() argument
		structure.

Sponsored by:	Spectra Logic
2012-01-26 18:09:28 +00:00
Guy Helmer
704523b073 Revert 229667: After some discussion of this change, it seems it is
better to leave the pidfile open where it was. Add a note to the
man page describing pidfile strategies to use if the daemon is to
be run as a user other than root.
2012-01-25 14:50:12 +00:00
Hiroki Sato
a22ed494f8 Fix a SIGSEGV problem in directory entry renaming. 2012-01-25 07:45:15 +00:00
Nathan Whitehorn
090dd24636 Experimental support for booting CHRP-type PowerPC systems from hard disks. 2012-01-25 03:37:39 +00:00
Ed Maste
3129859c92 Clean up reinstall option and remove duplicate code
- Move the reinstall logic to be before menus are initialised
  (menus are not needed when reinstalling a zonefile).

- Remove unnecessary re-initialization of path_db.

- Update variable name and error message because we now use the
  zone name relative to /usr/share/zoneinfo, not the full path.

pr:		bin/164041
Submitted by:	Devin Teske <dteske vicor com>
MFC after:	1 week
2012-01-25 02:15:40 +00:00
Martin Matuska
d637f5bf9a Try resolving jail path with realpath(3).
jail(8) does a chdir(2) to the given path argument. Kernel evaluates the
jail path from the new cwd and not from the original cwd, which leads to
undesired behavior if given a relative path.

Reviewed by:	jamie
MFC after:	2 weeks
2012-01-24 08:04:38 +00:00
Eitan Adler
30d3283b15 Fix warning when compiling with gcc46:
error: variable 'clnt_stat' set but not used

Approved by:	dim, cperciva (mentor, blanket for pre-mentorship already-approved commits)
MFC after:	3 days
2012-01-20 01:39:26 +00:00
Eitan Adler
de879bdae9 Fix warning when compiling with gcc46:
error: variable 'flags' set but not used

Approved by:	dim, cperciva (mentor, blanket for pre-mentorship already-approved commits)
MFC after:	3 days
2012-01-20 01:39:16 +00:00
Eitan Adler
3688cbc221 Fix warning when compiling with gcc46:
error: variable 'a' set but not used

Approved by:	dim, cperciva (mentor, blanket for pre-mentorship already-approved commits)
MFC after:	3 days
2012-01-20 01:39:08 +00:00
Eitan Adler
335797f33e Fix warning when compiling with gcc46:
error: variable 'fd' set but not used

Approved by:	dim, cperciva (mentor, blanket for pre-mentorship already-approved commits)
MFC after:	3 days
2012-01-20 01:39:01 +00:00
Eitan Adler
e0ef7724c3 Fix warning when compiling with gcc46:
error: variable 'target' set but not used

Approved by:	dim, cperciva (mentor, blanket for pre-mentorship already-approved commits)
MFC after:	3 days
2012-01-20 01:38:52 +00:00
Eitan Adler
3f028229d9 Fix warning when compiling with gcc46:
error: variable 'i2c' set but not used

Approved by:	dim, cperciva (mentor, blanket for pre-mentorship already-approved commits)
MFC after:	3 days
2012-01-20 01:38:44 +00:00
Eitan Adler
43074f1626 Fix warning when compiling with gcc46:
error: variable 'parentrecnum' set but not used

Approved by:    dim, cperciva (mentor, blanket for pre-mentorship already-approved commits)
MFC after:      3 days
2012-01-20 01:38:35 +00:00
Eitan Adler
460c768f9a Fix a variety of warnings when compiling with gcc46
Approved by:	dim, cperciva (mentor, blanket for pre-mentorship already-approved commits)
MFC after:	3 days
2012-01-20 01:38:28 +00:00
Eitan Adler
92da524baa Fix warning when compiling with gcc46:
error: variable 'temp' set but not used

Approved by:	dim
Approved by:	cperciva (mentor, blanket for pre-mentorship already-approved commits)
MFC after:	3 days
2012-01-20 01:38:21 +00:00
Eitan Adler
e0bcf08675 Fix warning when compiling with gcc46:
error: variable 'dirp' set but not used
	error: variable 'dirplen' set but not used

Approved by:	dim, cperciva (mentor, blanket for pre-mentorship already-approved commits)
MFC after:	3 days
2012-01-20 01:38:12 +00:00
Eitan Adler
6240691ac7 Fix warning when compiling with gcc46:
error: variable 'now' set but not used

Approved by:	dim, cperciva (mentor, blanket for pre-mentorship already-approved commits)
MFC after:	3 days
2012-01-20 01:38:05 +00:00
Eitan Adler
831b96303a Fix warning when compiling with gcc46:
error: variable 'current_cpu' set but not used

Approved by:	dim, cperciva (mentor, blanket for pre-mentorship already-approved commits)
MFC after:	3 days
2012-01-20 01:37:56 +00:00
Eitan Adler
2bb133e752 Fix warning when compiling with gcc46:
error: variable 'len' set but not used

Approved by:	dim, cperciva (mentor, blanket for pre-mentorship already-approved commits)
MFC after:	3 days
2012-01-20 01:37:49 +00:00
Eitan Adler
e3febf407d Fix warning when compiling with gcc46:
error: variable 'extra_async_bytes' set but not used

Approved by:    dim, cperciva (mentor, blanket for pre-mentorship already-approved commits)
MFC After:	3 days
2012-01-20 01:37:39 +00:00
Eitan Adler
7268c7daff Fix warning when compiling with gcc46:
error: variable 'addrs' set but not used

Approved by:	dim
Approved by:	cperciva (mentor, blanket for pre-mentorship already-approved commits)
MFC After:	3 days
2012-01-20 01:37:31 +00:00
Eitan Adler
9840ec1752 Fix warning when compiling with gcc46:
error: variable 'hostname' set but not used

Approved by:	dim, cperciva (mentor, blanket for pre-mentorship already-approved commits)
MFC after:	3 days
2012-01-20 01:37:23 +00:00
Nathan Whitehorn
6fe359f292 Warn if trying to install over an existing partition, which usually fails
anyway due to libarchive not being able to overwrite schg flags.

PR:		bin/164278
MFC after:	4 days
2012-01-18 15:59:23 +00:00
Ed Maste
da4b02cf70 Fix #ifdef VERBOSE for UTC case
Update verbose output to match what actually happens when selecting
the UTC option, and when the -n option is used.

Patch updated slightly for new libdialog.

PR:		bin/164042
Submitted by:	Devin Teske <dteske vicor com>
MFC after:	2 weeks
2012-01-18 04:37:35 +00:00
Ed Maste
e202760872 Don't write /var/db/zoneinfo when zone is not actually changed.
If the specified zone file does not exist or the -n flag is specified,
do not update /var/db/zoneinfo.

PR:		bin/164039
Submitted by:	Devin Teske <dteske vicor com>
MFC after:	1 week
2012-01-18 04:12:32 +00:00
Ed Maste
b0ba9fbc47 Add missing line continuation \. It did not cause any issue because
the same path is already being included in ../Makefile.inc.

PR:		164192
Submitted by:	Devin Teske <dteske vicor com>
MFC after:	2 weeks
2012-01-18 02:44:22 +00:00
Hiroki Sato
b2870827a3 Revert changes in r228790. It prevented the ypserv daemon from working with
with multiple socktypes.
2012-01-17 20:39:33 +00:00
Jaakko Heinonen
d325001438 Change checkpath() to not exit on error. This is a prerequisite for
fixing the mount(8) "failok" option.

PR:		163668
Reviewed by:	Garrett Cooper, delphij (previous version)
2012-01-16 19:34:21 +00:00
Jung-uk Kim
c99b7c4e40 Remove unused ACPICA sources from userland makefiles. 2012-01-13 22:16:47 +00:00
Kevin Lo
b1c09bd5ff Fix copyright year
Spotted by:	pluknet
2012-01-13 09:08:41 +00:00
Kevin Lo
a3a2bf4b67 fgets(3) returns a pointer, so compare against NULL, not integer 0. 2012-01-13 06:51:15 +00:00
Garrett Wollman
8c261aeac3 Use a reasonable-sized buffer when formatting error messages about
installing zoneinfo.  While we're in the vicinity, add some missing
error checking to eliminate an unhelpful error message when unlink()
fails.

/me is embarrassed by the quality of his 16-year-old code.
The whole thing is awful and could stand a complete rewrite.

PR:		164038
Submitted by:	Devin Teske (but implemented differently)
2012-01-12 05:50:32 +00:00
Kenneth D. Merry
130f4520cb Add the CAM Target Layer (CTL).
CTL is a disk and processor device emulation subsystem originally written
for Copan Systems under Linux starting in 2003.  It has been shipping in
Copan (now SGI) products since 2005.

It was ported to FreeBSD in 2008, and thanks to an agreement between SGI
(who acquired Copan's assets in 2010) and Spectra Logic in 2010, CTL is
available under a BSD-style license.  The intent behind the agreement was
that Spectra would work to get CTL into the FreeBSD tree.

Some CTL features:

 - Disk and processor device emulation.
 - Tagged queueing
 - SCSI task attribute support (ordered, head of queue, simple tags)
 - SCSI implicit command ordering support.  (e.g. if a read follows a mode
   select, the read will be blocked until the mode select completes.)
 - Full task management support (abort, LUN reset, target reset, etc.)
 - Support for multiple ports
 - Support for multiple simultaneous initiators
 - Support for multiple simultaneous backing stores
 - Persistent reservation support
 - Mode sense/select support
 - Error injection support
 - High Availability support (1)
 - All I/O handled in-kernel, no userland context switch overhead.

(1) HA Support is just an API stub, and needs much more to be fully
    functional.

ctl.c:			The core of CTL.  Command handlers and processing,
			character driver, and HA support are here.

ctl.h:			Basic function declarations and data structures.

ctl_backend.c,
ctl_backend.h:		The basic CTL backend API.

ctl_backend_block.c,
ctl_backend_block.h:	The block and file backend.  This allows for using
			a disk or a file as the backing store for a LUN.
			Multiple threads are started to do I/O to the
			backing device, primarily because the VFS API
			requires that to get any concurrency.

ctl_backend_ramdisk.c:	A "fake" ramdisk backend.  It only allocates a
			small amount of memory to act as a source and sink
			for reads and writes from an initiator.  Therefore
			it cannot be used for any real data, but it can be
			used to test for throughput.  It can also be used
			to test initiators' support for extremely large LUNs.

ctl_cmd_table.c:	This is a table with all 256 possible SCSI opcodes,
			and command handler functions defined for supported
			opcodes.

ctl_debug.h:		Debugging support.

ctl_error.c,
ctl_error.h:		CTL-specific wrappers around the CAM sense building
			functions.

ctl_frontend.c,
ctl_frontend.h:		These files define the basic CTL frontend port API.

ctl_frontend_cam_sim.c:	This is a CTL frontend port that is also a CAM SIM.
			This frontend allows for using CTL without any
			target-capable hardware.  So any LUNs you create in
			CTL are visible in CAM via this port.

ctl_frontend_internal.c,
ctl_frontend_internal.h:
			This is a frontend port written for Copan to do
			some system-specific tasks that required sending
			commands into CTL from inside the kernel.  This
			isn't entirely relevant to FreeBSD in general,
			but can perhaps be repurposed.

ctl_ha.h:		This is a stubbed-out High Availability API.  Much
			more is needed for full HA support.  See the
			comments in the header and the description of what
			is needed in the README.ctl.txt file for more
			details.

ctl_io.h:		This defines most of the core CTL I/O structures.
			union ctl_io is conceptually very similar to CAM's
			union ccb.

ctl_ioctl.h:		This defines all ioctls available through the CTL
			character device, and the data structures needed
			for those ioctls.

ctl_mem_pool.c,
ctl_mem_pool.h:		Generic memory pool implementation used by the
			internal frontend.

ctl_private.h:		Private data structres (e.g. CTL softc) and
			function prototypes.  This also includes the SCSI
			vendor and product names used by CTL.

ctl_scsi_all.c,
ctl_scsi_all.h:		CTL wrappers around CAM sense printing functions.

ctl_ser_table.c:	Command serialization table.  This defines what
			happens when one type of command is followed by
			another type of command.

ctl_util.c,
ctl_util.h:		CTL utility functions, primarily designed to be
			used from userland.  See ctladm for the primary
			consumer of these functions.  These include CDB
			building functions.

scsi_ctl.c:		CAM target peripheral driver and CTL frontend port.
			This is the path into CTL for commands from
			target-capable hardware/SIMs.

README.ctl.txt:		CTL code features, roadmap, to-do list.

usr.sbin/Makefile:	Add ctladm.

ctladm/Makefile,
ctladm/ctladm.8,
ctladm/ctladm.c,
ctladm/ctladm.h,
ctladm/util.c:		ctladm(8) is the CTL management utility.
			It fills a role similar to camcontrol(8).
			It allow configuring LUNs, issuing commands,
			injecting errors and various other control
			functions.

usr.bin/Makefile:	Add ctlstat.

ctlstat/Makefile
ctlstat/ctlstat.8,
ctlstat/ctlstat.c:	ctlstat(8) fills a role similar to iostat(8).
			It reports I/O statistics for CTL.

sys/conf/files:		Add CTL files.

sys/conf/NOTES:		Add device ctl.

sys/cam/scsi_all.h:	To conform to more recent specs, the inquiry CDB
			length field is now 2 bytes long.

			Add several mode page definitions for CTL.

sys/cam/scsi_all.c:	Handle the new 2 byte inquiry length.

sys/dev/ciss/ciss.c,
sys/dev/ata/atapi-cam.c,
sys/cam/scsi/scsi_targ_bh.c,
scsi_target/scsi_cmds.c,
mlxcontrol/interface.c:	Update for 2 byte inquiry length field.

scsi_da.h:		Add versions of the format and rigid disk pages
			that are in a more reasonable format for CTL.

amd64/conf/GENERIC,
i386/conf/GENERIC,
ia64/conf/GENERIC,
sparc64/conf/GENERIC:	Add device ctl.

i386/conf/PAE:		The CTL frontend SIM at least does not compile
			cleanly on PAE.

Sponsored by:	Copan Systems, SGI and Spectra Logic
MFC after:	1 month
2012-01-12 00:34:33 +00:00
Jung-uk Kim
ec3fc72f94 Merge ACPICA 20120111. 2012-01-11 23:06:37 +00:00
Shteryana Shopova
b9288caaf6 Implement an option to execute SNMP walks using GETBULK requests in bsnmpwalk(1)
retrieving multiple values with a Single PDU.

Reviewed by:	philip@
Tested by:	tsanand129 (at) gmail (dot) com
2012-01-10 15:29:03 +00:00
Eitan Adler
2394cc2228 X11BASE has been deprecated for a long time and will die soon
Approved by:	x11 (eadler)
Approved by:	brucec
MFC after:	1 week
2012-01-09 00:48:19 +00:00
Guy Helmer
074db536b3 Allow daemon(8) to run pidfile_open() before relenquishing privileges
so pid files can be written in /var/run when started as root.

I do not expect this to cause any security issues, but if anyone objects
it could be easily reverted.

PR:		bin/159568
MFC after:	4 weeks
2012-01-05 22:48:36 +00:00
Ulrich Spörlein
389ae6c65d Touch up some more small typos missed in the previous round.
Reported by:	Ben Kaduk <minimarmot@gmail.com> et al.
2012-01-05 21:36:45 +00:00
Ulrich Spörlein
f7bcc1c411 Further fix a typo and spelling classic correctly in function names,
too.

Submitted by:	Ben Kaduk <minimarmot@gmail.com>
2012-01-05 21:36:36 +00:00
Ulrich Spörlein
b81da4450d Partial backout of r228990, restore original MIB object name.
It's too late to change this in 9.0 -- so we have a release with the
misspelling in the wild and should not break users that depend on it.

Deprecating/replacing it because of a one-char typo seems excessive.
2012-01-05 21:36:28 +00:00
Pawel Jakub Dawidek
9a492fd171 Add an missing argument to open(2). If O_CREAT flag is specified,
file permission has to be specified as well.
2012-01-04 07:21:37 +00:00
Pawel Jakub Dawidek
24bc5224c6 Add an missing argument to open(2). If O_CREAT flag is specified,
file permission has to be specified as well.
2012-01-04 07:04:43 +00:00
Ed Schouten
b3608ae18f Replace index() and rindex() calls with strchr() and strrchr().
The index() and rindex() functions were marked LEGACY in the 2001
revision of POSIX and were subsequently removed from the 2008 revision.
The strchr() and strrchr() functions are part of the C standard.

This makes the source code a lot more consistent, as most of these C
files also call into other str*() routines. In fact, about a dozen
already perform strchr() calls.
2012-01-03 18:51:58 +00:00
Ed Schouten
b589816c74 Fix subtle typo: compare against idx -- not index.
In this contest, index refers to the index(3) function. In this case it
doesn't really harm, as this function is never called with idx == NULL.

MFC after:	2 weeks
2012-01-03 11:10:15 +00:00
Ed Schouten
c70a327b9f Simply use getprogname() to obtain the name of the process. 2012-01-03 11:08:58 +00:00
Stefan Farfeleder
45360108f8 Fix typos in command descriptions. 2011-12-31 12:12:41 +00:00
Ulrich Spörlein
3df5ecac8c Spelling fixes for usr.sbin/ 2011-12-30 10:58:14 +00:00
Ulrich Spörlein
f76b319989 Reencode files to UTF-8. Drop CP1252 em-dash. 2011-12-30 00:59:08 +00:00
Xin LI
981dfb0965 - Fail when the utility is not invoked as rtprio nor idprio.
- use warnx() to tell the user whether a process is running in normal,
   idle or realtime priority. with the old code it would have been possible
   for another process to send data to stdout between
	printf("%s: ", p);
   and
	printf("* priority\n");
   and thus break the formatting.
 - 'rtprio 10 -0' triggeres non-intuitive behavior.  It would first set the
   priority of itself to 10 *and* would then try to execute '-0'. Of course,
   setting the priority of [id|rt]prio itself doesn't make a lot of sense,
   but it is intuitive compared to the previous behavior.
 - 'rtprio -t --1' will actually pass over the '-1' to rtprio().  Now
   invoking rtprio like this will catch the wrong usage before passing
   over the invalid argument to rtprio().
 - Garrett Cooper suggested to add further diagnostics where the failure
   occures, if execvp fails.

PR:		bin/154042
Submitted by:	arundel
MFC after:	1 month
2011-12-27 20:03:57 +00:00
Eitan Adler
19e1bf2997 - document the -l option to usermod
PR:		docs/161588
Submitted by:	"Luchesar V. ILIEV" <luchesar.iliev@gmail.com>
Approved by:	gjb
MFC after:	1 week
2011-12-22 03:36:54 +00:00
Eitan Adler
5bf8645b8d - Fix style(9) bug I introduced in the last commit
Approved by:	jhb
2011-12-21 20:47:24 +00:00
Eitan Adler
520374b5aa - Remove extraneous null ptr deref checks
- Fix memory leak

Submitted by:	Slono Slono <slonoman2011@yandex.ru>
Approved by:	jhb
MFC after:	1 week
2011-12-21 20:27:41 +00:00
John Baldwin
f9a0145857 Allow boot0cfg to force a PXE boot via boot0 on the next boot.
- Fix boot0 to check for PXE when using the pre-set setting for the
  preferred slice.
- Update boot0cfg to use slice 6 to select PXE.  Accept a 'pxe' argument
  instead of a number for the 's' option as a way to select PXE as well.

Submitted by:	Andrew Boyer  aboyer averesystems
MFC after:	2 weeks
2011-12-20 15:19:29 +00:00
Ed Schouten
55a1bde99c Small cleanups to panic() prototype.
- Let panic() use _Noreturn and __printflike() instead of GCC-specific
  attributes.
- Remove prototype from ffs_subr.c and let it include ffs_extern.h.
- Forward declare struct inode to make ffs_extern.h not depend on it.
2011-12-20 12:34:17 +00:00
Dimitry Andric
8a0e4ea185 In usr.sbin/yp_mkdb/yp_mkdb.c, cast some printf field width parameters
to int, cast time_t to intmax_t, and use the corresponding printf length
modifier.

MFC after:	1 week
2011-12-19 20:44:44 +00:00
Dimitry Andric
5eeae9a725 In usr.sbin/uhsoctl/uhsoctl.c, fix a few warnings about format strings
not being literals.

MFC after:	1 week
2011-12-19 20:38:26 +00:00
Dimitry Andric
5c67a2799c Fix r228719; when you use intmax_t, you need stdint.h.
Pointy hat to:	dim
MFC after:	1 week
2011-12-19 20:33:53 +00:00
Dimitry Andric
655353a78c Some people pointed out long is 32-bit on some arches, while time_t is
64-bit, so better cast time_t to intmax_t, and use the appropriate
printf format strings.

MFC after:	1 week
2011-12-19 20:29:50 +00:00
Dimitry Andric
ad5b59d82c In usr.sbin/timed, fix several issues with printf formats:
- Cast time_t's to long, and print them with %ld.
- Print ptrdiff_t's with %td.
- Print ssize_t's and size_t's with %zd and %zu.
- Print int32_t's with %d.
Also, replace some int variables with the more appropriate size_t.

MFC after:	1 week
2011-12-19 18:08:31 +00:00
Dimitry Andric
136fb141c6 Unfortunately, clang gives warnings about sendmail code that cannot be
turned off yet.  Since this is contrib code, and we don't really care
about the warnings, just turn make them non-fatal for now.

MFC after:	1 week
2011-12-19 13:35:44 +00:00
Dimitry Andric
b134560923 Forgot to add usr.sbin/sade/label.c in the previous commit.
MFC after:	1 week
2011-12-18 01:14:38 +00:00
Dimitry Andric
7b910e702a In usr.sbin/sade/install.c and usr.sbin/sade/label.c, fix a few warnings
about format strings not being literals.

MFC after:	1 week
2011-12-18 01:13:21 +00:00
Dimitry Andric
4c14050c9d In usr.sbin/sa/db.c, avoid warnings about assigning two const char
arrays to non-const void pointers, by casting away const explicitly.

MFC after:	1 week
2011-12-18 01:08:25 +00:00
Dimitry Andric
0af4e80ae5 In usr.sbin/rpc.ypupdated/yp_dbupdate.c, since intmax_t is signed, just
like time_t, better use %jd instead of %ju.  Strangely enough, neither
gcc, clang nor gcc 4.6 warn about this discrepancy...

MFC after:	1 week
2011-12-18 00:55:46 +00:00
Dimitry Andric
ae1d153674 In usr.sbin/rpc.ypupdated/yp_dbupdate.c, include stdint.h, so intmax_t
is known, otherwise it won't build.

Pointy hat to:	dim
MFC after:	1 week
2011-12-18 00:44:59 +00:00
Dimitry Andric
7027737f5a In usr.sbin/rpc.ypupdated/yp_dbupdate.c, use the appropriate printf
length modifier for time_t (after casting it to intmax_t).

MFC after:	1 week
2011-12-18 00:40:30 +00:00
Dimitry Andric
2214781145 In usr.sbin/route6d/route6d.c, use the correct printf length modifier
for an ssize_t.

MFC after:	1 week
2011-12-18 00:03:03 +00:00
Dimitry Andric
5893527d84 In usr.sbin/pw/pw_user.c, use the correct printf length modifier for a
ptrdiff_t.

MFC after:	1 week
2011-12-17 23:46:47 +00:00
Dimitry Andric
e2d0cd59c3 In usr.sbin/pmccontrol/pmccontrol.c, fix a few warnings about format
strings not being literals.

MFC after:	1 week
2011-12-17 23:39:13 +00:00
Dimitry Andric
9a3df8edd1 In usr.sbin/pkg_install/updating/main.c, use the size of the destination
buffer as size argument to strlcpy(), not the length of the source.

MFC after:	1 week
2011-12-17 23:35:46 +00:00
Dimitry Andric
b41349deef Use NO_WCAST_ALIGN for usr.sbin/ndiscvt; because this is only built for
x86, any alignment warnings can be safely ignored.  Define YY_NO_INPUT
in usr.sbin/ndiscvt/inf-token.l, so no unused lex functions are defined.

MFC after:	1 week
2011-12-17 22:16:27 +00:00
Dimitry Andric
97fbdc11ea In usr.sbin/lpr/lpd/printjob.c, use the correct printf length modifiers
for off_t (aka int64_t).

MFC after:	1 week
2011-12-17 22:05:28 +00:00
Dimitry Andric
7ae1a27825 In usr.sbin/lpr/filters/lpf.c, use a less obtuse way of clearing the
buffer, that also avoids warnings.

MFC after:	1 week
2011-12-17 21:37:21 +00:00
Dimitry Andric
740885817c In usr.sbin/keyserv, fix some implicit enum conversions, and use the
correct printf length modifiers for uid_t.

MFC after:	1 week
2011-12-17 20:53:06 +00:00
Dimitry Andric
cfed15e6c5 In usr.sbin/iostat/iostat.c, use printf format specifiers from
inttypes.h for u_int64_t's.  While here, sort #include directives.

MFC after:	1 week
2011-12-17 20:25:23 +00:00
Dimitry Andric
928e797dc0 In usr.sbin/i2c/i2c.c, fix a few warnings about format strings not being
literals.

MFC after:	1 week
2011-12-17 20:12:17 +00:00
Dimitry Andric
e0c518be94 In usr.sbin/ctm/ctm_dequeue/ctm_dequeue.c, cast a printf field width
parameter to int.

MFC after:	1 week
2011-12-17 20:07:42 +00:00
Dimitry Andric
5207dac8ba Use NO_WCAST_ALIGN for usr.sbin/cpucontrol; because this is only built
for x86, any alignment warnings can be safely ignored.

MFC after:	1 week
2011-12-17 19:58:48 +00:00
Dimitry Andric
1605515d77 In usr.sbin/bsnmpd/modules/snmp_wlan/wlan_snmp.h, use the correct
enumeration types for the mesh_peering and mesh_forwarding members of
struct wlan_iface, to fix enum conversion warnings.

MFC after:	1 week
2011-12-17 19:53:08 +00:00
Dimitry Andric
14fa6dc403 Use NO_WCAST_ALIGN for usr.sbin/boot0cfg; because this is only built for
x86, any alignment warnings can be safely ignored.

MFC after:	1 week
2011-12-17 19:33:26 +00:00
Dimitry Andric
98e0f284ba In usr.sbin/bluetooth/sdpd/server.c, don't use the size of a pointer as
the length argument to memset, but the size of the object pointed to.

MFC after:	1 week
2011-12-17 19:26:03 +00:00
Ed Schouten
4d9a3537ff Add missing static and const keywords to kbdcontrol.
None of the symbols provided by kbdcontrol.c are used by other source
files of this binary. Slightly reduce the binary size and make much more
symbols read-only by adding proper static and const keywords.
2011-12-12 12:33:38 +00:00
Fabien Thomas
96ff3b75d4 Add VIA microde update support to cpuctl(4) and cpucontrol(8).
Support have been tested with X2 CPU and QuadCore CPU.

MFC after:	1 month
2011-12-12 12:30:44 +00:00
Ed Schouten
3be02c20ca Add static keywords to vidcontrol(1).
While there, remove the false optimisation of the colors array. It seems
that changing it to an array of pointers instead of a 16x16 array does
not cause any increase in binary size at all.
2011-12-11 21:02:33 +00:00
Ed Schouten
e120624d32 Add missing static keyword.
All global variables and functions in powerd are marked static, except
this array of strings. Add the keyword, for consistency.
2011-12-11 19:22:42 +00:00
Ed Schouten
516c8ed9dd Replace char copyright[] by static const char copyright[].
It seems the latter is used throughout the tree.
2011-12-10 18:11:06 +00:00
John Baldwin
1b202316ec Use the correct volume identifier field when parsing MR_EVT_ARG_LD_STRIP
arguments.

MFC after:	2 weeks
2011-12-05 15:11:35 +00:00
Nathan Whitehorn
6081c922d2 Prevent user astonishment by providing the shell option at the end, after
any installer-provided configuration files have been copied. This allows
users to edit their fstab, if desired, and to see what the installer has
placed in rc.conf.

Requested by:	phk
MFC after:	1 day
2011-12-02 02:05:26 +00:00