Commit Graph

166958 Commits

Author SHA1 Message Date
Ruslan Ermilov
e9a2004460 Fixed some of markup.
Reviewed by:	jhb
2011-12-17 06:57:35 +00:00
Dimitry Andric
f3fbaba136 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
2011-12-17 02:23:30 +00:00
Dimitry Andric
b884d5e84a 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
2011-12-17 01:54:51 +00:00
Dimitry Andric
9b9c36a3b5 Disable yet another clang warning when WARNS <= 3.
MFC after:	1 week
2011-12-17 01:51:12 +00:00
Dimitry Andric
940695fffb 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
2011-12-17 01:36:50 +00:00
Dimitry Andric
7824741286 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
2011-12-17 01:29:46 +00:00
Dimitry Andric
e2f95dd941 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
2011-12-17 01:19:07 +00:00
Dimitry Andric
650fd1e4e4 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
2011-12-17 00:54:09 +00:00
Dimitry Andric
5323d72245 In sbin/atm/atmconfig/diag.c, fix a few warnings about format strings
not being literals.

MFC after:	1 week
2011-12-17 00:26:45 +00:00
Dimitry Andric
c0a8e7ad42 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
2011-12-17 00:14:40 +00:00
Nathan Whitehorn
e347e23bfe 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
2011-12-16 23:46:05 +00:00
Dimitry Andric
1ff68ea3a0 Use NO_WARRAY_BOUNDS for sbin/routed/rtquery.
MFC after:	1 week
2011-12-16 23:43:58 +00:00
Dimitry Andric
c9009f9f3d 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
2011-12-16 23:42:25 +00:00
Nathan Whitehorn
b059c637fb 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
2011-12-16 23:40:56 +00:00
Dimitry Andric
cf87966cfd In contrib/gperf/src/output.cc, use the correct printf length modifier
for a ptrdiff_t.

MFC after:	1 week
2011-12-16 23:15:11 +00:00
Dimitry Andric
9733a9e463 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
2011-12-16 23:09:31 +00:00
Dimitry Andric
8fec2463ca In sbin/camcontrol/camcontrol.c, fix a few warnings about format strings
not being literals.

MFC after:	1 week
2011-12-16 22:35:19 +00:00
Dimitry Andric
6aff93296d Define YY_NO_INPUT when building libbinutils, to prevent warnings about
unused input() functions emitted by lex.

MFC after:	1 week
2011-12-16 22:19:13 +00:00
Dimitry Andric
3eb9425c95 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
2011-12-16 22:05:10 +00:00
Dimitry Andric
db83a39193 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
2011-12-16 21:57:44 +00:00
Dimitry Andric
1dcc79e3e8 In cddl/contrib/opensolaris/cmd/dtrace/dtrace.c, fix some obtuse
snprintf tricks.

MFC after:	1 week
2011-12-16 21:48:09 +00:00
Dimitry Andric
1e02cf9b8c 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
2011-12-16 21:29:46 +00:00
Dimitry Andric
139df251d9 In games/factor/factor.c, fix a warning about a format string not being
a literal.

MFC after:	1 week
2011-12-16 21:24:11 +00:00
Dimitry Andric
4bfc2007ab Fix some obtuse fprintf tricks in bin/ed.
MFC after:	1 week
2011-12-16 21:12:23 +00:00
Navdeep Parhar
7be5be337a Catch up with new driver ioctls in cxgbe.
MFC after:	1 month
2011-12-16 20:38:22 +00:00
John Baldwin
f427c78b19 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
2011-12-16 20:10:00 +00:00
Dimitry Andric
8f553bfb27 Attempt to fix the numerous incompatible enum conversions in
libexec/ypxfr in the least disruptive way.

MFC after:	1 week
2011-12-16 19:39:49 +00:00
Dimitry Andric
9e277ed8bf Fix typos in the comments about clang warnings in several
sendmail-related Makefiles.

Spotted by:	arundel
MFC after:	1 week
2011-12-16 17:02:25 +00:00
Dimitry Andric
1f8811efbc In contrib/telnet/telnetd/utility.c, fix a few warnings about format
strings not being literals.

MFC after:	1 week
2011-12-16 16:53:54 +00:00
Dimitry Andric
ff3879a34a 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-16 16:32:08 +00:00
Dimitry Andric
2f3739b852 In libexec/rbootd/utils.c, use the correct printf length modifiers for
u_int32_t and size_t.

MFC after:	1 week
2011-12-16 16:29:51 +00:00
Dimitry Andric
789732b939 In libexec/pppoed/pppoed.c, use the correct printf length modifier for a
size_t.

MFC after:	1 week
2011-12-16 16:07:39 +00:00
Dimitry Andric
4df50ce813 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-16 15:58:38 +00:00
Dimitry Andric
747a8c81c7 In libexec/bootpd/tools/bootptest/print-bootp.c, use the correct printf
length modifier for the difference between two pointers.

MFC after:	1 week
2011-12-16 15:55:43 +00:00
Pedro F. Giffuni
5ed5554f0a 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
2011-12-16 15:47:43 +00:00
Dimitry Andric
50541c922e 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
2011-12-16 15:44:12 +00:00
Dimitry Andric
5d0ce6a552 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
2011-12-16 15:38:11 +00:00
Dimitry Andric
edf500a77a 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
2011-12-16 15:12:42 +00:00
Dimitry Andric
8ac4e8ebc3 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
2011-12-16 15:04:47 +00:00
Dimitry Andric
7be5a1fbf4 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
2011-12-16 15:00:56 +00:00
Gleb Smirnoff
5f02482794 Rename ifcarp.c to carp.c 2011-12-16 14:30:58 +00:00
Gleb Smirnoff
663222f1d2 - Rename if_carp.ko to carp.ko.
- carp.ko depends on sha1.c
2011-12-16 14:28:34 +00:00
Alexander Motin
9c121fecc2 Some formatting fixes.
Submitted by:	ru
2011-12-16 14:19:46 +00:00
Gleb Smirnoff
92ed4e1a24 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.
2011-12-16 13:30:17 +00:00
Stefan Eßer
9ee4b7eb64 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
2011-12-16 12:42:02 +00:00
Gleb Smirnoff
08b68b0e4c 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]
2011-12-16 12:16:56 +00:00
Konstantin Belousov
ec1c1d41b3 Document 'findstack'.
MFC after:	1 week
2011-12-16 11:52:33 +00:00
Konstantin Belousov
9ab83ecbcb 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
2011-12-16 11:44:20 +00:00
Konstantin Belousov
38474ef299 Show the thread kernel stack base address for 'show threads'.
Discussed with:	pho
MFC after:	1 week
2011-12-16 11:42:50 +00:00
Konstantin Belousov
e878d99718 Move kstack_cache_entry into the private header, and make the
stack cache list header accessible outside vm_glue.c.

MFC after:	1 week
2011-12-16 10:56:16 +00:00