]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/log
FreeBSD/FreeBSD.git
12 years agoAdd recommendation to use gpart(8) when user tries write disklabel
ae [Sun, 6 Nov 2011 20:32:55 +0000 (20:32 +0000)]
Add recommendation to use gpart(8) when user tries write disklabel
or bootcode to already opened provider.

MFC after: 1 week

12 years agoPartially revert r227233.
ed [Sun, 6 Nov 2011 20:30:21 +0000 (20:30 +0000)]
Partially revert r227233.

The privs.h header is not only used by at(1), it's also used by
atrun(8). Just let the code the way it used to be (for now).

Reported by: kwm, tinderbox
Hat to: me

12 years agoRemove MALLOC_DECLAREs of nonexisting malloc-pools.
ed [Sun, 6 Nov 2011 20:16:50 +0000 (20:16 +0000)]
Remove MALLOC_DECLAREs of nonexisting malloc-pools.

After careful grepping, it seems none of these pools can be found in our
source tree. They are not in use, nor are they defined.

12 years agoInitialize all components of the sent COOKIE.
tuexen [Sun, 6 Nov 2011 20:09:22 +0000 (20:09 +0000)]
Initialize all components of the sent COOKIE.

MFC after: 3 days.

12 years agoRemove unneeded checks.
ae [Sun, 6 Nov 2011 19:03:07 +0000 (19:03 +0000)]
Remove unneeded checks.

MFC after: 1 week

12 years agoMark global functions and/or variables in spray(8) static where possible.
ed [Sun, 6 Nov 2011 19:02:49 +0000 (19:02 +0000)]
Mark global functions and/or variables in spray(8) static where possible.

This allows compilers and static analyzers to do more thorough analysis.

12 years agoMark global functions and/or variables in snapinfo(8) static where possible.
ed [Sun, 6 Nov 2011 19:02:43 +0000 (19:02 +0000)]
Mark global functions and/or variables in snapinfo(8) static where possible.

This allows compilers and static analyzers to do more thorough analysis.

12 years agoMark global functions and/or variables in rmt(8) static where possible.
ed [Sun, 6 Nov 2011 19:02:37 +0000 (19:02 +0000)]
Mark global functions and/or variables in rmt(8) static where possible.

This allows compilers and static analyzers to do more thorough analysis.

12 years agoMark global functions and/or variables in rip6query(8) static where possible.
ed [Sun, 6 Nov 2011 19:02:31 +0000 (19:02 +0000)]
Mark global functions and/or variables in rip6query(8) static where possible.

This allows compilers and static analyzers to do more thorough analysis.

12 years agoMark global functions and/or variables in pwd_mkdb(8) static where possible.
ed [Sun, 6 Nov 2011 19:02:25 +0000 (19:02 +0000)]
Mark global functions and/or variables in pwd_mkdb(8) static where possible.

This allows compilers and static analyzers to do more thorough analysis.

12 years agoMark global functions and/or variables in moused(8) static where possible.
ed [Sun, 6 Nov 2011 19:02:20 +0000 (19:02 +0000)]
Mark global functions and/or variables in moused(8) static where possible.

This allows compilers and static analyzers to do more thorough analysis.

12 years agoMark global functions and/or variables in mixer(8) static where possible.
ed [Sun, 6 Nov 2011 19:02:13 +0000 (19:02 +0000)]
Mark global functions and/or variables in mixer(8) static where possible.

This allows compilers and static analyzers to do more thorough analysis.

12 years agoMark global functions and/or variables in memcontrol(8) static where possible.
ed [Sun, 6 Nov 2011 19:01:59 +0000 (19:01 +0000)]
Mark global functions and/or variables in memcontrol(8) static where possible.

This allows compilers and static analyzers to do more thorough analysis.

12 years agoMark global functions and/or variables in fdread(8) static where possible.
ed [Sun, 6 Nov 2011 19:01:54 +0000 (19:01 +0000)]
Mark global functions and/or variables in fdread(8) static where possible.

This allows compilers and static analyzers to do more thorough analysis.

12 years agoMark global functions and/or variables in devinfo(8) static where possible.
ed [Sun, 6 Nov 2011 19:01:48 +0000 (19:01 +0000)]
Mark global functions and/or variables in devinfo(8) static where possible.

This allows compilers and static analyzers to do more thorough analysis.

12 years agoMark global functions and/or variables in chown(8) static where possible.
ed [Sun, 6 Nov 2011 19:01:41 +0000 (19:01 +0000)]
Mark global functions and/or variables in chown(8) static where possible.

This allows compilers and static analyzers to do more thorough analysis.

12 years agoMark global functions and/or variables in boot0cfg(8) static where possible.
ed [Sun, 6 Nov 2011 19:01:35 +0000 (19:01 +0000)]
Mark global functions and/or variables in boot0cfg(8) static where possible.

This allows compilers and static analyzers to do more thorough analysis.

12 years agoMark global functions and/or variables in apm(8) static where possible.
ed [Sun, 6 Nov 2011 19:01:30 +0000 (19:01 +0000)]
Mark global functions and/or variables in apm(8) static where possible.

This allows compilers and static analyzers to do more thorough analysis.

12 years agobsdlabel(8) could automatically fill many of disklabel's deprecated
ae [Sun, 6 Nov 2011 18:59:42 +0000 (18:59 +0000)]
bsdlabel(8) could automatically fill many of disklabel's deprecated
fields, but user could specify some of those fields when edits disklabel
with `bsdlabel -e`. But without -A flag these fields might be
overwritten with default values from the virgin disklabel.
So, don't overwrite such fields if they are not zero. Also add checks
to prevent creating disklabel with less than DEFPARTITIONS and more
than MAXPARTITIONS partitions.

PR: bin/162332
Tested by: Eugene Grosbein
MFC after: 1 week

12 years agoMark global functions and/or variables in xstr(1) static where possible.
ed [Sun, 6 Nov 2011 18:50:39 +0000 (18:50 +0000)]
Mark global functions and/or variables in xstr(1) static where possible.

This allows compilers and static analyzers to more thorough analysis.

12 years agoMark global functions and/or variables in whois(1) static where possible.
ed [Sun, 6 Nov 2011 18:50:33 +0000 (18:50 +0000)]
Mark global functions and/or variables in whois(1) static where possible.

This allows compilers and static analyzers to more thorough analysis.

12 years agoMark global functions and/or variables in which(1) static where possible.
ed [Sun, 6 Nov 2011 18:50:26 +0000 (18:50 +0000)]
Mark global functions and/or variables in which(1) static where possible.

This allows compilers and static analyzers to more thorough analysis.

12 years agoMark global functions and/or variables in whereis(1) static where possible.
ed [Sun, 6 Nov 2011 18:50:19 +0000 (18:50 +0000)]
Mark global functions and/or variables in whereis(1) static where possible.

This allows compilers and static analyzers to more thorough analysis.

12 years agoMark global functions and/or variables in unifdef(1) static where possible.
ed [Sun, 6 Nov 2011 18:50:00 +0000 (18:50 +0000)]
Mark global functions and/or variables in unifdef(1) static where possible.

This allows compilers and static analyzers to more thorough analysis.

12 years agoMark global functions and/or variables in paste(1) static where possible.
ed [Sun, 6 Nov 2011 18:49:53 +0000 (18:49 +0000)]
Mark global functions and/or variables in paste(1) static where possible.

This allows compilers and static analyzers to more thorough analysis.

12 years agoMark global functions and/or variables in m4(1) static where possible.
ed [Sun, 6 Nov 2011 18:49:48 +0000 (18:49 +0000)]
Mark global functions and/or variables in m4(1) static where possible.

This allows compilers and static analyzers to more thorough analysis.

12 years agoMark global functions and/or variables in lam(1) static where possible.
ed [Sun, 6 Nov 2011 18:49:41 +0000 (18:49 +0000)]
Mark global functions and/or variables in lam(1) static where possible.

This allows compilers and static analyzers to more thorough analysis.

12 years agoMark global functions and/or variables in fstat(1) static where possible.
ed [Sun, 6 Nov 2011 18:49:36 +0000 (18:49 +0000)]
Mark global functions and/or variables in fstat(1) static where possible.

This allows compilers and static analyzers to more thorough analysis.

12 years agoMark global functions and/or variables in expand(1) static where possible.
ed [Sun, 6 Nov 2011 18:49:30 +0000 (18:49 +0000)]
Mark global functions and/or variables in expand(1) static where possible.

This allows compilers and static analyzers to more thorough analysis.

12 years agoMark global functions and/or variables in enigma(1) static where possible.
ed [Sun, 6 Nov 2011 18:49:23 +0000 (18:49 +0000)]
Mark global functions and/or variables in enigma(1) static where possible.

This allows compilers and static analyzers to more thorough analysis.

12 years agoMark global functions and/or variables in compress(1) static where possible.
ed [Sun, 6 Nov 2011 18:49:16 +0000 (18:49 +0000)]
Mark global functions and/or variables in compress(1) static where possible.

This allows compilers and static analyzers to more thorough analysis.

12 years agoMark global functions and/or variables in comm(1) static where possible.
ed [Sun, 6 Nov 2011 18:49:10 +0000 (18:49 +0000)]
Mark global functions and/or variables in comm(1) static where possible.

This allows compilers and static analyzers to more thorough analysis.

12 years agoMark global functions and/or variables in checknr(1) static where possible.
ed [Sun, 6 Nov 2011 18:49:03 +0000 (18:49 +0000)]
Mark global functions and/or variables in checknr(1) static where possible.

This allows compilers and static analyzers to more thorough analysis.

12 years agoAdd missing static keywords to at(1).
ed [Sun, 6 Nov 2011 17:32:29 +0000 (17:32 +0000)]
Add missing static keywords to at(1).

While there, tidy up the privs.h part, where at.c has to #define to
declare some globals. Also group static and non-static global variables
in at.c.

12 years agoTo be in sync with GEOM_PART_BSD limit the maximum number of supported
ae [Sun, 6 Nov 2011 17:30:32 +0000 (17:30 +0000)]
To be in sync with GEOM_PART_BSD limit the maximum number of supported
partitions to 20.

MFC after: 1 week

12 years agoMark the structure fields as const.
ed [Sun, 6 Nov 2011 17:20:44 +0000 (17:20 +0000)]
Mark the structure fields as const.

This allows us to simply place these strings as constants in the table
itself, letting the compiler decide to simply merge duplicate strings.

12 years agoMake all functions and global variables static for cdcontrol(8).
ed [Sun, 6 Nov 2011 16:52:26 +0000 (16:52 +0000)]
Make all functions and global variables static for cdcontrol(8).

While there, replace __const by const, which seems to be our preference
nowadays. Also fix some style(9) bugs by adding newlines and removing
unneeded spaces from function declarations.

12 years agoMark all global variables static for mptable(1).
ed [Sun, 6 Nov 2011 16:47:50 +0000 (16:47 +0000)]
Mark all global variables static for mptable(1).

While there, remove basetableEntryTypes, which became unused in r71209.

12 years agoEliminate global variables.
ed [Sun, 6 Nov 2011 16:40:17 +0000 (16:40 +0000)]
Eliminate global variables.

There is no reason why these three variables should be declared as
global variables, while the others aren't. They are only used inside
main().

12 years agoSimplify inclusion of the tsptype array a bit.
ed [Sun, 6 Nov 2011 16:37:15 +0000 (16:37 +0000)]
Simplify inclusion of the tsptype array a bit.

We don't need this array in timed.c -- only readmsg.c.

12 years agoWhen one attempts to compile the tree with -march=i386, which also used
dim [Sun, 6 Nov 2011 14:07:23 +0000 (14:07 +0000)]
When one attempts to compile the tree with -march=i386, which also used
to be gcc's default before r198344, calls to atomic builtins will not be
expanded inline.  Instead, they will be generated as calls to external
functions (e.g. __sync_fetch_and_add_N), leading to linking errors later
on.

Put in a seatbelt that disables use of atomic builtins in libstdc++ and
llvm, when tuning specifically for the real i386 CPU.  This does not
protect against all possible issues, but it is better than nothing.

12 years agoAdd more obsolete files.
antoine [Sun, 6 Nov 2011 14:00:18 +0000 (14:00 +0000)]
Add more obsolete files.

12 years agoCache SO_REUSEPORT socket option in inpcb-layer in order to avoid
trociny [Sun, 6 Nov 2011 10:47:20 +0000 (10:47 +0000)]
Cache SO_REUSEPORT socket option in inpcb-layer in order to avoid
inp_socket->so_options dereference when we may not acquire the lock on
the inpcb.

This fixes the crash due to NULL pointer dereference in
in_pcbbind_setup() when inp_socket->so_options in a pcb returned by
in_pcblookup_local() was checked.

Reported by: dave jones <s.dave.jones@gmail.com>, Arnaud Lacombe <lacombar@gmail.com>
Suggested by: rwatson
Glanced by: rwatson
Tested by: dave jones <s.dave.jones@gmail.com>

12 years agoBefore dereferencing intotw() check for NULL, the same way as it is
trociny [Sun, 6 Nov 2011 09:29:52 +0000 (09:29 +0000)]
Before dereferencing intotw() check for NULL, the same way as it is
done for in_pcb (see r157474).

MFC after: 1 week

12 years agoFix the typo made in r157474.
trociny [Sun, 6 Nov 2011 09:17:48 +0000 (09:17 +0000)]
Fix the typo made in r157474.

MFC after: 3 days

12 years agoCorrect the change made in r227166.
ed [Sun, 6 Nov 2011 09:09:45 +0000 (09:09 +0000)]
Correct the change made in r227166.

This function is only compiled in when building WITH_AUDIT.

12 years agoAdd missing static keywords to xinstall(1)
ed [Sun, 6 Nov 2011 08:19:07 +0000 (08:19 +0000)]
Add missing static keywords to xinstall(1)

12 years agoAdd missing static keywords to wc(1)
ed [Sun, 6 Nov 2011 08:19:00 +0000 (08:19 +0000)]
Add missing static keywords to wc(1)

12 years agoAdd missing static keywords to wall(1)
ed [Sun, 6 Nov 2011 08:18:55 +0000 (08:18 +0000)]
Add missing static keywords to wall(1)

12 years agoAdd missing static keywords to w(1)
ed [Sun, 6 Nov 2011 08:18:47 +0000 (08:18 +0000)]
Add missing static keywords to w(1)

12 years agoAdd missing static keywords to vis(1)
ed [Sun, 6 Nov 2011 08:18:42 +0000 (08:18 +0000)]
Add missing static keywords to vis(1)

12 years agoAdd missing static keywords to uuencode(1)
ed [Sun, 6 Nov 2011 08:18:35 +0000 (08:18 +0000)]
Add missing static keywords to uuencode(1)

12 years agoAdd missing static keywords to usbhidctl(1)
ed [Sun, 6 Nov 2011 08:18:30 +0000 (08:18 +0000)]
Add missing static keywords to usbhidctl(1)

12 years agoAdd missing static keywords to usbhidaction(1)
ed [Sun, 6 Nov 2011 08:18:23 +0000 (08:18 +0000)]
Add missing static keywords to usbhidaction(1)

12 years agoAdd missing static keywords to units(1)
ed [Sun, 6 Nov 2011 08:18:17 +0000 (08:18 +0000)]
Add missing static keywords to units(1)

12 years agoAdd missing static keywords to uniq(1)
ed [Sun, 6 Nov 2011 08:18:11 +0000 (08:18 +0000)]
Add missing static keywords to uniq(1)

12 years agoAdd missing static keywords to unexpand(1)
ed [Sun, 6 Nov 2011 08:18:05 +0000 (08:18 +0000)]
Add missing static keywords to unexpand(1)

12 years agoAdd missing static keywords to uname(1)
ed [Sun, 6 Nov 2011 08:17:59 +0000 (08:17 +0000)]
Add missing static keywords to uname(1)

12 years agoAdd missing static keywords to ul(1)
ed [Sun, 6 Nov 2011 08:17:53 +0000 (08:17 +0000)]
Add missing static keywords to ul(1)

12 years agoAdd missing static keywords to tsort(1)
ed [Sun, 6 Nov 2011 08:17:47 +0000 (08:17 +0000)]
Add missing static keywords to tsort(1)

12 years agoAdd missing static keywords to tr(1)
ed [Sun, 6 Nov 2011 08:17:42 +0000 (08:17 +0000)]
Add missing static keywords to tr(1)

12 years agoAdd missing static keywords to tee(1)
ed [Sun, 6 Nov 2011 08:17:35 +0000 (08:17 +0000)]
Add missing static keywords to tee(1)

12 years agoAdd missing static keywords to tcopy(1)
ed [Sun, 6 Nov 2011 08:17:29 +0000 (08:17 +0000)]
Add missing static keywords to tcopy(1)

12 years agoAdd missing static keywords to talk(1)
ed [Sun, 6 Nov 2011 08:17:23 +0000 (08:17 +0000)]
Add missing static keywords to talk(1)

12 years agoAdd missing static keywords to tail(1)
ed [Sun, 6 Nov 2011 08:17:17 +0000 (08:17 +0000)]
Add missing static keywords to tail(1)

12 years agoAdd missing static keywords to split(1)
ed [Sun, 6 Nov 2011 08:17:11 +0000 (08:17 +0000)]
Add missing static keywords to split(1)

12 years agoAdd missing static keywords to seq(1)
ed [Sun, 6 Nov 2011 08:17:05 +0000 (08:17 +0000)]
Add missing static keywords to seq(1)

12 years agoAdd missing static keywords to rwho(1)
ed [Sun, 6 Nov 2011 08:16:59 +0000 (08:16 +0000)]
Add missing static keywords to rwho(1)

12 years agoAdd missing static keywords to rwall(1)
ed [Sun, 6 Nov 2011 08:16:53 +0000 (08:16 +0000)]
Add missing static keywords to rwall(1)

12 years agoAdd missing static keywords to rusers(1)
ed [Sun, 6 Nov 2011 08:16:47 +0000 (08:16 +0000)]
Add missing static keywords to rusers(1)

12 years agoAdd missing static keywords to ruptime(1)
ed [Sun, 6 Nov 2011 08:16:41 +0000 (08:16 +0000)]
Add missing static keywords to ruptime(1)

12 years agoAdd missing static keywords to rs(1)
ed [Sun, 6 Nov 2011 08:16:35 +0000 (08:16 +0000)]
Add missing static keywords to rs(1)

12 years agoAdd missing static keywords to quota(1)
ed [Sun, 6 Nov 2011 08:16:29 +0000 (08:16 +0000)]
Add missing static keywords to quota(1)

12 years agoAdd missing static keywords to pr(1)
ed [Sun, 6 Nov 2011 08:16:24 +0000 (08:16 +0000)]
Add missing static keywords to pr(1)

12 years agoAdd missing static keywords to mt(1)
ed [Sun, 6 Nov 2011 08:16:18 +0000 (08:16 +0000)]
Add missing static keywords to mt(1)

12 years agoAdd missing static keywords to ministat(1)
ed [Sun, 6 Nov 2011 08:16:11 +0000 (08:16 +0000)]
Add missing static keywords to ministat(1)

12 years agoAdd missing static keywords to make(1)
ed [Sun, 6 Nov 2011 08:16:06 +0000 (08:16 +0000)]
Add missing static keywords to make(1)

12 years agoAdd missing static keywords to look(1)
ed [Sun, 6 Nov 2011 08:15:59 +0000 (08:15 +0000)]
Add missing static keywords to look(1)

12 years agoAdd missing static keywords to logger(1)
ed [Sun, 6 Nov 2011 08:15:53 +0000 (08:15 +0000)]
Add missing static keywords to logger(1)

12 years agoAdd missing static keywords to lock(1)
ed [Sun, 6 Nov 2011 08:15:48 +0000 (08:15 +0000)]
Add missing static keywords to lock(1)

12 years agoAdd missing static keywords to last(1)
ed [Sun, 6 Nov 2011 08:15:41 +0000 (08:15 +0000)]
Add missing static keywords to last(1)

12 years agoAdd missing static keywords to join(1)
ed [Sun, 6 Nov 2011 08:15:35 +0000 (08:15 +0000)]
Add missing static keywords to join(1)

12 years agoAdd missing static keywords to id(1)
ed [Sun, 6 Nov 2011 08:15:30 +0000 (08:15 +0000)]
Add missing static keywords to id(1)

12 years agoAdd missing static keywords to fold(1)
ed [Sun, 6 Nov 2011 08:15:23 +0000 (08:15 +0000)]
Add missing static keywords to fold(1)

12 years agoAdd missing static keywords to du(1)
ed [Sun, 6 Nov 2011 08:15:17 +0000 (08:15 +0000)]
Add missing static keywords to du(1)

12 years agoAdd missing static keywords to dc(1)
ed [Sun, 6 Nov 2011 08:14:57 +0000 (08:14 +0000)]
Add missing static keywords to dc(1)

12 years agoAdd missing static keywords to cut(1)
ed [Sun, 6 Nov 2011 08:14:51 +0000 (08:14 +0000)]
Add missing static keywords to cut(1)

12 years agoAdd missing static keywords to csplit(1)
ed [Sun, 6 Nov 2011 08:14:45 +0000 (08:14 +0000)]
Add missing static keywords to csplit(1)

12 years agoAdd missing static keywords to cpuset(1)
ed [Sun, 6 Nov 2011 08:14:40 +0000 (08:14 +0000)]
Add missing static keywords to cpuset(1)

12 years agoAdd missing static keywords to column(1)
ed [Sun, 6 Nov 2011 08:14:34 +0000 (08:14 +0000)]
Add missing static keywords to column(1)

12 years agoAdd missing static keywords to colcrt(1)
ed [Sun, 6 Nov 2011 08:14:28 +0000 (08:14 +0000)]
Add missing static keywords to colcrt(1)

12 years agoAdd missing static keywords to col(1)
ed [Sun, 6 Nov 2011 08:14:22 +0000 (08:14 +0000)]
Add missing static keywords to col(1)

12 years agoAdd missing static keywords to cmp(1)
ed [Sun, 6 Nov 2011 08:14:16 +0000 (08:14 +0000)]
Add missing static keywords to cmp(1)

12 years agoAdd missing static keywords to catman(1)
ed [Sun, 6 Nov 2011 08:14:09 +0000 (08:14 +0000)]
Add missing static keywords to catman(1)

12 years agoAdd missing static keywords to cap_mkdb(1)
ed [Sun, 6 Nov 2011 08:14:03 +0000 (08:14 +0000)]
Add missing static keywords to cap_mkdb(1)

12 years agoAdd missing static keywords to c99(1)
ed [Sun, 6 Nov 2011 08:13:58 +0000 (08:13 +0000)]
Add missing static keywords to c99(1)

12 years agoAdd missing static keywords to banner(1)
ed [Sun, 6 Nov 2011 08:13:51 +0000 (08:13 +0000)]
Add missing static keywords to banner(1)

12 years agoAdd KLD_DEBUG option.
fjoe [Sun, 6 Nov 2011 08:10:41 +0000 (08:10 +0000)]
Add KLD_DEBUG option.

12 years ago- Fix potential double mbuf free: M_PREPEND may free mbuf chain and return
fjoe [Sun, 6 Nov 2011 05:24:54 +0000 (05:24 +0000)]
- Fix potential double mbuf free: M_PREPEND may free mbuf chain and return
NULL but item will still have the reference ot the mbuf chain and will free
it upon destruction.
- Fix memory leak (unfree'd item on error path).

12 years agoFix potential double mbuf free: M_PREPEND may free mbuf chain and return
fjoe [Sun, 6 Nov 2011 05:23:42 +0000 (05:23 +0000)]
Fix potential double mbuf free: M_PREPEND may free mbuf chain and return
NULL but item will still have the reference ot the mbuf chain and will free
it upon destruction.