Commit Graph

7759 Commits

Author SHA1 Message Date
Johan Karlsson
5ceb03e494 Our bsd.*.mk only supports 6 WARNS levels and we should not use higher values
until it does.

Approved by:	re (dwhite)
2005-06-30 11:56:31 +00:00
Ruslan Ermilov
ceeb3b43de Fixed troff warnings.
Approved by:	re (blanket manpages)
2005-06-27 07:37:01 +00:00
Ruslan Ermilov
5dea8a444f Tidy up the markup.
Approved by:	re (blanket)
OK'ed by:	gad
2005-06-22 19:04:07 +00:00
Garance A Drosehn
530aafd4d0 Fix a bug where the value of ${SOMEVAR} would simply disappear if there
was a separator character immediately before it.  This wasn't likely to
happen in #-lines, but we might as well get it right.  Also fix it so
that "" and "" will create a zero-length argument.

Approved by:	re (blanket `env')
2005-06-21 21:37:53 +00:00
Garance A Drosehn
68ef20722d Put in a more descriptive heading for the `env' command.
Noticed by:	Matthew D Fuller
Approved by:	re (blanket `env')
2005-06-21 19:45:02 +00:00
Garance A Drosehn
2f739d3c1a Undo r1.14 to env.c. While it is unusual for environment variables to
start with a '/', they are more supported (by POSIX and SUSv3) than
filenames which have an '=' in them.

Noticed by:	tjr
Approved by:	re (blanket `env')
2005-06-21 19:38:26 +00:00
Garance A Drosehn
8fbe7ebf7d Add the '-S' and '-P' options. The '-S' option can be used to split
apart a string, and supports some text substitutions.  This can be
used to provide all the flexibility (and more!) that was lost by recent
changes to how the kernel parses #!-lines in shell scripts.

The '-P' option provides a way to specify an alternate set of directories
to use when searching for the 'utility' program to run.  This way you can
be sure what directories are used for that search, without changing the
value of PATH that the user has set.  Note that on FreeBSD 6.0, this
option is worthless unless the '-S' option is also used.

Approved by:	re (blanket `env')
2005-06-20 03:43:25 +00:00
Garance A Drosehn
6dcd6cac03 If the `utility' specified starts with a '/' character, then execute it
without checking it for an equals-sign.  If it starts with a slash, then
it cannot be a request to set the value of a valid environment variable.

Approved by:	re (blanket `env')
2005-06-20 03:14:29 +00:00
Garance A Drosehn
212274c3b6 Move the code that clears the environment when `-i' is specified, so it that
it does not happen until all single-letter options are processed.  This will
be important for the -S option, which will be coming soon.

Approved by:	re (blanket `env')
2005-06-20 03:09:49 +00:00
Garance A Drosehn
f66e378b5e Add a '-v' option to `env', to make it easier to discover exactly what steps
it is doing, and what order it does them.  This will be much more useful as
more options are added.

Approved by:	re (blanket `env')
2005-06-20 03:06:54 +00:00
Alfred Perlstein
3969f0fa13 Decode chroot(2) args.
Approved by: re
2005-06-14 21:51:08 +00:00
Ruslan Ermilov
39c59153e9 Markup and wording fixes.
Approved by:	re (blanket)
2005-06-14 11:50:53 +00:00
Dag-Erling Smørgrav
fd0cba238e Don't free(sock) before it's even allocated.
Submitted by:	Joerg Sonnenberger <joerg@britannica.bec.de>
MFC after:	1 week
2005-06-10 06:36:03 +00:00
Dag-Erling Smørgrav
ee66677a7a Remove kludges intended to support src trees with partial obj trees.
Discussed with:	ru
2005-06-10 06:12:53 +00:00
Christian S.J. Peron
671cff5aec Append a newline character to the usage string.
MFC after:	3 days
2005-06-05 23:49:35 +00:00
Garance A Drosehn
b8eb1eccee Use the ki_udata field that was recently-added to kinfo_proc, instead of
stealing ki_spare[0] to hold a pointer.
2005-06-04 23:40:09 +00:00
Eivind Eklund
e1d27f08f1 Back out revision 1.19 and 1.20 until I find mental clarity to deal with
issues bde pointed out.
2005-06-01 20:34:06 +00:00
Brad Davis
e8a296f5e5 Add myself as a new committer.
Approved by:	ceri (mentor)
2005-06-01 18:29:50 +00:00
Maxim Konovalov
42dc3715bb o Teach login(1) to respect "hushlogin" and "nocheckmail" attributes
defined in user's $HOME/.login_conf.

PR:		bin/75001
Submitted by:	Rostislav Krasny
MFC after:	2 weeks
2005-06-01 12:23:06 +00:00
David E. O'Brien
9703393611 Don't use a patch w/in /usr/src. Programmatically change files when needed. 2005-05-31 22:16:49 +00:00
Stefan Farfeleder
63f1737128 Move #ident into #if 0. 2005-05-31 20:00:29 +00:00
Philippe Charnier
865059c8a8 Reduce compiler warning: variable might be used uninitialized, by giving
an initial value.
2005-05-29 16:04:46 +00:00
Philippe Charnier
8a9d84b4a6 Move variable initialization to reduce compiler warning. 2005-05-29 15:52:48 +00:00
Philippe Charnier
a8cf0aaf75 Reduce compiler warning: variable might be used uninitialized, by giving
an initial value.
2005-05-29 15:49:53 +00:00
Philippe Charnier
0bf92eb85e Move FreeBSD Id outside of copyright. Initialize variable. 2005-05-29 15:47:31 +00:00
Robert Watson
147819cc85 Modify vmstat(8)'s domem() routine, which is responsible for extracting
malloc(9) statistics from kernel memory or a kernel coredump, to catch
up with recent changes to adopt per-CPU malloc(9) statistics.  The new
routines walk the per-CPU statistics pools and coalesce them for
presentation to the user.
2005-05-29 13:40:00 +00:00
Robert Watson
cd05b0f7a1 dd a '-n' option to ministat, which causes it to display only summary
statistics, not graph and statistical test output.  Useful for automated
processing.
2005-05-27 17:52:56 +00:00
Eivind Eklund
ffef99c316 Remove an errno reset that became unnecessary.
Noticed by: juli
2005-05-26 22:49:08 +00:00
Alfred Perlstein
dfafebf72e decode utimes, lutimes, futimes, chflags, lchflags. 2005-05-26 22:49:06 +00:00
Eivind Eklund
f2839e75f6 Document a couple of gotchas. 2005-05-26 22:30:12 +00:00
Eivind Eklund
d21ccc03c0 We are past 4.4BSD - use our new-found stat flags for pipes and fifos. 2005-05-26 22:14:37 +00:00
Alfred Perlstein
42af4f5099 decode mkdir args. 2005-05-26 20:06:57 +00:00
Giorgos Keramidas
26d8ca837e Interlink systat(1), iostat(8) and vmstat(8) through their SEE ALSO
sections, so that users of one can learn about the others easily.
2005-05-26 17:54:16 +00:00
Andrew Thompson
945a92c6be Add myself to the calendar.
Approved by: bms (mentor)
2005-05-26 03:21:16 +00:00
Hartmut Brandt
0eabc7bf8f Under certain conditions the condition parser would go one past end of
the string. Until now this caused no harm, because the buffer code used
to tack two NULs onto buffers. With the new, soon to come, parsing code
this isn't the case anymore in all cases, so fix this.
2005-05-25 16:06:14 +00:00
Hartmut Brandt
691a610b4d Document why there is a dependency of certain object files from the
Makefile.

Requested by:	ru
2005-05-25 08:46:31 +00:00
Christian S.J. Peron
701fabc74b If sysctlbyname fails for kernel related reasons, tag the errno
string to the end of the error message. I think we used errx()
there when we really wanted an err().

MFC after:	1 week
2005-05-24 23:42:09 +00:00
Hartmut Brandt
527505d8cb The caller of Var_Value() should not change the variable value. Make
this clear by constifying the return value.

Obtained from:	DragonFlyBSD
2005-05-24 16:05:51 +00:00
Hartmut Brandt
19446efc06 Get rid of the third argument to Var_Value() the pointer it pointed
to has always been set to NULL for some time now.

Obtained from:	DragonFlyBSD
2005-05-24 15:58:35 +00:00
Hartmut Brandt
cda79e4935 Make shell.o dependend on the Makefile just in case someone changes
the default shell in the Makefile.
2005-05-24 15:48:10 +00:00
Hartmut Brandt
066694bd51 Bump the warning level to 6. 2005-05-24 15:46:50 +00:00
Hartmut Brandt
8ea7e6722b Fix a 64-bit warning by casting an int64_t to intmax_t and printing it
with %jd.
2005-05-24 15:45:11 +00:00
Hartmut Brandt
f3bd158e59 Factor out ProcExec() into its own file and rename it to Proc_Exec() for
consistency with the rest of make.

Obtained from:	DragonFlyBSD (except for the rename)
2005-05-24 15:41:34 +00:00
Hartmut Brandt
5c86e3c106 Factor out all the .SHELL parsing related stuff into its own file and
rename the function to be consistent with the naming scheme in the rest
of make. No functional changes.

Obtained from:	DragonFlyBSD (idea and most of shell.h)
2005-05-24 15:30:03 +00:00
Hartmut Brandt
da2f954c96 Use the name of the default shell instead of a numeric index to select
the default shell.

Idea from:	DragonFlyBSD
2005-05-24 13:19:40 +00:00
Hartmut Brandt
51fb4c0273 Another shell attribute 'unsetenv' that will cause to unsetenv("ENV")
before executing the shell. Until now this was done when the default
shell was the ksh. This failed if the default shell was sh or csh and
the user switched to ksh.
2005-05-24 13:14:24 +00:00
Hartmut Brandt
d92e260a4a Describe the meta and builtins attributes for the .SHELL special
target.
2005-05-24 10:59:08 +00:00
Hartmut Brandt
af22b04427 Describe the -x option and the .WARN pseudo-target. 2005-05-24 10:55:00 +00:00
Hartmut Brandt
940c638f93 Before doing any parsing parse the builtin shell specifications and
set the current shell to DEFSHELL. Put all these specifications into
a list. Add user specified new shells to this list. If the user
just selects one of the already know shells just pick the right one
off the list. This let's one do something like:

# Full specification of the user's shell. This also selects the shell.
.SHELL: name=myshell path=/somewhere/foo echo=loud ...

FOO != bar		# use myshell here

.SHELL: name=sh

BAR != baz		# use /bin/sh here

.SHELL: name=myshell	# no need for full spec here.

# continue to use the user's special shell.
2005-05-24 09:14:46 +00:00
Hartmut Brandt
a22057198a Allow the .SHELL target to specify the list of shell meta characters and
the list of shell builtins. Both of these are needed for the compat
mode where make directly executes commands if the command line contains
neither a shell meta character nor a shell builtin. The list of builtins
is not changed, but csh has '@' added as a meta-character.

Initialize the default shell by parsing a string as one would specify
to the .SHELL target. So we get rid of the CShell clone of struct Shell which
just contained const char * where struct Shell had char *.

Add a debugging function for dumping a parsed shell description to
stdout.
2005-05-24 07:45:49 +00:00