Commit Graph

8686 Commits

Author SHA1 Message Date
rrs
dfd8d06806 o style(9) nit.
o shorten explainations which are over 80 columns in console.
	o group rows
	o clean up and change explanations a little bit.
Obtained from:	weongyo.jeong@gmail.com
2007-06-17 14:45:28 +00:00
rrs
565b9c478d - Forced commit to update who actually did this code (I forgot
the obtained from in the original line)
Obtained from:	Weongyo Jeong (weongyo.jeong@gmail.com)
2007-06-17 01:57:08 +00:00
maxim
8ea5048f0d o Do not warn if the process exits before we get its name.
PR:		bin/113777
Submitted by:	Dmitrij Tejblum
MFC after:	1 week
2007-06-16 20:24:55 +00:00
se
8761a2e70d Never define the generated rpc server main function with storage type
"static". The header file generated by "rpcgen -h" will always declare
it as extern, leading to a "static after extern" error being issued by
gcc-4.2. This caused only a warning in gcc-3.x, but it has been wrong
all the time.

This change does not modify the code generated by "rpcgen -m", it only
affects rpcgen used to generate server stubs with a local main function.

This is the minimal patch. It does not remove the now obsolete "storage"
parameter from write_program() and write_programs() in an attempt to keep
differences to other systems' versions of rpcgen as small as possible.
2007-06-16 14:39:25 +00:00
jhb
a388e9ba50 Expand TCP counters from 9 digits to 12.
MFC after:	1 week
PR:		bin/112881
2007-06-15 18:12:58 +00:00
jhb
8a37be3129 Consistently indent the R() macro for fields on the right-side of the
display to make the code easier to read.

PR:		bin/112881
2007-06-15 18:00:10 +00:00
jhb
6b110dc473 Add a new counter for retransmitted packets due to SACK.
PR:		bin/112881
Submitted by:	Phil Rosenthal <pr  isprime com>
2007-06-15 17:55:44 +00:00
bde
c00ecb1e06 Third stage of unbreaking printing of pseudo-nice values (realtime
priorities, etc.) in the NICE field:

Use a combination of pri_native and pri_user instead of pri_level to
guess the original realtime priority.  Using pri_level here has been
wrong since 2001/02/12.  Using only pri_native here would be correct
if the kernel actually initialized it reasonably.  (The kernel exports
its raw td_base_priority as pri_native, but userland mostly wants a
refined base priority).  Give up on waiting pri_native to work correctly
and only use it when there is nothing better (for kthreads).

This should reduce printing of bizarre pseudo-nice values.  Bizarre
values are still printed if we observe a transient borrowed priority
for a kthread (transient borrowing is the main thing that makes the
raw td_base_priority almost useless in userland), or if there is a
kernel bug.  One current kernel bug involves the kernel idprio thread
pagezero permanently changing its priority from PRI_MAX_IDLE (255) to
PUSER (160).  Then the bizarre value "ki-6" is printed instead of
"ki31".  Here "-6" is PRI_MIN_IDLE - PUSER = -64 truncated to 2
characters.  We are observing a transient borrowed priority that has
become permanent due to a bug.

ps/print.c:priorityr() needs similar changes (including ones in stage 2
here).
2007-06-15 12:03:07 +00:00
timur
2d76b78be2 Add myself as a commiter.
Approved by:	shaun (mentor)
2007-06-13 16:37:36 +00:00
delphij
d573049b5b sctp_process_inpcb() wants an offset parameter in size_t,
so define it as what it is expected.  This fixes WARNS=3
without NO_WERROR build.
2007-06-13 02:37:00 +00:00
sepotvin
3ffe583f13 Options spring cleanup:
- Add and document the KVM and KVM_SUPPORT options that
are needed for the ifmcstats(3) makefile
- Garbage collect unused variables
- Add missing inclusion of bsd.own.mk where needed

Approved by: kan (mentor)
Reviewed by: ru
2007-06-13 02:08:04 +00:00
bms
ffd77d9ba5 Import rewrite of IPv4 socket multicast layer to support source-specific
and protocol-independent host mode multicast. The code is written to
accomodate IPv6, IGMPv3 and MLDv2 with only a little additional work.

This change only pertains to FreeBSD's use as a multicast end-station and
does not concern multicast routing; for an IGMPv3/MLDv2 router
implementation, consider the XORP project.

The work is based on Wilbert de Graaf's IGMPv3 code drop for FreeBSD 4.6,
which is available at: http://www.kloosterhof.com/wilbert/igmpv3.html

Summary
 * IPv4 multicast socket processing is now moved out of ip_output.c
   into a new module, in_mcast.c.
 * The in_mcast.c module implements the IPv4 legacy any-source API in
   terms of the protocol-independent source-specific API.
 * Source filters are lazy allocated as the common case does not use them.
   They are part of per inpcb state and are covered by the inpcb lock.
 * struct ip_mreqn is now supported to allow applications to specify
   multicast joins by interface index in the legacy IPv4 any-source API.
 * In UDP, an incoming multicast datagram only requires that the source
   port matches the 4-tuple if the socket was already bound by source port.
   An unbound socket SHOULD be able to receive multicasts sent from an
   ephemeral source port.
 * The UDP socket multicast filter mode defaults to exclusive, that is,
   sources present in the per-socket list will be blocked from delivery.
 * The RFC 3678 userland functions have been added to libc: setsourcefilter,
   getsourcefilter, setipv4sourcefilter, getipv4sourcefilter.
 * Definitions for IGMPv3 are merged but not yet used.
 * struct sockaddr_storage is now referenced from <netinet/in.h>. It
   is therefore defined there if not already declared in the same way
   as for the C99 types.
 * The RFC 1724 hack (specify 0.0.0.0/8 addresses to IP_MULTICAST_IF
   which are then interpreted as interface indexes) is now deprecated.
 * A patch for the Rhyolite.com routed in the FreeBSD base system
   is available in the -net archives. This only affects individuals
   running RIPv1 or RIPv2 via point-to-point and/or unnumbered interfaces.
 * Make IPv6 detach path similar to IPv4's in code flow; functionally same.
 * Bump __FreeBSD_version to 700048; see UPDATING.

This work was financially supported by another FreeBSD committer.

Obtained from:  p4://bms_netdev
Submitted by:   Wilbert de Graaf (original work)
Reviewed by:    rwatson (locking), silence from fenner,
		net@ (but with encouragement)
2007-06-12 16:24:56 +00:00
yar
49118fb724 Drop the argument to the OUT macro because it can't emit
anything but the pattern space anyway.  Apply style(9)
to the macro.

Tested with:	md5(1)
2007-06-12 12:17:25 +00:00
yar
64e06b67c3 Don't forget to clear out the hold space for each subsequent file
when in -i mode so that each file gets a clean context of its own.

Add a regression test for the bug.

Tested with:	regression tests
2007-06-12 12:05:24 +00:00
yar
59136b3a6d There is a symbolic antonym for REPLACE as a flag to cspace()
and mf_fgets(): APPEND.  So use it instead of a 0 constant for
clarity.

Tested with:	md5(1)
2007-06-12 10:56:38 +00:00
ceri
72252c5d47 Backout mess mistakenly committed with manpage update. 2007-06-10 06:18:04 +00:00
ceri
03bd6740ae Document SCTP support. 2007-06-10 06:11:03 +00:00
beech
82a09af237 - Add myself.
Approved by:	sat (mentor)
2007-06-09 21:46:04 +00:00
rrs
af285a5d35 Adds support for SCTP. 2007-06-09 13:44:09 +00:00
grog
4781a8b910 Sort events by date.
Correct long-standing off-by-one error in -W option.

Submitted by: edwin@

Shorten some long lines.  These files are still not completely
style(9) compliant.
2007-06-09 05:54:13 +00:00
grog
b7b020d418 Include calendar.dutch. 2007-06-09 05:51:24 +00:00
grog
c47132876a Dutch calendar.
Submitteed by: edwin@
2007-06-09 05:41:18 +00:00
delphij
99cd91d1e0 Increase inputFS buffer. awk will not accept some old scripts
otherwise.
2007-06-08 05:44:12 +00:00
delphij
aed2a0bc29 Mention 'k' option of gunzip.
Pointed out by:	ighighi gmail.com
2007-06-06 02:51:54 +00:00
rafan
5cebee462b - Update for 2007/05/01 import
Approved by:	delphij (mentor)
Nodded by:	ru
Tested by:	make universe
2007-06-05 15:35:05 +00:00
delphij
d7966d0f30 Regen. 2007-06-04 01:43:25 +00:00
grog
fa5746210d Fix various bugs in the -A and -B options.
Submitted by:	edwin@
PR:		bin/113250
MFC after:	2 weeks
2007-06-03 03:07:10 +00:00
dougb
6828e8e3e5 Update bmake glue for the BIND 9.4.1 import.
This includes a return to building with threads, since one of the
major focuses of the 9.4.x branch is to improve thread performance.
2007-06-02 23:19:58 +00:00
fjoe
a91466a709 Change directory back to ${.CURDIR} when remaking Makefiles.
Pointed out by:	ru
2007-06-01 04:20:19 +00:00
kientzle
57eb78da4c bsdtar 2.2.3:
* Implement --use-compress-program using new libarchive feature.
  * Minor portability improvement by adjusting casts used to
    print out uids, gids, and device numbers.

Thanks to: Joerg Sonnenberger for the --use-compress-program implementation.
MFC after: 15 days
2007-05-29 05:39:10 +00:00
delphij
23ad5197dd Add a '-k' flag which is similar with its bzip2(1) counterpart,
meaning that the user wants the input file to be left intact.

Feature request: Ighighi <ighighi gmail.com>
PR:		 bin/103006
MFC after:	 1 month
2007-05-28 08:20:46 +00:00
ru
7ad8d734a5 Update for the 4.21 import (manuals didn't change). 2007-05-25 09:25:05 +00:00
obrien
579ab56765 FreeBSD has <limits.h>. 2007-05-24 22:10:22 +00:00
obrien
34c9c7627c Update for the 'file' 4.21 import. 2007-05-24 22:02:49 +00:00
le
6efed887b9 Fix handling of filenames containing whitespace.
PR:      bin/112860
MFC in:  3 days
2007-05-24 18:28:08 +00:00
obrien
cb62c25588 Update for the 'file' 4.19 import. 2007-05-24 16:14:38 +00:00
ru
05dcdedaca Don't want a stray systrace_args.c in objdir. 2007-05-22 10:36:12 +00:00
dds
9ed27d1038 Increase precision of time values in the process accounting
structure, while maintaining backward compatibility with legacy
file and record formats.
2007-05-22 06:51:38 +00:00
keramida
2049c78bad Remove duplicate ' 2' manpage section number.
Submitted by:	 Rui Paulo
MFC after:	 3 days
2007-05-21 20:33:51 +00:00
kientzle
f3855854ee Mention the formats supported by bsdtar; include an
example that shows how to work with an ISO 9660 image.
2007-05-20 18:23:39 +00:00
jmallett
c449c9befa Fix typo. 2007-05-17 00:19:56 +00:00
jmallett
070c749233 o) Correct for missing whitespace.
o) We don't need to check if ifp == stdin to give the filename, since we already
   know that ifn will be "stdin" if it is.
2007-05-17 00:18:01 +00:00
jmallett
4f0511a3a8 Fix confusing misindentation of a closing-brace. (It goes with the switch, not
with the while.)
2007-05-17 00:11:58 +00:00
dds
60eb6dce11 Backout revisions 1.16-1.14.
Backwards compatibility with the new acct(5) format will be
implemented through the explicit versioning of acct records,
not through an export/import procedure.
2007-05-14 09:05:22 +00:00
andre
97ae8d6506 'netstat -A -p tcp' doesn't print the Socket but the Tcpcb pointer in the
first column.
2007-05-13 22:32:32 +00:00
pav
627459b3d8 Replace rev. 1.9 with patch from OpenBSD.
Submitted by:	Ray Lai <ray@cyth.net>
Obtained from:	http://www.openbsd.org/cgi-bin/cvsweb/src/usr.bin/tip/acu.c.diff?r1=1.13&r2=1.14
MFC after:	1 week
2007-05-12 23:29:33 +00:00
pav
15acba9364 Fix crash when using 'du' capability: NULL return of strpbrk was not handled
PR:		bin/108368
Reported by:	Ivo Hazmuk <ivo@vutbr.cz>
Submitted by:	rdivacky
MFC after:	2 weeks
2007-05-12 13:36:13 +00:00
pav
f50136d51b Expand documentation of -f option
PR:		docs/66265
Submitted by:	Michel Lavondes <fox@vader.aacc.cc.md.us>
MFC after:	1 week
2007-05-12 12:23:40 +00:00
kientzle
d5af35a7d4 Set the program return value non-zero if we enounter
an error while skipping the body of an entry during
"tar -t" processing.

Thanks to: Spencer Minear
PR: misc/112521
2007-05-08 15:22:21 +00:00
dwmalone
97453bb422 Cast to intmax_t to print tv_sec in struct timeval.
Avoid shadowing a global variable with a function argument.
Set WARNS to 6.
2007-05-07 12:23:23 +00:00
dwmalone
1590c528fc Use [u]intmax_t to printf unknown integer types.
Make timeprt always allocate memory, to make things a little simpler.
Remove an unused variable.
2007-05-07 12:10:06 +00:00
dwmalone
42e798271c Make logmsg take const char * arguments.
Set WARNS to 6.
2007-05-07 11:28:01 +00:00
dwmalone
dda0e5cbe4 ANSIfy function definitions.
Move some extern declarations to a header file.
Remove an unneeded extern declaration for optarg.
2007-05-07 11:18:30 +00:00
dwmalone
1e0d0fa4b9 Fix some warnings by making things const, adding missing headers,
removing some unused variables and making a variable unsigned.

MFC after:	3 weeks
2007-05-07 11:01:36 +00:00
dwmalone
9bb125a79a Initialise variable size so that reading stdin works deterministically.
Add missing include.

Default to WARNS=6.
2007-05-03 13:57:19 +00:00
benjsc
2a0c0b82dd Add myself
Approved by:	mlaier (mentor)
2007-05-03 11:34:36 +00:00
cperciva
372e0ffbeb If lstat(2) fails, have bsdtar return a non-zero exit code if the
failed path is one which was specified on the command line.

This is a compromise between the situation prior to revision 1.57
(where a race between tar(1) and rm(1) could cause tar(1) to
spuriously report an error) and the situation after revision 1.57
(where "tar -c /no/such/path" prints a warning but returns with
an exit code of zero).

Inspired by:	rafan
MFC after:	1 week
2007-05-03 04:33:11 +00:00
ache
6ccaf050cc Back out all POSIXified *env() changes.
Not because I admit they are technically wrong and not because of bug
reports (I receive nothing). But because I surprisingly meets so
strong opposition and resistance so lost any desire to continue that.

Anyone who interested in POSIX can dig out what changes and how
through cvs diffs.
2007-05-01 16:02:44 +00:00
ache
331b340652 limits calls setenv("name=value", "value", 1); which violates POSIX:
"The setenv( ) function shall fail if:
[EINVAL] The name argument is a null pointer, points to an empty string,
or points to a string containing an '=' character."
The fix (like all others in this subject) is backward-compatible.
2007-04-30 20:10:10 +00:00
ache
de97550b4e env calls setenv("name=value", "value", 1); which violates POSIX:
"The setenv( ) function shall fail if:
[EINVAL] The name argument is a null pointer, points to an empty string,
or points to a string containing an '=' character."
The fix (like all others in this subject) is backward-compatible.
2007-04-30 19:25:00 +00:00
ache
73001d272d Slightly tune previous fix: free memory if !export 2007-04-30 12:54:02 +00:00
ache
123c99294b Prepare for upcoming POSIXed putenv() rewrite:
don't free memory after putenv()
2007-04-30 12:51:02 +00:00
ache
4c04e48cf3 Prepare for upcoming POSIXed putenv() rewrite:
don't free memory after putenv()
2007-04-30 12:44:04 +00:00
maxim
0c15c5c2c2 o Fill the list of icmp types; make its size depend on ICMP_MAXTYPE.
o Print "unknown ICMP" instead of "(null)" if we don't have a description         for a icmp type.

Based on code

Submitted by:	Christoph Weber-Fahr
PR:		misc/112126
MFC after:	2 weeks
2007-04-30 12:27:04 +00:00
ache
a1cdcb2c5b Eliminate error with -W* strict flags and make putenv() calls conforming to
standard and portable in the same way as f.e. gcc internal portable code does.
2007-04-30 05:14:29 +00:00
dwmalone
2aae76aee9 Change the date for Daylight Savings in the US.
PR:		111102
Submitted by:	Sean Farley <sean-freebsd@farley.org>
Obtained from:	OpenBSD
2007-04-29 20:03:06 +00:00
brian
ad4f22d823 Add some more examples. It always takes me a long time to find the S
modifier (-t is ignored without it).

MFC after:	1 week
2007-04-27 18:23:32 +00:00
araujo
6342cf3dcc - Added entry for Marcelo S. Araujo.
Approved by:	itetcu (comentor)
2007-04-27 18:17:41 +00:00
nemoliu
13ff2a251e add myself.
Approved by:	delphij (mentor)
2007-04-25 11:59:10 +00:00
yar
9676ff3e8a Insert explicit space between the output fields to prevent them
from running together when a field overflows.

MFC after:	1 week
2007-04-23 11:43:22 +00:00
yar
802e70c6ff Don't forget to bump document date after changing the content. 2007-04-21 01:22:51 +00:00
yar
65b331b4a1 Change the semantics of -i (in-place editing) so that it treats
each file independently from other files.  The new semantics are
desired in the most of practical cases, e.g.: delete lines 5-9
from each file.

Keep the previous semantics of -i under a new option, -I, which
uses a single continuous address space covering all files to edit
in-place -- they are too cool to just drop them.

Add regression tests for -i and -I.

Approved by:	dds
Compared with:	GNU sed
Discussed on:	-hackers
MFC after:	2 weeks
2007-04-21 01:21:36 +00:00
fjoe
711037246e Improve logging when -dm is specified: if the node is considered
out-of-date print not only "modified before source" message
but also the path of youngest source.
2007-04-20 06:33:25 +00:00
fjoe
5abc85136d When remaking makefiles check that mtime has actually changed.
This fixes infinite restart in the following case:

Makefile: foo

foo: bar
	do-something

Unlike GNU make, BSD make considers "Makefile" node as remade even
if "foo" is up-to-date and was not actually rebuilt.
GNU make does not consider nodes without commands as remade if child nodes
were not actually rebuilt.

Most probably, more proper fix would be to bring BSD make behaviour in-line
with GNU make but this would be more intrusive change.
2007-04-20 06:25:45 +00:00
dds
208b8c0f11 Change the export option from -w (write) to -X.
While implementing import it became apparent that write as a mnemonic
is ambiguous and confusing.

MFC after:	8 days
2007-04-18 16:43:21 +00:00
dds
0e40cc602a Complain on write errors.
Use correct type for write_text.

MFC after:	8 days
2007-04-18 09:39:47 +00:00
dds
c7e7d9561a Add export capability through the new -w flag.
Discussed in: -arch
MFC after:	8 days
2007-04-18 08:55:54 +00:00
kientzle
4db8f3e0cc Ignore trailing '/' when comparing pathnames, so that
"tar -u" works again.  Otherwise, "tar -u" wants to
treat every dir as new and re-adds it.
2007-04-18 04:36:11 +00:00
kientzle
1722334e06 When testing basic functionality, strip trailing '/' from
dir names, so they match the names generated by 'find'.
2007-04-18 04:35:17 +00:00
rafan
3306a8a299 - Add a new 'j' switch and runtime option to toggle display jail id for
each process.
- While I'm here, keep help message sorted by keys

PR:		98489, 98975
Submitted by:	clsung
Approved by:	delphij (mentor)
MFC after:	2 weeks
2007-04-17 03:12:39 +00:00
cperciva
67c3258375 In libarchive: Downgrade ARCHIVE_FATAL and ARCHIVE_FAILED errors which
occur on the write side of extracting a file to ARCHIVE_WARN errors
when returning them from archive_read_extract.

In bsdtar: Use the return code from archive_read_data_into_fd and
archive_read_extract to determine whether we should continue trying to
extract an archive after one of the entries fails.

This commit makes extracting a truncated tarball complain once about
the archive being truncated, instead of complaining twice (once when
trying to extract an entry, and once when trying to seek to the next
entry).

Discussed with:	kientzle
2007-04-16 04:04:50 +00:00
ache
1104f500b1 Use proper type cast for ctype macro 2007-04-14 14:32:48 +00:00
stas
b2e4c77a02 - Add new 'a' switch and runtime option that allows 'top' to display process
titles extracted from argv vector instead of the real executable names.
  This is useful when you want to watch applications that set their status
  information via setproctitle(3).

Approved by:	alfred
MFC after:	2 weeks
2007-04-14 10:16:52 +00:00
kientzle
6cbd2a79e2 Portability.
Thanks to: Martin Koeppe for testing on Interix
2007-04-13 16:08:23 +00:00
ru
fc751b701f In .error and .warning, prefer command-line variables
to globals, as per documentation.

Nudged by:	Jeremie Le Hen
2007-04-12 18:14:00 +00:00
ru
5b5dc6ab88 Restore the ".Sh BUGS" line that was accidentally removed
in the previous commit.
2007-04-12 08:22:49 +00:00
kientzle
dd496676aa Make it easier to support more platforms.
Thanks to: Joerg Sonnenberger for pointing out the need and the technique.
2007-04-12 04:45:32 +00:00
des
3c87bd66cb Remove irrelevant comment about T/TCP in BUGS.
Spotted by:	ru@
2007-04-11 20:32:59 +00:00
des
249451cebe Remove -T from getopt() spec and usage string.
Submitted by:	ru@
2007-04-11 20:32:09 +00:00
des
7447498cb3 Bump Dd. 2007-04-11 19:20:42 +00:00
des
260758a263 Remove T/TCP support, and the -T option which was needed to disable it.
MFC after:	3 weeks
2007-04-11 19:11:54 +00:00
emaste
56a3d8cfd3 Eliminate memory leak from an accidental malloc(). 2007-04-10 17:37:53 +00:00
grog
0a7f1377cf Update to match revision 1.23 of touch.c.
Clarify some details.
2007-04-10 07:24:47 +00:00
grog
4035199a7c Usage: print base name of program.
-A flag: respect the -a and -m flags.
	 imply the -c flag.

Requested in principle by: brian
2007-04-10 07:22:30 +00:00
delphij
70cda62de5 Make use of ptrace(2) instead of procfs in truss(1), eliminating
yet another need of an available /proc/ mount.

Tested with:	make universe
Submitted by:	howardsu
Reviewed by:	alfred
2007-04-10 04:03:34 +00:00
bms
31737a26bd Mark netstat -g host-mode output as deprecated.
MFC after:	2 weeks
2007-04-10 00:30:26 +00:00
emaste
22905581d8 Add prototype for generated ptraceopname function. 2007-04-09 22:04:27 +00:00
pjd
a7cca495b2 Move uuidgen(1) from /usr/bin/ to /bin/. It will be used in rc.d/hostid
script, which will be executed before /usr/ mount.

Reviewed by:	mlaier, rink, brooks, rwatson
2007-04-09 19:16:48 +00:00
emaste
41417ac6fa Remove static ptrace_ops array and extract ptrace op names from
sys/ptrace.h with mksubr.
2007-04-09 19:16:24 +00:00
cperciva
296f9755ef Clean up error handling in archive_append to match how errors are
handled in write_hierarchy.

Approved by:	kientzle
2007-04-09 08:22:34 +00:00
grog
5218e59269 Add -A flag to adjust existing time stamps.
Print name by which program was started in usage() message.

MFC after:  2 weeks
2007-04-09 02:19:37 +00:00
kientzle
1bfe8ebed6 Simplify the logic for handling header read
errors.
2007-04-07 05:56:40 +00:00
yar
ddc472d42d style(9):
Use a single space before $FreeBSD$ to avoid terminal line overflow.

Pointed out by:		ru (The All-Seeing Eye)
2007-04-06 08:43:30 +00:00
pjd
7e73da14eb Add security.jail.mount_allowed sysctl, which allows to mount and
unmount jail-friendly file systems from within a jail.
Precisely it grants PRIV_VFS_MOUNT, PRIV_VFS_UNMOUNT and
PRIV_VFS_MOUNT_NONUSER privileges for a jailed super-user.
It is turned off by default.

A jail-friendly file system is a file system which driver registers
itself with VFCF_JAIL flag via VFS_SET(9) API.
The lsvfs(1) command can be used to see which file systems are
jail-friendly ones.

There currently no jail-friendly file systems, ZFS will be the first one.
In the future we may consider marking file systems like nullfs as
jail-friendly.

Reviewed by:	rwatson
2007-04-05 21:03:05 +00:00
yar
ecd3f37929 Add an important detail to paragraph 12: the range is reset only if its
second address is a line number.
2007-04-05 17:12:01 +00:00
yar
f07477f890 Reflect the change in rev. 1.44 of process.c.
Add $FreeBSD$ to please commit_prep.pl.
2007-04-05 13:31:17 +00:00
dds
f82a2a730c A dash as an argument to the -f option will now cause lastcomm to
read data from the standard input.  This allows tail -f to pipe
data to lastcomm, and thereby real-time monitoring of executed
commands.  The manual page includes the exact incantation.

MFC after:	2 weeks
2007-04-04 16:04:58 +00:00
cperciva
7274c940dd Add test to confirm that piping a tar archive created by bsdtar through
'bsdtar -cf- @-' doesn't alter it.
2007-04-04 03:12:15 +00:00
lwhsu
1b4c71ec10 Add myself.
Approved by:     clsung (mentor)
2007-04-04 02:34:33 +00:00
brian
66da1b8b10 Fix a typo 2007-04-03 19:14:39 +00:00
chinsan
ce5c98a7c9 - Add myself.
Approved by:	delphij@ (mentor)
2007-04-03 06:02:49 +00:00
yar
d1f2d71a20 Don't forget to close the range if we branched over its end
and had no chance to match it by the 2nd address precisely.
Otherwise the unclosed range would bogusly extend to the end
of stream.

Add a basic regression test for the bug fixed.  (This change
also fixes the more complex case 5.3 from `multitest.t'.)

Compared with:	SUN and GNU seds
Tested by:	regression tests
MFC after:	1 week
2007-04-02 08:14:46 +00:00
yar
50830d7bd9 Prevent foot-shooting in advance: Put the MATCH() macro's value
in parentheses.  The ?: operator has a remarkably low precedence, so
expressions like (MATCH(foo) && bar) would have an unexpected meaning
w/o the parentheses around MATCH().

Tested with:	md5(1)
2007-04-02 06:47:48 +00:00
yar
4a558e4ff5 This trivial change should fix at least 3 similar bugs. All of
them are related to the `c' function's need to know if we are at
the actual end of the address range.  (It must print the text not
earlier than the whole pattern space was deleted.)  It appears the
only sed function with this requirement.

There is `lastaddr' set by applies(), which is to notify the `c'
function, but it can't always help because it's false when we are
hitting the end of file early.  There is also a bug in applies()
due to which `lastaddr' isn't set to true on degenerate ranges such
as `$,$' or `N,$' if N appears the last line number.

Handling early EOF condition in applies() could look more logical,
but it would effectively revert sed to the unreasonable behaviour
rev. 1.26 of main.c fought against, as it would require lastline()
be called for each line within each address range.  So it's better
to call lastline() only if needed by the `c' function.

Together with this change to sed go regression tests for the bugs
fixed (c1-c3).  A basic test of `c' (c0) is also added as it helped
me to spot my own error.

Discussed with:		dds
Tested by:		the regression tests
MFC after:		1 week
2007-04-01 13:25:03 +00:00
cperciva
1720c4fbcb Add tests for "bsdtar -t". These are useful primarily because they test
the archive_read_data_skip code.
2007-03-31 22:04:36 +00:00
cperciva
04b5ff28d3 Split the append_archive function (used for processing @<archive> directives)
into separate append_archive and append_archive_filename functions; the first
takes a "struct archive *" as input, while the second takes a filename, opens
the archive, and calls the first.

There should be no changes in behaviour as a result of this commit; it simply
reorganizes code to make more sense.  At some point in the future it may be
possible to share code between append_archive and read_archive, but not yet.

Discussed with:	kientzle
2007-03-31 10:14:03 +00:00
yar
307e4679c3 Make the comment for cspace() match reality. 2007-03-31 09:08:22 +00:00
delphij
37cce1fb37 Update for bzip2 1.0.4 import. 2007-03-28 07:48:03 +00:00
maxim
f608810850 o Really commit typo fixes to HEAD.
PR:		docs/110809
Submitted by:	naddy
2007-03-25 18:37:59 +00:00
kientzle
4fa4b823d2 Issue a warning if there's a non-zero exit value. 2007-03-24 03:25:49 +00:00
jkim
a5ad971145 Add '-s' option and update the manual page. With this option, it prints
little more style(9) friendly output.  For example:

%file2c -n 8 -s -x 'const char data[] = {' '};' < /etc/motd
const char data[] = {
	0x46, 0x72, 0x65, 0x65, 0x42, 0x53, 0x44, 0x20,
	0x37, 0x2e, 0x30, 0x2d, 0x43, 0x55, 0x52, 0x52,
	0x45, 0x4e, 0x54, 0x20, 0x28, 0x42, 0x45, 0x41,
	0x53, 0x54, 0x49, 0x45, 0x29, 0x20, 0x23, 0x30,
	0x3a, 0x20, 0x57, 0x65, 0x64, 0x20, 0x4d, 0x61,
	0x72, 0x20, 0x32, 0x31, 0x20, 0x31, 0x39, 0x3a,
	0x30, 0x34, 0x3a, 0x33, 0x36, 0x20, 0x45, 0x44,
	0x54, 0x20, 0x32, 0x30, 0x30, 0x37, 0x0a
};
2007-03-23 00:00:22 +00:00
emaste
77a22ac882 Use proc name (ki_comm) instead of thread name (ki_ocomm) as these may now
be different.
2007-03-22 17:47:58 +00:00
cperciva
aece76cbcd Remove pathlen argument from write_entry function. It has never been used.
Approved by:	kientzle
MFC after:	3 days
2007-03-17 19:18:29 +00:00
cperciva
117ac27300 Fix logic bug; we want to do_chdir if arg doesn't start with / _and_ it
doesn't start with @/ either.

This unbreaks "tar -c -C /no/such/directory @/path/to/archive".

MFC after:	3 days
2007-03-17 16:17:14 +00:00
delphij
9dd2be0d64 Mention a limitation that was inherted from RFC1952, making
it impossible to obtain correct file size from a file that
is larger than 4GB before compression.

PR:		bin/110329
MFC after:	1 week
2007-03-16 03:50:53 +00:00
cperciva
32001bac97 Don't consider an lstat(2) failure to be an error (in the sense of
affecting the return value from bsdtar), since (a) it usually occurs
due to a perfectly innocent (and unavoidable) race condition where a
user deletes a file in the window between bsdtar reading a directory
and attempting to read the file; and (b) aside from printing a warning
message, bsdtar behaves exactly as if the file had been deleted prior
to bsdtar reading its parent directory.

Reviewed by:	kientzle
MFC after:	6 days
2007-03-15 10:11:38 +00:00
dds
940ef56355 Test files repo-copied into tools/regression/usr.bin/sed and integrated
into the regression testing framework.
2007-03-14 13:43:32 +00:00
cperciva
83a1ac8fb2 Reduce the risk of inducing heart attacks, by printing the right path when
complaining about lstat(2) failing.  It's a bit scary to find the message
  tar: /: Cannot stat: No such file or directory
printed while doing a backup.

MFC after:	1 week
2007-03-14 07:30:51 +00:00
kientzle
ab3553dfb4 Clarify the test comments in test-basic.sh. Have config.sh do a
better job searching for the bsdtar binary to test and the gtar binary
to use for inter-operability testing.  It should now find the built
(but not installed) binary if there is one, then search for an
installed binary in a number of standard locations.
2007-03-11 19:33:45 +00:00
kientzle
7cd084865b bsdtar 2.0.23:
* New test scripts exercise some basic functionality
   * Most header inclusions are now protected (portability)
   * read.c now relies on security checks in libarchive instead
     of trying to do its own (optimization)
   * -p now enabled by default for root, add --no-same-permissions
     to disable it
   * Comments, minor style fixes.
2007-03-11 10:36:42 +00:00
bushman
0129b40874 Add myself.
Approved by:	brooks (mentor)
2007-03-11 06:44:37 +00:00
mbr
784667db7c Uppercase FreeBSD, sigh. 2007-03-10 18:31:33 +00:00
mbr
27f0d39f3b Add myself 2007-03-10 18:30:12 +00:00
brueffer
578361cc4b Uppercase FreeBSD. 2007-03-10 12:45:46 +00:00
ru
1499ddfc67 Bump the original revision of c89(1). 2007-03-10 07:11:20 +00:00
ru
4737cf8a81 Reduce diffs with c99(1). 2007-03-10 07:10:01 +00:00
mckusick
6f0e028b09 Add myself. 2007-03-10 05:56:05 +00:00
ru
33cf984c1f Sort (once again) by month/day/year/login. 2007-03-09 20:31:46 +00:00
jkois
28054e68a1 Add my record.
Discussed with and approved by: remko@
2007-03-09 20:14:59 +00:00
emaste
b03e9e93ed KERN_PROC_ALL produces a kinfo_proc for each thread in a process, which
caused fstat to produce duplicated output for threaded processes.  Instead
use KERN_PROC_PROC to get just one kinfo_proc per process.

MFC After:	2 weeks
2007-03-09 16:21:40 +00:00
ru
723794ddf2 Fix markup. 2007-03-09 14:36:18 +00:00
ru
e13673a69c Spell "id" as "ID". 2007-03-09 12:45:00 +00:00
miwi
0db7f2bd93 - Add my birthday 2007-03-08 22:53:50 +00:00
fjoe
f13438e457 Better English. 2007-03-08 14:05:45 +00:00
mita
2b2cf55a08 Following rwatson's suggestion.
<20070307130635.M28276@fledge.watson.org>
2007-03-08 13:09:55 +00:00
tdb
be0a5845fc Add my birthday to the FreeBSD calendar.
Encouraged by:	rwatson
2007-03-08 12:17:01 +00:00
ticso
d9d5725f51 Add myself to the FreeBSD calendar. 2007-03-08 10:54:27 +00:00
fjoe
19d858e266 Implement "Remaking Makefiles" feature:
After reading Makefile and all the files that are included using .include
or .sinclude directives (source Makefiles) make considers each source
Makefile as a target and tries to rebuild it.  Both explicit and implicit
rules are checked and all source Makefiles are updated if necessary. If
any of the source Makefiles were rebuilt, make restarts from clean state.

To prevent infinite loops the following source Makefile targets are
ignored:
- :: targets that have no prerequisites but have commands
- ! targets
- targets that have .PHONY or .EXEC attributes
- targets without prerequisites and without commands

When remaking a source Makefile options -t (touch target), -q (query
mode), and -n (no exec) do not take effect, unless source Makefile is
specified explicitly as a target in make command line.
Additionally, system makefiles and .depend are not considered as a
Makefiles that can be rebuilt.

Reviewed by:	harti
2007-03-08 09:16:11 +00:00
will
f6d48b2630 Fix a bug where the standard input (fifoFd == 0) was confused with an
error return from open(2), leading to an erroneous value of maxJobs and
a hung make when -f is standard input and -j is used.

PR:		bin/101232
Submitted by:	Nate Eldredge <nge@cs.hmc.edu>
2007-03-08 07:57:43 +00:00
kientzle
4f72159a41 Argh. Support for reading ACLs off of disk was inadvertently disabled
as part of an old configuration shuffle.  As a result, although
ACL restore has been working, ACLs haven't been written into archives
for some time.  <sigh>

Pointy hat: You know.
MFC after: 3 days
2007-03-08 05:52:01 +00:00