Commit Graph

8989 Commits

Author SHA1 Message Date
Tim Kientzle
ba1a633912 Explain how the test_option_q test works. 2008-08-22 01:26:55 +00:00
Tim Kientzle
3873424684 Test for -q (aka --fast-read).
Fix the error uncovered by this test.
2008-08-22 01:22:55 +00:00
Tim Kientzle
b1feec2392 The results for test 2 here are short enough to just be included inline.
There's no need to go through the hassle of having a checked-in uuencoded
reference file for comparison.
2008-08-21 22:28:00 +00:00
David E. O'Brien
8acee1c0ca Use the SCHEME_ knobs rather than knowing what they expand to.
Reviewed by:	des
2008-08-21 14:12:34 +00:00
David Malone
7f15c32d76 Lockf was exiting with status 1 if the command did not exit normally.
This is easy to confuse with the actual exit status of the program.
Instead exit with EX_SOFTWARE if the command doesn't exit normally.

MFC after:	1 month
2008-08-21 07:36:17 +00:00
Tim Kientzle
503b743566 Add some more tests to verify that "./foo" matches "foo" but "/foo" does not. 2008-08-21 07:04:57 +00:00
Tim Kientzle
e0e53b4111 Always display the unedited pathname in -t output.
I would like to provide a way to preview the effects of pathname edits,
but pattern selection has to happen against the unedited path, so it
seems that we have to show people the unedited path to help in
designing selection patterns.
2008-08-21 06:41:14 +00:00
Tim Kientzle
630d7662c3 cpio should restore file flags and ACLs when they're available 2008-08-20 16:39:18 +00:00
Andrey A. Chernov
e39ee4216c w(1) uses strftime %b with to print the abbreviated month name
if a user logged in more than a week ago.
This may contain multibyte characters (e.g. when using UTF-8).
This string is then aligned on byte-length rathern than char-length,
resulting in misalignment and unfinished multibyte characters.

PR:             126657
Submitted by:   Johan van Selst <johans@stack.nl>
2008-08-20 12:32:19 +00:00
Ed Schouten
bc093719ca Integrate the new MPSAFE TTY layer to the FreeBSD operating system.
The last half year I've been working on a replacement TTY layer for the
FreeBSD kernel. The new TTY layer was designed to improve the following:

- Improved driver model:

  The old TTY layer has a driver model that is not abstract enough to
  make it friendly to use. A good example is the output path, where the
  device drivers directly access the output buffers. This means that an
  in-kernel PPP implementation must always convert network buffers into
  TTY buffers.

  If a PPP implementation would be built on top of the new TTY layer
  (still needs a hooks layer, though), it would allow the PPP
  implementation to directly hand the data to the TTY driver.

- Improved hotplugging:

  With the old TTY layer, it isn't entirely safe to destroy TTY's from
  the system. This implementation has a two-step destructing design,
  where the driver first abandons the TTY. After all threads have left
  the TTY, the TTY layer calls a routine in the driver, which can be
  used to free resources (unit numbers, etc).

  The pts(4) driver also implements this feature, which means
  posix_openpt() will now return PTY's that are created on the fly.

- Improved performance:

  One of the major improvements is the per-TTY mutex, which is expected
  to improve scalability when compared to the old Giant locking.
  Another change is the unbuffered copying to userspace, which is both
  used on TTY device nodes and PTY masters.

Upgrading should be quite straightforward. Unlike previous versions,
existing kernel configuration files do not need to be changed, except
when they reference device drivers that are listed in UPDATING.

Obtained from:		//depot/projects/mpsafetty/...
Approved by:		philip (ex-mentor)
Discussed:		on the lists, at BSDCan, at the DevSummit
Sponsored by:		Snow B.V., the Netherlands
dcons(4) fixed by:	kan
2008-08-20 08:31:58 +00:00
Tim Kientzle
b14f19cf97 Better comment the pattern tests; adjust the filenames for the
reference files to match the corresponding source.

MFC after:	3 days
2008-08-20 06:01:53 +00:00
John Baldwin
32c9e3bd01 Use kvm_getcptime(3) to fetch the global CPU time stats from a crashdump
since the 'cp_time' symbol doesn't exist in recent kernels.  This fixes
iostat and vmstat on crash dumps.

MFC after:	1 week
2008-08-19 21:33:09 +00:00
Tim Kientzle
651eea9aa8 Fix SVN r181821 by not using FNM_LEADING_DIR where
it shouldn't be used.
2008-08-18 18:13:40 +00:00
Tim Kientzle
0f4b98311a Strip leading "./" or ".//" from patterns and filenames
so that "./foo" matches "foo" (and vice versa).

This is related to PR bin/119141.

PR:		bin/119141
MFC after:	4 days
2008-08-18 04:58:54 +00:00
Tim Kientzle
ac2dcb729f Don't strip a leading '/' from a pattern to be matched.
This aligns the pattern-matching behavior with GNU tar
and restores the behavior of bsdtar prior to FreeBSD 6.3.

PR:		bin/117909
MFC after:	3 days
2008-08-17 19:43:45 +00:00
David Malone
9c95bc1c1c Add limited support for units that are related by affine rather
than linear relations. We can now convert degC to degF.

586 units, 56 prefixes
You have: 24 degC
You want: degF
	75.2
You have: degC
You want: K
	 (-> x*1 +273.15)
	 (<- y*1 -273.15)
2008-08-16 16:27:41 +00:00
Tim Kientzle
8eccad56d9 Test updates: Handling of patterns on command line, error messages. 2008-08-15 06:12:02 +00:00
Doug Rabson
d458f4629b When generating thread-safe server code, handle procedures with void return
types correctly.
2008-08-12 13:38:06 +00:00
Ed Schouten
1b59478ca5 Delete unused files in the window(1) directory that contain a colon.
During the import of the 4.4BSD Lite sources, four files got added to
the repository called :tt, :tty, :var and :ww. They seem to contain some
kind of debug information. These files aren't used/installed anywhere.

Unfortunately the colons in the filenames prevents us from checking out
the source tree on file systems that don't support colons (such as FAT).
Just remove these unneeded files to keep SVN happy.

Reported by:	Rohit Tripathi <rohit trip gmail com>
MFC after:	3 days
2008-08-09 14:44:04 +00:00
Andrey A. Chernov
68910e7a67 Use arc4random_uniform(3) 2008-08-07 22:22:41 +00:00
Edwin Groothuis
8ad0fbc8a1 - acificfrancexchange -> pacificfrancexchange
- Add comments about the pegged currencies.

Submitted by:	GeJ on #bsdports
2008-08-07 05:35:01 +00:00
Edwin Groothuis
5a97b29aa5 Update the units library file.
- Merge changes from NetBSD and OpenBSD.
- Add the Euro as a primitive unit, add old converted currency and
  pegged currency (Obtained from Wikipedia)
- Rename "dollar" to "usdollar" as primitive unit, remove non-pegged
  currency and add pegged currency (Obtained from Wikipedia)
- Updated the accuracy of a lot of constants (Obtained from Wikipedia)

PR:		bin/106545 bin/88252
Submitted by:	trasz<trasz@pin.if.uz.zgora.pl>, J Vinopal <banshee@abattoir.com>
Approved by:	bde@ (mentor)
MFC after:	1 week
2008-08-07 00:14:56 +00:00
Edwin Groothuis
0d724b8765 Move functions which are only locally used into their C files and
make them static.

usage() in calendar.c
event_*() in io.c

PR:		bin/118644
Approved by:	bde@ (mentor)
2008-08-05 08:16:37 +00:00
Edwin Groothuis
35304a1641 style(9)ify usr.bin/calendar
PR:		bin/118644
Approved by:	bde@ (mentor)
MFC after:	1 week
2008-08-05 08:11:54 +00:00
Colin Percival
80d61a6a48 Mark functions as __dead2 in order to help the LLVM static checker
understand which code paths aren't possible.

Reported by:	edwin
2008-08-04 07:36:53 +00:00
Colin Percival
d59e8ae886 Don't close file descriptor number <whatever random garbage was on the
stack>.

Found by:	LLVM/Clang Static Checker
MFC after:	1 week
2008-08-04 06:48:54 +00:00
Colin Percival
5fe69bb518 Setting a variable to the same value twice doesn't actually make it
more likely to have the right value.  Remove superfluous assignments.

Found by:	LLVM/Clang Static Checker
2008-08-04 06:39:52 +00:00
Colin Percival
f9bcf9cabf Mark functions as __dead2 in order to help the LLVM static checker
understand which code paths aren't possible.

This commit eliminates 117 false positive bug reports of the form
"allocate memory; error out if pointer is NULL; use pointer".
2008-08-04 01:25:48 +00:00
Xin LI
61328d7a97 Make quota(1) to compile with WARNS=6:
- ANSI'fy showrawquotas().
 - Shut up GCC by initializing bgrace and igrace.  The situation
   that caused the GCC warning can never happen though.
2008-08-04 00:43:49 +00:00
Olivier Houchard
049aa2e813 ctime() expects a time_t, but qup->dqblk.dqb_btime is an int32_t, so for
big endian platforms where time_t is 64bits (ie armeb and sparc64), it will
be a problem.
Use a temporary time_t to work around this.

Submitted by:	Matthew Luckie <mjl AT luckie DOT org dot nz>
MFC after:	3 days
2008-08-03 20:36:40 +00:00
Edwin Groothuis
5f5be9e857 calendar.holiday: Buinea-bissau should be Guinea-Bissau
PR:		conf/126199
Submitted by:	comet--berkeley (aka Pablo Picasso) <comet@transbay.net>
Approved by:	bde@
2008-08-03 09:21:47 +00:00
John Baldwin
52122f3139 A few style and whitespace fixes.
Submitted by:	bde
2008-08-02 12:04:59 +00:00
David Schultz
9d65050e7b POSIX says that octal escapes have the format \ddd in the format string,
but \0ddd in a %b argument, with a length restriction of 3 octal digits
in either case. This seems silly, but it needs to be right so it's possible
to write an octal escape followed by an ordinary digit. Solaris printf(1)
and GNU printf(1) also behave this way.

Example: "printf '\0752'" now produces "=2" instead of garbage.
2008-08-02 06:02:02 +00:00
John Baldwin
e68ed79390 Tweak the support for using ldd on 32-bit objects a bit further.
Specifically, build a 32-bit /usr/bin/ldd32 on amd64 which handles 32-bit
objects.  Since it is a 32-bit binary, it can fork a child process which
can dlopen() a 32-bit shared library.  The current 32-bit support in ldd
can't do this because it does the dlopen() from a 64-bit process.  In order
to preserve an intuitive interface for users, the ldd binary automatically
execs /usr/bin/ldd32 for 32-bit objects.  The end result is that ldd on
amd64 now transparently handles 32-bit shared libraries in addition to
32-bit binaries.

Submitted by:	ps (indirectly)
2008-08-01 21:52:41 +00:00
Dag-Erling Smørgrav
d8984f48cb Try to make this code slightly less painful to read. 2008-07-31 17:15:21 +00:00
Ed Schouten
40e761838e Add POSIX -p flag to make(1).
This article [1] describes the -p flag for make(1):

	Write to standard output the complete set of macro definitions and
	target descriptions. The output format is unspecified.

We already support a similar flag (-d g1), but unlike -p, it still
executes commands. Our implementation just turns it into -d g1, but also
sets flag `printGraphOnly', which will cause make(1) to skip execution.

[1] http://www.opengroup.org/onlinepubs/009695399/utilities/make.html

Reviewed by:	imp
PR:		standards/99960
2008-07-30 21:18:38 +00:00
Tim Kientzle
979b646f30 MfP4: Preserve permissions by default.
In particular, this fixes the oddity that -dumpl would apply
umask to copied dirs (which are created in the target tree)
but not to "copied" files (which are only linked).  After
this change:

$ ls -ld a a/b a/b/c
d--x-w-r--  3 tim  tim  512 Jul 29 20:08 a
drwxr----x  3 tim  tim  512 Jul 29 20:09 a/b
dr----x-w-  2 tim  tim  512 Jul 29 20:09 a/b/c
$ (echo a; echo a/b; echo a/b/c) | cpio -dumpl o
$ cd o
$ ls -ld a a/b a/b/c
d--x-w-r--  3 tim  tim  512 Jul 29 20:08 a
drwxr----x  3 tim  tim  512 Jul 29 20:09 a/b
dr----x-w-  2 tim  tim  512 Jul 29 20:09 a/b/c
2008-07-30 03:35:45 +00:00
Maksim Yevmenkin
f35a20921e Fix build 2008-07-29 21:20:03 +00:00
Maksim Yevmenkin
9b501d5ab1 Fix build 2008-07-29 17:02:00 +00:00
Tim Kientzle
b423c28f74 Add --no-preserve-owner, which seems to be required by some ports.
Thanks to: Erwin Lansing
2008-07-29 15:23:31 +00:00
Edwin Groothuis
bff7135050 Fix text in the comment why we check for ELF32_R_TYPE
Approved by:	bde@
MFC after:	2 days2 days
2008-07-28 12:49:16 +00:00
Ed Schouten
d693ac206e Fix a small typo in the procstat(1) manpage: messsage queue.
Approved by:	philip (mentor)
MFC after:	3 days
2008-07-28 08:01:24 +00:00
Simon L. B. Nielsen
1640935f0b - Fix mtree example so it works.
- Document --version.

Reviewed by:	kientzle
MFC after:	1 week
2008-07-26 17:22:40 +00:00
Philip M. Gollucci
fc2b30de6c Adding myself as a new ports committer
Reviewed by:    gabor (mentor)
Approved by:	araujo (mentor)
2008-07-23 01:37:04 +00:00
Xin LI
bf15662677 Sync with NetBSD's license changes. 2008-07-23 00:03:36 +00:00
Edwin Groothuis
8bd833fff8 After the commit of SVN rev 180236, wilko@ noticed that the approach
doesn't work on the Alpha platform: machine/elf.h doesn't include
sys/elf32.h there.

PR:		related to bin/124906
Approved by:	bde@
MFC after:	1 week
2008-07-21 02:13:14 +00:00
Xin LI
fffc0a1e59 Use %zd for size_t. With this gcore(1) is WARNS=6 clean. 2008-07-18 23:37:05 +00:00
Xin LI
c1613cd50a Indent the else path, reduce diff against OpenBSD. 2008-07-18 23:35:31 +00:00
Kevin Lo
068d36032a Fix a longstanding bug, from Otto Moerbeck:
if we're reducing a rule that has an empty
right hand side and the yacc stackpointer is pointing at the very
end of the allocated stack, we end up accessing the stack out of
bounds by the implicit $$ = $1 action

Obtained from:	OpenBSD
2008-07-18 15:05:14 +00:00
Philippe Charnier
dd99983988 add __unused to succeed at WARNS=6 2008-07-10 13:26:46 +00:00
Stacey Son
98ca2e9789 Added my birthday to the FreeBSD calendar.
Approved by:	jb (mentor)
2008-07-08 15:43:54 +00:00
Tim Kientzle
af03c60c06 Preserve ownership if cpio is run as root. 2008-07-06 16:39:18 +00:00
Colin Percival
a6d7fc3469 Move duplicated code from tar_mode_[cru] into archive_write.
Fix a bug I introduced 7 minutes ago: clean up properly from archive_write
if we exit the argv-handling loop due to -C not having an argument.
2008-07-05 08:10:55 +00:00
Colin Percival
d47b2ddb21 Use malloc in write_archive to allocate a 64kB buffer for holding file data
instead of using 64kB of stack space in copy_file_data and write_file_data.
2008-07-05 08:03:08 +00:00
Colin Percival
85f32b2087 Clean up write_entry by eliminating fd except in the #ifdef __linux block
where it is used. [1]

Don't leak file descriptors in write_entry_backend if archive_write_header
returns ARCHIVE_FAILED.

Found by:	Coverity Prevent [1]
2008-07-05 06:05:34 +00:00
Tim Kientzle
ba779d5afd bsdcpio is now at version 1.0.0. 2008-07-05 05:17:33 +00:00
Tim Kientzle
0d35b0da0c In -pl mode, only hardlink regular files. I need to test
other implementations, but it's clear that dirs and symlinks,
at least, shouldn't be hardlinked.
2008-07-05 05:16:23 +00:00
Tim Kientzle
2ebfcda850 Remove an unused define. 2008-07-05 05:15:07 +00:00
Colin Percival
9af6e14a8c Revert CVS revision 1.68; it is now possible for entry to be NULL at the end
of write_entry.  (This was perfectly safe, since archive_entry_free(NULL) is
a no-op, but adding the check back makes the style more consistent.)
2008-07-05 02:21:51 +00:00
Tim Kientzle
6481fd43de FreeBSD-CURRENT bsdtar is synched up with libarchive-portable 2.5.5. 2008-07-05 02:09:54 +00:00
Tim Kientzle
aec34fd22e Remove HAVE_STRUCT_STAT_ST_RDEV, as it's not used anywhere. 2008-07-05 02:09:13 +00:00
Tim Kientzle
f12440da1e Stop using the deprecated linux/ext2_fs.h. 2008-07-05 02:06:55 +00:00
Tim Kientzle
fe8c1d9768 Use %H:%M for strftime() time formatting instead of the non-portable %R. 2008-07-05 02:05:55 +00:00
Edwin Groothuis
fffd993df2 On 64 bit architectures, you can run 32 bit executables and the rtld can trace them, but ldd(1) doesn't know yet how to detect them:
[/] root@ed-exigent>ldd `which httpd`
    ldd: /usr/local/sbin/httpd: can't read program header
    ldd: /usr/local/sbin/httpd: not a dynamic executable

    But...

    [/] root@ed-exigent>LD_32_TRACE_LOADED_OBJECTS==1 `which httpd`
    libm.so.4 => /lib32//libm.so.4 (0x280c8000)
    libaprutil-1.so.2 => /usr/local/lib/libaprutil-1.so.2 (0x280de000)
    libexpat.so.6 => /usr/local/lib/libexpat.so.6 (0x280f2000)
    libiconv.so.3 => /usr/local/lib/libiconv.so.3 (0x28110000)
    libapr-1.so.2 => /usr/local/lib/libapr-1.so.2 (0x281fd000)
    libcrypt.so.3 => /lib32//libcrypt.so.3 (0x2821d000)
    libpthread.so.2 => not found (0x0)
    libc.so.6 => /lib32//libc.so.6 (0x28235000)
    libpthread.so.2 => /usr/lib32/libpthread.so.2 (0x2830d000)

Added support in ldd(1) for the LD_32_xxx environment variables if
the architecture of the machine is >32 bits. If we ever go to 128
bit architectures this excercise will have to be repeated but thanks
to earlier commits today it will be relative simple.

PR:		bin/124906
Submitted by:	edwin
Approved by:	bde (mentor)
MFC after:	1 week
2008-07-03 22:37:51 +00:00
Edwin Groothuis
d3c1e14b41 Extract the determination of the kind of (dynamic) executable from
the main-loop into a seperate function.
Instead of using hardcoded environment variables, define them in a
lookup table.
For the rest, no functionality changes.

Approved by:	bde (mentor)
MFC after:	1 week
2008-07-03 22:30:18 +00:00
Edwin Groothuis
a0d476a986 stylify ldd.c, no functional changes.
Approved by:	bde (mentor)
MFC after:	1 week
2008-07-03 22:26:43 +00:00
Daniel Gerzo
9ea29562d9 - add the -m option to the example commands because they would fail w/o it
as the ``man'' user does not have a valid shell by default.

PR:		docs/121713
Approved by:	trhodes
MFC after:	3 days
2008-07-01 20:56:23 +00:00
Tim Kientzle
77f719e605 Don't try to hardlink directories. While I'm here, expand some
comments to make this section of code a little clearer.
2008-07-01 05:45:03 +00:00
Xin LI
a9f1ad5de1 Reflect the fact that we actually have NetBSD revision 1.3. 2008-06-30 23:53:15 +00:00
Xin LI
fec65af1ca Remove clause 3 and 4 of NetBSD license.
Obtained from:	NetBSD
2008-06-30 23:23:31 +00:00
Xin LI
0889440a08 Make it clear that gzcat expects each argument to be separate files.
PR:		docs/123010
Submitted by:	Andrew Wright <andrewhw ieee org>
MFC after:	2 weeks
2008-06-30 17:45:47 +00:00
Dag-Erling Smørgrav
91fad6b28d Update man page for -t. 2008-06-30 17:16:05 +00:00
Dag-Erling Smørgrav
ec7bd62201 Quick shot at implementing -t (test).
Requested by:	ache
MFC after:	2 weeks
2008-06-30 17:11:27 +00:00
David E. O'Brien
1082b19643 Note that the .POSIX special target disables the "Remaking Makefiles" feature. 2008-06-27 14:35:33 +00:00
John Baldwin
6bc1e9cd84 Rework the lifetime management of the kernel implementation of POSIX
semaphores.  Specifically, semaphores are now represented as new file
descriptor type that is set to close on exec.  This removes the need for
all of the manual process reference counting (and fork, exec, and exit
event handlers) as the normal file descriptor operations handle all of
that for us nicely.  It is also suggested as one possible implementation
in the spec and at least one other OS (OS X) uses this approach.

Some bugs that were fixed as a result include:
- References to a named semaphore whose name is removed still work after
  the sem_unlink() operation.  Prior to this patch, if a semaphore's name
  was removed, valid handles from sem_open() would get EINVAL errors from
  sem_getvalue(), sem_post(), etc.  This fixes that.
- Unnamed semaphores created with sem_init() were not cleaned up when a
  process exited or exec'd.  They were only cleaned up if the process
  did an explicit sem_destroy().  This could result in a leak of semaphore
  objects that could never be cleaned up.
- On the other hand, if another process guessed the id (kernel pointer to
  'struct ksem' of an unnamed semaphore (created via sem_init)) and had
  write access to the semaphore based on UID/GID checks, then that other
  process could manipulate the semaphore via sem_destroy(), sem_post(),
  sem_wait(), etc.
- As part of the permission check (UID/GID), the umask of the proces
  creating the semaphore was not honored.  Thus if your umask denied group
  read/write access but the explicit mode in the sem_init() call allowed
  it, the semaphore would be readable/writable by other users in the
  same group, for example.  This includes access via the previous bug.
- If the module refused to unload because there were active semaphores,
  then it might have deregistered one or more of the semaphore system
  calls before it noticed that there was a problem.  I'm not sure if
  this actually happened as the order that modules are discovered by the
  kernel linker depends on how the actual .ko file is linked.  One can
  make the order deterministic by using a single module with a mod_event
  handler that explicitly registers syscalls (and deregisters during
  unload after any checks).  This also fixes a race where even if the
  sem_module unloaded first it would have destroyed locks that the
  syscalls might be trying to access if they are still executing when
  they are unloaded.

  XXX: By the way, deregistering system calls doesn't do any blocking
  to drain any threads from the calls.
- Some minor fixes to errno values on error.  For example, sem_init()
  isn't documented to return ENFILE or EMFILE if we run out of semaphores
  the way that sem_open() can.  Instead, it should return ENOSPC in that
  case.

Other changes:
- Kernel semaphores now use a hash table to manage the namespace of
  named semaphores nearly in a similar fashion to the POSIX shared memory
  object file descriptors.  Kernel semaphores can now also have names
  longer than 14 chars (up to MAXPATHLEN) and can include subdirectories
  in their pathname.
- The UID/GID permission checks for access to a named semaphore are now
  done via vaccess() rather than a home-rolled set of checks.
- Now that kernel semaphores have an associated file object, the various
  MAC checks for POSIX semaphores accept both a file credential and an
  active credential.  There is also a new posixsem_check_stat() since it
  is possible to fstat() a semaphore file descriptor.
- A small set of regression tests (using the ksem API directly) is present
  in src/tools/regression/posixsem.

Reported by:	kris (1)
Tested by:	kris
Reviewed by:	rwatson (lightly)
MFC after:	1 month
2008-06-27 05:39:04 +00:00
Tim Kientzle
6986afe53e As reported by Alexey Shuvaev, -dumpl overwrote files after
linking them, with predictably bad results.
2008-06-26 15:46:01 +00:00
Tim Kientzle
634d062e6a Pass the entry down into the core write loop, so we
can include the filename when reporting errors.

Thanks to: Dan Nelson
2008-06-25 05:01:02 +00:00
Tim Kientzle
e6c78aec4f In -p mode, don't gaurd against '..' in paths. We continue to
check in -i mode unless --insecure is specified.

PR: bin/124924
2008-06-24 15:18:40 +00:00
Tim Kientzle
1aaade6e93 If we're using -l and can't hardlink the file because of a cross-device
link, just ignore the -l option and copy the file instead.
In particular, this should fix the COPYTREE_* macros used in the
ports infrastructure which use -l to preserve space but often get
used for cross-device copies.
2008-06-21 17:47:56 +00:00
Tim Kientzle
9b48cdcc39 Rework line-processing framework to add support for --null and
to eliminate a callback.
2008-06-21 02:20:20 +00:00
Tim Kientzle
00e3ab6e67 Various long options for GNU cpio compat. 2008-06-21 02:18:52 +00:00
Tim Kientzle
152e214a9a MfP4: test improvements, mostly for portability. 2008-06-21 02:17:18 +00:00
Joerg Wunsch
2b7b4962ab Make the search for sources in PATH_PORTS more accurate. I only
noticed that a "whereis -qs qemu" matched the distfiles subdir of qemu
rather than /usr/ports/emulators/qemu.

It now ignores all dot entries in /usr/ports, plus all entries
starting with a capital letter (maintenance stuff like Templates, but
also includes subdir CVS), plus /usr/ports/distfiles which is simply a
magic name in that respect.
2008-06-20 08:39:42 +00:00
Alexander Motin
145d2d3ac4 Add myself. Better late then never. 2008-06-19 17:10:05 +00:00
Dmitry Marakasov
9e269af67e Add myself.
Approved by:	miwi (mentor)
2008-06-19 16:29:37 +00:00
Remko Lodder
589295b90d Remove superfluous eofmarker.
Requested by:	Jaakko Heinonen
Discussed with:	Jaakko, edwin

Approved by:	imp (mentor, implicit)
2008-06-17 18:56:04 +00:00
Ermal Luçi
a10ab63b99 Add my birthday to the calendar.
Approved by:	mlaier (mentor)
2008-06-16 17:35:34 +00:00
Konstantin Belousov
05427aafc6 Struct cdev is always the member of the struct cdev_priv. When devfs
needed to promote cdev to cdev_priv, the si_priv pointer was followed.

Use member2struct() to calculate address of the wrapping cdev_priv.
Rename si_priv to __si_reserved.

Tested by:	pho
Reviewed by:	ed
MFC after:	2 weeks
2008-06-16 17:34:59 +00:00
Doug Barton
482ff78560 Include bsd.own.mk to pick up the definition of MK_GNU_CPIO 2008-06-16 07:24:05 +00:00
Doug Barton
6973701a00 1. Make the BSD version of cpio the default [1]
a. The BSD version will be built and installed unless
WITHOUT_BSD_CPIO is defined.
b. The GNU version will not be built or installed unless
WITH_GNU_CPIO is defined. If this is defined, the symlink
in /usr/bin will be to the GNU version whether the BSD
version is present or not.

When these changes are MFCed the defaults should be flipped.

2. Add a knob to disable the building of GNU grep. This will
make it easier for those that want to test the BSD version in
the ports.

Approved by:	kientzle [1]
2008-06-16 05:48:15 +00:00
Tim Kientzle
48ee9a828d MfP4: Minor portability fix. 2008-06-15 10:08:16 +00:00
Tim Kientzle
669a9b2e92 MfP4: test harness cleanup. 2008-06-15 10:07:54 +00:00
Ivan Voras
448816f0d7 Add myself to the calendar.
Approved by:	gnn (mentor)
2008-06-12 22:52:11 +00:00
Ed Schouten
436f2e5275 Fix build of fstat after minor() changes.
Even though I ran a `make universe' to see whether the changes to the
device minor number macro's broke the build, I was not expecting `make
universe' to silently continue if build errors occured, thus causing me
to overlook the build error.

Approved by:	philip (mentor)
Pointyhat to:	me
2008-06-12 10:15:14 +00:00
Colin Percival
f6dd73207f Make one-bit fields unsigned instead of signed. This has no effect,
since they are only tested for zero/nonzero; but it's arguably a bad
idea to set a {-1, 0} variable to 1 (as happens in this code).

Found by:	Coverity Prevent
2008-06-09 14:41:28 +00:00
Colin Percival
af58f6feff Rework code to avoid using a pointer after freeing it. Aside from the
possibility of memory becoming undereferenceable when it is freed, this
change should have no effect on bsdtar behaviour.

Found by:	Coverity Prevent
2008-06-09 14:03:55 +00:00
David Malone
9bcce8a03e I missed some "register"s in non-dot-C files. 2008-06-08 19:59:15 +00:00
Wojciech A. Koszek
ec4e0f15cd Make usage() 'static'. 2008-06-08 12:43:02 +00:00
David Malone
48f6b9b8b1 De-register declarations. 2008-06-04 19:50:34 +00:00
David Malone
f258a139d3 Fix a strict aliasing warning - I think it is really telling us
that the way char * and void * pointers may not be stored in the
same way.
2008-06-04 19:16:54 +00:00