]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/log
FreeBSD/FreeBSD.git
12 years agodu: Allow multiple -HLP options, the last one wins.
jilles [Sat, 17 Dec 2011 23:18:14 +0000 (23:18 +0000)]
du: Allow multiple -HLP options, the last one wins.

This matches 4.4BSD tradition and other utilities with these options and is
required by POSIX (POSIX does not specify -P, only -HL).

MFC after: 2 weeks

12 years agoRevert r228650, and work around the clang false positive with printf
dim [Sat, 17 Dec 2011 22:32:00 +0000 (22:32 +0000)]
Revert r228650, and work around the clang false positive with printf
formats in usr.bin/netstat/atalk.c by conditionally adding NO_WFORMAT to
the Makefile instead.

MFC after: 1 week

12 years agoIn usr.bin/csup/auth.c, cast time_t to intmax_t instead, and use the
dim [Sat, 17 Dec 2011 22:20:46 +0000 (22:20 +0000)]
In usr.bin/csup/auth.c, cast time_t to intmax_t instead, and use the
corresponding printf length modifier.

Requested by: mdf
MFC after: 1 week

12 years agoFix style and white spaces.
trociny [Sat, 17 Dec 2011 22:18:26 +0000 (22:18 +0000)]
Fix style and white spaces.

MFC after: 1 week

12 years agoUse NO_WCAST_ALIGN for usr.sbin/ndiscvt; because this is only built for
dim [Sat, 17 Dec 2011 22:16:27 +0000 (22:16 +0000)]
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

12 years agoIn usr.sbin/lpr/lpd/printjob.c, use the correct printf length modifiers
dim [Sat, 17 Dec 2011 22:05:28 +0000 (22:05 +0000)]
In usr.sbin/lpr/lpd/printjob.c, use the correct printf length modifiers
for off_t (aka int64_t).

MFC after: 1 week

12 years agoIn usr.sbin/lpr/filters/lpf.c, use a less obtuse way of clearing the
dim [Sat, 17 Dec 2011 21:37:21 +0000 (21:37 +0000)]
In usr.sbin/lpr/filters/lpf.c, use a less obtuse way of clearing the
buffer, that also avoids warnings.

MFC after: 1 week

12 years agoIn usr.sbin/keyserv, fix some implicit enum conversions, and use the
dim [Sat, 17 Dec 2011 20:53:06 +0000 (20:53 +0000)]
In usr.sbin/keyserv, fix some implicit enum conversions, and use the
correct printf length modifiers for uid_t.

MFC after: 1 week

12 years agoIn usr.sbin/iostat/iostat.c, use printf format specifiers from
dim [Sat, 17 Dec 2011 20:25:23 +0000 (20:25 +0000)]
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

12 years agoIn usr.sbin/i2c/i2c.c, fix a few warnings about format strings not being
dim [Sat, 17 Dec 2011 20:12:17 +0000 (20:12 +0000)]
In usr.sbin/i2c/i2c.c, fix a few warnings about format strings not being
literals.

MFC after: 1 week

12 years agoIn usr.sbin/ctm/ctm_dequeue/ctm_dequeue.c, cast a printf field width
dim [Sat, 17 Dec 2011 20:07:42 +0000 (20:07 +0000)]
In usr.sbin/ctm/ctm_dequeue/ctm_dequeue.c, cast a printf field width
parameter to int.

MFC after: 1 week

12 years agoUse NO_WCAST_ALIGN for usr.sbin/cpucontrol; because this is only built
dim [Sat, 17 Dec 2011 19:58:48 +0000 (19:58 +0000)]
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

12 years agoIn usr.sbin/bsnmpd/modules/snmp_wlan/wlan_snmp.h, use the correct
dim [Sat, 17 Dec 2011 19:53:08 +0000 (19:53 +0000)]
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

12 years agoUse NO_WCAST_ALIGN for usr.sbin/boot0cfg; because this is only built for
dim [Sat, 17 Dec 2011 19:33:26 +0000 (19:33 +0000)]
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

12 years agoIn usr.sbin/bluetooth/sdpd/server.c, don't use the size of a pointer as
dim [Sat, 17 Dec 2011 19:26:03 +0000 (19:26 +0000)]
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

12 years agoIn usr.bin/vmstat/vmstat.c, cast several printf field widths to int, and
dim [Sat, 17 Dec 2011 19:22:24 +0000 (19:22 +0000)]
In usr.bin/vmstat/vmstat.c, cast several printf field widths to int, and
use printf format specifiers from inttypes.h for uint64_t's.

MFC after: 1 week

12 years agoFix unused parameter warnings.
tuexen [Sat, 17 Dec 2011 19:21:40 +0000 (19:21 +0000)]
Fix unused parameter warnings.
While there, fix some whitespace issues.

MFC after: 3 months.

12 years agoUnfortunately, clang gives warnings about sendmail code that cannot be
dim [Sat, 17 Dec 2011 18:39:04 +0000 (18:39 +0000)]
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

12 years agoIn contrib/telnet/telnet/utilities.c, fix a few warnings about format
dim [Sat, 17 Dec 2011 18:18:36 +0000 (18:18 +0000)]
In contrib/telnet/telnet/utilities.c, fix a few warnings about format
strings not being literals.

MFC after: 1 week

12 years agoIn usr.bin/netstat/atalk.c, work around a clang false positive with
dim [Sat, 17 Dec 2011 17:21:47 +0000 (17:21 +0000)]
In usr.bin/netstat/atalk.c, work around a clang false positive with
printf format warnings and conditional operators.

MFC after: 1 week

12 years agoUse NO_WCAST_ALIGN for usr.bin/ncplist, as there are many potential
dim [Sat, 17 Dec 2011 17:04:30 +0000 (17:04 +0000)]
Use NO_WCAST_ALIGN for usr.bin/ncplist, as there are many potential
alignment issues in it.  (Though I doubt anyone still cares about
NetWare support...)

MFC after: 1 week

12 years agoOn start most of sysctl_kern_proc functions use the same pattern:
trociny [Sat, 17 Dec 2011 16:59:22 +0000 (16:59 +0000)]
On start most of sysctl_kern_proc functions use the same pattern:
locate a process calling pfind() and do some additional checks like
p_candebug(). To reduce this code duplication a new function pget() is
introduced and used.

As the function may be useful not only in kern_proc.c it is in the
kernel name space.

Suggested by: kib
Reviewed by: kib
MFC after: 2 weeks

12 years agoIn usr.bin/mail/cmd1.c, use the correct printf length modifier for a
dim [Sat, 17 Dec 2011 16:30:42 +0000 (16:30 +0000)]
In usr.bin/mail/cmd1.c, use the correct printf length modifier for a
ptrdiff_t.  In usr.bin/mail/main.c, cast a field width to int.

MFC after: 1 week

12 years agoAdditional icache paranoia: non-PLT relocations can modify the text segment.
nwhitehorn [Sat, 17 Dec 2011 16:20:27 +0000 (16:20 +0000)]
Additional icache paranoia: non-PLT relocations can modify the text segment.
It is then important to make sure the icache is synchronized again to
prevent (rare) random seg faults and illegal instructions.

MFC after: 3 days

12 years agoIn contrib/less, cast away const a bunch of times, to make it build
dim [Sat, 17 Dec 2011 16:10:14 +0000 (16:10 +0000)]
In contrib/less, cast away const a bunch of times, to make it build
without conversion warnings.  This code desparately needs a good dose of
const poison, but fixing all the issues would be rather disruptive.

MFC after: 1 week

12 years agosyscons: provide a first iteration of cngrab/cnungrab implementation
avg [Sat, 17 Dec 2011 15:57:39 +0000 (15:57 +0000)]
syscons: provide a first iteration of cngrab/cnungrab implementation

- put underlying keyboard(s) into the polling mode for the whole
  duration of the grab, instead of the previous behavior of going into
  and out of the polling mode around each polling attempt
- ditto for setting K_XLATE mode and enabling a disabled keyboard

Inspired by: bde
MFC after: 2 months

12 years agobelatedly transfer copyrights from libkern/gets.c to kern_cons.c
avg [Sat, 17 Dec 2011 15:50:45 +0000 (15:50 +0000)]
belatedly transfer copyrights from libkern/gets.c to kern_cons.c

MFC after: 2 months
MFC with: r228642

12 years agoretire libkern gets
avg [Sat, 17 Dec 2011 15:48:55 +0000 (15:48 +0000)]
retire libkern gets

Inspired by: bde
MFC after: 2 months
X-MFC-Note: if deemed a part of KPI, just call cngets internally

12 years agoAllow toggling of IFCAP_VLAN_HWCSUM for hardware that supports checksum
bz [Sat, 17 Dec 2011 15:44:34 +0000 (15:44 +0000)]
Allow toggling of IFCAP_VLAN_HWCSUM for hardware that supports checksum
offloading on vlans and document the new option.

MFC after: 2 weeks
Sponsored by: The FreeBSD Foundation

12 years agoUnbreak the OCTEON1 kernel build after r228483 removing the left over
bz [Sat, 17 Dec 2011 15:42:37 +0000 (15:42 +0000)]
Unbreak the OCTEON1 kernel build after r228483 removing the left over
declaration.

MFC after: 11 days

12 years agoIn usr.bin/indent/io.c, fix a few warnings about format strings not being literals.
dim [Sat, 17 Dec 2011 15:41:58 +0000 (15:41 +0000)]
In usr.bin/indent/io.c, fix a few warnings about format strings not being literals.

MFC after: 1 week

12 years agomove GETS_*ECHO* defintions from libkern.h to cons.h
avg [Sat, 17 Dec 2011 15:39:14 +0000 (15:39 +0000)]
move GETS_*ECHO* defintions from libkern.h to cons.h

MFC after: 2 months

12 years agoAnother axe(4), found in ASUS zenbook.
kevlo [Sat, 17 Dec 2011 15:38:16 +0000 (15:38 +0000)]
Another axe(4), found in ASUS zenbook.

12 years agoCorrect a logic error in usr.bin/hexdump/conv.c, found by clang.
dim [Sat, 17 Dec 2011 15:33:26 +0000 (15:33 +0000)]
Correct a logic error in usr.bin/hexdump/conv.c, found by clang.

Whenever the conv_c() function encounters an incomplete multibyte char,
it peeks ahead.  It also sets p to peekbuf, to indicate it is still
processing the incomplete character.

However, on the next retry, it compares buf against peekbuf, which
always returns false, since both buf and peekbuf are local char arrays,
whose addresses are never the same.

Fix this by comparing against p instead, which was the intention.  Also
turn peekbuf into an array of u_char, to prevent conversion warnings.

MFC after: 1 week

12 years agoFix RTLD on PowerPC after r228435. Changing the order of init_pltgot()
nwhitehorn [Sat, 17 Dec 2011 15:31:00 +0000 (15:31 +0000)]
Fix RTLD on PowerPC after r228435. Changing the order of init_pltgot()
caused the icache to be invalidated at the wrong time, resulting in
an icache full of nonsense in the PLT section.

12 years agoreplace uses of libkern gets with cngets
avg [Sat, 17 Dec 2011 15:26:34 +0000 (15:26 +0000)]
replace uses of libkern gets with cngets

MFC after: 2 months

12 years agointroduce cngets, a method for kernel to read a string from console
avg [Sat, 17 Dec 2011 15:16:54 +0000 (15:16 +0000)]
introduce cngets, a method for kernel to read a string from console

This is intended as a replacement for libkern's gets and mostly borrows
its implementation.  It uses cngrab/cnungrab to delimit kernel's access
to console input.

Note: libkern's gets obviously doesn't share any bits of implementation
iwth libc's gets.  They also have different APIs and the former doesn't
have the overflow problems of the latter.

Inspired by: bde
MFC after: 2 months

12 years agointroduce cngrab/cnungrab stub calls in some places where they make sense
avg [Sat, 17 Dec 2011 15:11:22 +0000 (15:11 +0000)]
introduce cngrab/cnungrab stub calls in some places where they make sense

MFC after: 2 months

12 years agokern cons: introduce infrastructure for console grabbing by kernel
avg [Sat, 17 Dec 2011 15:08:43 +0000 (15:08 +0000)]
kern cons: introduce infrastructure for console grabbing by kernel

At the moment grab and ungrab methods of all console drivers are no-ops.

Current intended meaning of the calls is that the kernel takes control of
console input.  In the future the semantics may be extended to mean that
the calling thread takes full ownership of the console (e.g. console
output from other threads could be suspended).

Inspired by: bde
MFC after: 2 months

12 years agoAddress warnings found by clang.
tuexen [Sat, 17 Dec 2011 14:55:19 +0000 (14:55 +0000)]
Address warnings found by clang.

MFC after: 3 months.

12 years agoMore fixes for correct printf length modifiers usr.bin/gprof.
dim [Sat, 17 Dec 2011 14:51:24 +0000 (14:51 +0000)]
More fixes for correct printf length modifiers usr.bin/gprof.

MFC after: 1 week

12 years agoIn usr.bin/gprof/aout.c, use the correct printf length modifier for a
dim [Sat, 17 Dec 2011 14:37:41 +0000 (14:37 +0000)]
In usr.bin/gprof/aout.c, use the correct printf length modifier for a
uint32_t.

MFC after: 1 week

12 years agoIn contrib/ee/ee.c, fix a few warnings about format strings not being
dim [Sat, 17 Dec 2011 14:26:16 +0000 (14:26 +0000)]
In contrib/ee/ee.c, fix a few warnings about format strings not being
literals.  Also, change the direction argument to move_rel() from char
to int; K&R function definions cause it to be promoted to an int anyway,
and this way we avoid clang warning about it.

MFC after: 1 week

12 years agoIn usr.bin/csup/proto.c, use the correct printf length modifier to print
dim [Sat, 17 Dec 2011 13:52:53 +0000 (13:52 +0000)]
In usr.bin/csup/proto.c, use the correct printf length modifier to print
an off_t.

MFC after: 1 week

12 years agoIn usr.bin/csup/auth.c, use the correct number of bytes for zeroing the
dim [Sat, 17 Dec 2011 13:14:44 +0000 (13:14 +0000)]
In usr.bin/csup/auth.c, use the correct number of bytes for zeroing the
shared secret, and use long long format to snprintf a time_t.

MFC after: 1 week

12 years agoIn contrib/bzip2/bzip2recover.c, use the correct printf length modifier
dim [Sat, 17 Dec 2011 12:52:58 +0000 (12:52 +0000)]
In contrib/bzip2/bzip2recover.c, use the correct printf length modifier
for unsigned long long.

MFC after: 1 week

12 years agoAdter r228571 unbreak architectures with strict alignment rules
bz [Sat, 17 Dec 2011 11:06:22 +0000 (11:06 +0000)]
Adter r228571 unbreak architectures with strict alignment rules
by copying rather than casting.

12 years agoRemove now redundant mac argument.
bschmidt [Sat, 17 Dec 2011 10:32:31 +0000 (10:32 +0000)]
Remove now redundant mac argument.

Discussed with: adrian@

12 years agoFix some net80211 enum nits:
bschmidt [Sat, 17 Dec 2011 10:23:17 +0000 (10:23 +0000)]
Fix some net80211 enum nits:
- ic_vap_create() uses an ieee80211_opmode argument
- ieee80211_rate2media() takes an ieee80211_phymode argument
- ieee80211_plcp2rate() takes an ieee80211_phytype argument
- cast to enum ieee80211_protmode and ieee80211_roamingmode to silence
  compiler warnings

Submitted by: arundel@

12 years agoFixed some of markup.
ru [Sat, 17 Dec 2011 06:57:35 +0000 (06:57 +0000)]
Fixed some of markup.

Reviewed by: jhb

12 years agoIn usr.bin/mt/mt.c, the c_code member of struct commands should really
dim [Sat, 17 Dec 2011 02:23:30 +0000 (02:23 +0000)]
In usr.bin/mt/mt.c, the c_code member of struct commands should really
be an unsigned long, since it will contain values of ioctl request
codes.  On 64-bit arches, these will not fit into an int.

MFC after: 1 week

12 years agoIn sbin/devd/devd.h, 'event_proc' and 'eps' are declared as structs. In
dim [Sat, 17 Dec 2011 01:54:51 +0000 (01:54 +0000)]
In sbin/devd/devd.h, 'event_proc' and 'eps' are declared as structs.  In
devd.hh, there are redeclared as classes.  Fix the inconsistency.

MFC after: 1 week

12 years agoDisable yet another clang warning when WARNS <= 3.
dim [Sat, 17 Dec 2011 01:51:12 +0000 (01:51 +0000)]
Disable yet another clang warning when WARNS <= 3.

MFC after: 1 week

12 years agoIn usr.bin/tar/tree.c, if you really want to poke to NULL, you must use
dim [Sat, 17 Dec 2011 01:36:50 +0000 (01:36 +0000)]
In usr.bin/tar/tree.c, if you really want to poke to NULL, you must use
volatile, otherwise the indirection will not be emitted.

MFC after: 1 week

12 years agoIn sbin/dhclient, since we know the size of the source strings anyway,
dim [Sat, 17 Dec 2011 01:29:46 +0000 (01:29 +0000)]
In sbin/dhclient, since we know the size of the source strings anyway,
we might as well use memcpy; strlcpy is really unnecessary here.

MFC after: 1 week

12 years agoIn sbin/dhclient, work around warnings about the size argument to
dim [Sat, 17 Dec 2011 01:19:07 +0000 (01:19 +0000)]
In sbin/dhclient, work around warnings about the size argument to
strlcpy appearing to be the size of the source buffer, instead of the
destination.

MFC after: 1 week

12 years agoUse both NO_WFORMAT and NO_WARRAY_BOUNDS for sbin/ipf, it would be too
dim [Sat, 17 Dec 2011 00:54:09 +0000 (00:54 +0000)]
Use both NO_WFORMAT and NO_WARRAY_BOUNDS for sbin/ipf, it would be too
disruptive to actually fix all the warnings, and the code hasn't been
maintained for several years.

MFC after: 1 week

12 years agoIn sbin/atm/atmconfig/diag.c, fix a few warnings about format strings
dim [Sat, 17 Dec 2011 00:26:45 +0000 (00:26 +0000)]
In sbin/atm/atmconfig/diag.c, fix a few warnings about format strings
not being literals.

MFC after: 1 week

12 years agoUse NO_WCAST_ALIGN for sbin/gbde, this is more appropriate to fix the
dim [Sat, 17 Dec 2011 00:14:40 +0000 (00:14 +0000)]
Use NO_WCAST_ALIGN for sbin/gbde, this is more appropriate to fix the
alignment warnings than using WARNS=3, and it also works for clang.

MFC after: 1 week

12 years agoAllow this to work on embedded systems without Open Firmware by making
nwhitehorn [Fri, 16 Dec 2011 23:46:05 +0000 (23:46 +0000)]
Allow this to work on embedded systems without Open Firmware by making
lack of a /chosen non-fatal, and manually removing memory in use by the
kernel from the physical memory map.

Submitted by: rpaulo

12 years agoUse NO_WARRAY_BOUNDS for sbin/routed/rtquery.
dim [Fri, 16 Dec 2011 23:43:58 +0000 (23:43 +0000)]
Use NO_WARRAY_BOUNDS for sbin/routed/rtquery.

MFC after: 1 week

12 years agoAdd a NO_WARRAY_BOUNDS setting to bsd.sys.mk, only applicable to clang,
dim [Fri, 16 Dec 2011 23:42:25 +0000 (23:42 +0000)]
Add a NO_WARRAY_BOUNDS setting to bsd.sys.mk, only applicable to clang,
to selectively work around warnings in programs that don't use flexible
array members, but instead define arrays of length 1 at the end of the
struct, and then access those beyond their declared bounds.

MFC after: 1 week

12 years agoZero BSS on start, in case the ELF loader that started the kernel did not
nwhitehorn [Fri, 16 Dec 2011 23:40:56 +0000 (23:40 +0000)]
Zero BSS on start, in case the ELF loader that started the kernel did not
do this for us. This can happen on some embedded systems.

Submitted by: rpaulo

12 years agoIn contrib/gperf/src/output.cc, use the correct printf length modifier
dim [Fri, 16 Dec 2011 23:15:11 +0000 (23:15 +0000)]
In contrib/gperf/src/output.cc, use the correct printf length modifier
for a ptrdiff_t.

MFC after: 1 week

12 years agoIn sbin/fsdb/fsdbutil.c, work around a clang false positive with printf
dim [Fri, 16 Dec 2011 23:09:31 +0000 (23:09 +0000)]
In sbin/fsdb/fsdbutil.c, work around a clang false positive with printf
format warnings and conditional operators.  (See LLVM PR 11313 for more
information.)

MFC after: 1 week

12 years agoIn sbin/camcontrol/camcontrol.c, fix a few warnings about format strings
dim [Fri, 16 Dec 2011 22:35:19 +0000 (22:35 +0000)]
In sbin/camcontrol/camcontrol.c, fix a few warnings about format strings
not being literals.

MFC after: 1 week

12 years agoDefine YY_NO_INPUT when building libbinutils, to prevent warnings about
dim [Fri, 16 Dec 2011 22:19:13 +0000 (22:19 +0000)]
Define YY_NO_INPUT when building libbinutils, to prevent warnings about
unused input() functions emitted by lex.

MFC after: 1 week

12 years agoFix the incompatible enum conversions in libexec/ypxfr in another, more
dim [Fri, 16 Dec 2011 22:05:10 +0000 (22:05 +0000)]
Fix the incompatible enum conversions in libexec/ypxfr in another, more
messy way, so as to not disrupt other yp programs: just add casts to
convert the incompatible enums, as the numerical values are the same
(either by accident, design, or the phase of the moon at that time).

MFC after: 1 week

12 years agoRevert r228592, as the non-messy way of fixing ypxfr breaks other yp
dim [Fri, 16 Dec 2011 21:57:44 +0000 (21:57 +0000)]
Revert r228592, as the non-messy way of fixing ypxfr breaks other yp
programs (e.g. usr.sbin/rpc.yppasswdd).

Spotted by: np
MFC after: 1 week

12 years agoIn cddl/contrib/opensolaris/cmd/dtrace/dtrace.c, fix some obtuse
dim [Fri, 16 Dec 2011 21:48:09 +0000 (21:48 +0000)]
In cddl/contrib/opensolaris/cmd/dtrace/dtrace.c, fix some obtuse
snprintf tricks.

MFC after: 1 week

12 years agoIn cddl/contrib/opensolaris/tools/ctf/cvt/ctfmerge.c, a size_t is passed
dim [Fri, 16 Dec 2011 21:29:46 +0000 (21:29 +0000)]
In cddl/contrib/opensolaris/tools/ctf/cvt/ctfmerge.c, a size_t is passed
to fprintf as a field width.  It should be an int instead, so cast it.

MFC after: 1 week

12 years agoIn games/factor/factor.c, fix a warning about a format string not being
dim [Fri, 16 Dec 2011 21:24:11 +0000 (21:24 +0000)]
In games/factor/factor.c, fix a warning about a format string not being
a literal.

MFC after: 1 week

12 years agoFix some obtuse fprintf tricks in bin/ed.
dim [Fri, 16 Dec 2011 21:12:23 +0000 (21:12 +0000)]
Fix some obtuse fprintf tricks in bin/ed.

MFC after: 1 week

12 years agoCatch up with new driver ioctls in cxgbe.
np [Fri, 16 Dec 2011 20:38:22 +0000 (20:38 +0000)]
Catch up with new driver ioctls in cxgbe.

MFC after: 1 month

12 years agoFire a kevent if necessary after seeking on a regular file. This fixes a
jhb [Fri, 16 Dec 2011 20:10:00 +0000 (20:10 +0000)]
Fire a kevent if necessary after seeking on a regular file.  This fixes a
case where a kevent would not fire on a regular file if an application read
to EOF and then seeked backwards into the file.

Reviewed by: kib
MFC after: 2 weeks

12 years agoAttempt to fix the numerous incompatible enum conversions in
dim [Fri, 16 Dec 2011 19:39:49 +0000 (19:39 +0000)]
Attempt to fix the numerous incompatible enum conversions in
libexec/ypxfr in the least disruptive way.

MFC after: 1 week

12 years agoFix typos in the comments about clang warnings in several
dim [Fri, 16 Dec 2011 17:02:25 +0000 (17:02 +0000)]
Fix typos in the comments about clang warnings in several
sendmail-related Makefiles.

Spotted by: arundel
MFC after: 1 week

12 years agoIn contrib/telnet/telnetd/utility.c, fix a few warnings about format
dim [Fri, 16 Dec 2011 16:53:54 +0000 (16:53 +0000)]
In contrib/telnet/telnetd/utility.c, fix a few warnings about format
strings not being literals.

MFC after: 1 week

12 years agoUnfortunately, clang gives warnings about sendmail code that cannot be
dim [Fri, 16 Dec 2011 16:32:08 +0000 (16:32 +0000)]
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

12 years agoIn libexec/rbootd/utils.c, use the correct printf length modifiers for
dim [Fri, 16 Dec 2011 16:29:51 +0000 (16:29 +0000)]
In libexec/rbootd/utils.c, use the correct printf length modifiers for
u_int32_t and size_t.

MFC after: 1 week

12 years agoIn libexec/pppoed/pppoed.c, use the correct printf length modifier for a
dim [Fri, 16 Dec 2011 16:07:39 +0000 (16:07 +0000)]
In libexec/pppoed/pppoed.c, use the correct printf length modifier for a
size_t.

MFC after: 1 week

12 years agoUnfortunately, clang gives warnings about sendmail code that cannot be
dim [Fri, 16 Dec 2011 15:58:38 +0000 (15:58 +0000)]
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

12 years agoIn libexec/bootpd/tools/bootptest/print-bootp.c, use the correct printf
dim [Fri, 16 Dec 2011 15:55:43 +0000 (15:55 +0000)]
In libexec/bootpd/tools/bootptest/print-bootp.c, use the correct printf
length modifier for the difference between two pointers.

MFC after: 1 week

12 years agoStyle cleanups by jh@.
pfg [Fri, 16 Dec 2011 15:47:43 +0000 (15:47 +0000)]
Style cleanups by jh@.
Fix a comment from the previous commit.
Use M_ZERO instead of bzero() in ext2_vfsops.c
Add include guards from PR.

PR: 162564
Approved by: jhb (mentor)
MFC after: 2 weeks

12 years agoIn libexec/getty/chat.c, replace && with & in chat_send(). The intent
dim [Fri, 16 Dec 2011 15:44:12 +0000 (15:44 +0000)]
In libexec/getty/chat.c, replace && with & in chat_send().  The intent
is to test if the CHATDEBUG_SEND bit is set in the chat_debug global.

MFC after: 1 week

12 years agoIn libexec/bootpd/bootpgw/bootpgw.c, add a cast for the remaining
dim [Fri, 16 Dec 2011 15:38:11 +0000 (15:38 +0000)]
In libexec/bootpd/bootpgw/bootpgw.c, add a cast for the remaining
minutes of activity, to avoid a warning on platforms where time_t is a
32-bit integer.

MFC after: 1 week

12 years agoIn cddl/contrib/opensolaris/lib/libdtrace/common/dt_handle.c, some
dim [Fri, 16 Dec 2011 15:12:42 +0000 (15:12 +0000)]
In cddl/contrib/opensolaris/lib/libdtrace/common/dt_handle.c, some
uint64_t values are snprintf'd using %llx.  On amd64, uint64_t is
typedef'd as unsigned long, so cast the values to u_longlong_t, as is
done similarly in the rest of the file.

MFC after: 1 week

12 years agoIn cddl/contrib/opensolaris/lib/libdtrace/common/dt_consume.c, some
dim [Fri, 16 Dec 2011 15:04:47 +0000 (15:04 +0000)]
In cddl/contrib/opensolaris/lib/libdtrace/common/dt_consume.c, some
uint64_t values are snprintf'd using %llx.  On amd64, uint64_t is
typedef'd as unsigned long, so cast the values to u_longlong_t, as is
done similarly in the rest of the file.

MFC after: 1 week

12 years agoIn lib/libthread_db/arch/i386/libpthread_md.c, clang gives two incorrect
dim [Fri, 16 Dec 2011 15:00:56 +0000 (15:00 +0000)]
In lib/libthread_db/arch/i386/libpthread_md.c, clang gives two incorrect
warnings about alignment, so turn -Wcast-align off for now.

MFC after: 1 week

12 years agoRename ifcarp.c to carp.c
glebius [Fri, 16 Dec 2011 14:30:58 +0000 (14:30 +0000)]
Rename ifcarp.c to carp.c

12 years ago- Rename if_carp.ko to carp.ko.
glebius [Fri, 16 Dec 2011 14:28:34 +0000 (14:28 +0000)]
- Rename if_carp.ko to carp.ko.
- carp.ko depends on sha1.c

12 years agoSome formatting fixes.
mav [Fri, 16 Dec 2011 14:19:46 +0000 (14:19 +0000)]
Some formatting fixes.

Submitted by: ru

12 years agoSince size of struct in_aliasreq has just been changed in r228571,
glebius [Fri, 16 Dec 2011 13:30:17 +0000 (13:30 +0000)]
Since size of struct in_aliasreq has just been changed in r228571,
and thus ifconfig(8) needs recompile, it is a good chance to make
parameter checks on SIOCAIFADDR arguments more strict.

12 years agoFix format string Z --> z, since the former is a deprecated and (in FreeBSD)
se [Fri, 16 Dec 2011 12:42:02 +0000 (12:42 +0000)]
Fix format string Z --> z, since the former is a deprecated and (in FreeBSD)
unsupported form of the latter. This change has been reviewed and accepted
in the -hackers list.

Submitted by: Alexander Best
Reviewed by: David Schulz

12 years agoA major overhaul of the CARP implementation. The ip_carp.c was started
glebius [Fri, 16 Dec 2011 12:16:56 +0000 (12:16 +0000)]
A major overhaul of the CARP implementation. The ip_carp.c was started
from scratch, copying needed functionality from the old implemenation
on demand, with a thorough review of all code. The main change is that
interface layer has been removed from the CARP. Now redundant addresses
are configured exactly on the interfaces, they run on.

The CARP configuration itself is, as before, configured and read via
SIOCSVH/SIOCGVH ioctls. A new prefix created with SIOCAIFADDR or
SIOCAIFADDR_IN6 may now be configured to a particular virtual host id,
which makes the prefix redundant.

ifconfig(8) semantics has been changed too: now one doesn't need
to clone carpXX interface, he/she should directly configure a vhid
on a Ethernet interface.

To supply vhid data from the kernel to an application the getifaddrs(8)
function had been changed to pass ifam_data with each address. [1]

The new implementation definitely closes all PRs related to carp(4)
being an interface, and may close several others. It also allows
to run a single redundant IP per interface.

Big thanks to Bjoern Zeeb for his help with inet6 part of patch, for
idea on using ifam_data and for several rounds of reviewing!

PR: kern/117000, kern/126945, kern/126714, kern/120130, kern/117448
Reviewed by: bz
Submitted by: bz [1]

12 years agoDocument 'findstack'.
kib [Fri, 16 Dec 2011 11:52:33 +0000 (11:52 +0000)]
Document 'findstack'.

MFC after: 1 week

12 years agoAdd 'findstack' ddb command to search either the thread kernel stack
kib [Fri, 16 Dec 2011 11:44:20 +0000 (11:44 +0000)]
Add 'findstack' ddb command to search either the thread kernel stack
or cached stack containing the specified kernel virtual address.

Discussed with: pho
MFC after: 1 week

12 years agoShow the thread kernel stack base address for 'show threads'.
kib [Fri, 16 Dec 2011 11:42:50 +0000 (11:42 +0000)]
Show the thread kernel stack base address for 'show threads'.

Discussed with: pho
MFC after: 1 week

12 years agoMove kstack_cache_entry into the private header, and make the
kib [Fri, 16 Dec 2011 10:56:16 +0000 (10:56 +0000)]
Move kstack_cache_entry into the private header, and make the
stack cache list header accessible outside vm_glue.c.

MFC after: 1 week

12 years agoXref re_format(7) in devd.conf(5), not in devd(8).
glebius [Fri, 16 Dec 2011 10:21:01 +0000 (10:21 +0000)]
Xref re_format(7) in devd.conf(5), not in devd(8).

Pointy hat to: glebius