Commit Graph

142602 Commits

Author SHA1 Message Date
Tim Kientzle
8666079cdb Include more detailed explanation of this case, since it's pretty
subtle why it comes out the way it does.  Once you realize that it
depends on the archiving order, it's also important to realize that
filesystem differences aren't going to break this case.  (Some of the
other tests have had to be extensively rewritten to make them
independent of the order in which a particular filesystem returns file
entries.)

(This commit also serves to note the PR number that I accidentally
omitted from the previous commit.)

PR:		bin/128562
MFC after:	30 days
2008-11-10 05:24:13 +00:00
Tim Kientzle
c4a52c7226 Test --strip-components and fix it to actually work. Jaakko did a
good job writing this test; it exercises a lot of subtle cases.  The
trickiest one is that a hardlink to something that didn't get
extracted should not itself be extracted.  In some sense, this is not
the desired behavior (we'd rather restore the file), but it's the best
you can do in a single-pass restore of a tar archive.

The test here should be extended to exercise cpio and newc formats as
well, since their hardlink models are different, which will lead to
different handling of some of these edge cases.

Submitted by:	Jaakko Heinonen
MFC after:	30 days
2008-11-10 05:04:55 +00:00
Maxim Sobolev
333b8b2fa0 Improve on 184781 - instead of ignoring the file when the only difference
is CVS Id, replace the old one with the new one automatically. While I
don't see much difference, some people think it's somehow better that way.
2008-11-09 23:44:32 +00:00
Joseph Koshy
e829eb6d61 - Separate PMC class dependent code from other kinds of machine
dependencies.  A 'struct pmc_classdep' structure describes operations
  on PMCs; 'struct pmc_mdep' contains one or more 'struct pmc_classdep'
  structures depending on the CPU in question.

  Inside PMC class dependent code, row indices are relative to the
  PMCs supported by the PMC class; MI code in "hwpmc_mod.c" translates
  global row indices before invoking class dependent operations.

- Augment the OP_GETCPUINFO request with the number of PMCs present
  in a PMC class.

- Move code common to Intel CPUs to file "hwpmc_intel.c".

- Move TSC handling to file "hwpmc_tsc.c".
2008-11-09 17:37:54 +00:00
Joseph Koshy
2ad65bf421 Style tweak. 2008-11-09 17:07:52 +00:00
Bjoern A. Zeeb
687a9b4738 For consistency work on the local object passed into the function for the
lock operation instead using the global name.

Submitted by:	ganbold
MFC after:	2 months
2008-11-09 14:06:44 +00:00
Ed Schouten
ebb45b0620 Regenerate system call tables for r184789. 2008-11-09 10:48:06 +00:00
Ed Schouten
a1b5a8955e Mark uname(), getdomainname() and setdomainname() with COMPAT_FREEBSD4.
Looking at our source code history, it seems the uname(),
getdomainname() and setdomainname() system calls got deprecated
somewhere after FreeBSD 1.1, but they have never been phased out
properly. Because we don't have a COMPAT_FREEBSD1, just use
COMPAT_FREEBSD4.

Also fix the Linuxolator to build without the setdomainname() routine by
just making it call userland_sysctl on kern.domainname. Also replace the
setdomainname()'s implementation to use this approach, because we're
duplicating code with sysctl_domainname().

I wasn't able to keep these three routines working in our
COMPAT_FREEBSD32, because that would require yet another keyword for
syscalls.master (COMPAT4+NOPROTO). Because this routine is probably
unused already, this won't be a problem in practice. If it turns out to
be a problem, we'll just restore this functionality.

Reviewed by:	rdivacky, kib
2008-11-09 10:45:13 +00:00
Matteo Riondato
37f1755cab Revert to previous revision.
I should not commit anything at 3.50 AM.
In addition to danfe's comments, I got others.
I'll work on a better version of the patch.
2008-11-09 09:01:09 +00:00
Joseph Koshy
c9e2213976 - Document the changed meaning of a '*' argument to option "-c".
- Tweak grammar.
2008-11-09 08:39:52 +00:00
Joseph Koshy
35cf650fc1 Change the meaning of a "*" argument to option -c to mean 'all
unhalted CPUs', instead of 'all CPUs'.  This change brings
pmccontrol(8) in line with pmcstat(8).
2008-11-09 08:36:35 +00:00
Maxim Sobolev
ed61c72f45 Ignore files that only differ in CVS Id tag.
MFC after:	2 weeks
2008-11-09 07:58:23 +00:00
Matteo Riondato
8037791bf7 Don't leave files in /var/cront/tabs when interrupted
PR:		17363
MFC after:	3 days
2008-11-09 07:34:11 +00:00
Matteo Riondato
2b9f079ca2 Be paranoid and use snprintf
PR:		bin/122137
Submitted by:	Steven Kreuzer <skreuzer@exit2shell.com>
MFC after:	3 days
2008-11-09 06:44:53 +00:00
Kip Macy
8aa7a58108 make kern.ipc.nmbclusters actually have a useful effect on nmbclusters et al.
initialize pkthdr in field order
2008-11-09 01:53:06 +00:00
Hiroki Sato
d3d0d3a3b5 Add workaround for a back reference when no corresponding
parenthesized subexpression is defined.  For example, the
following command line caused unexpected behavior like
segmentation fault:

 % echo test | sed -e 's/test/\1/'

PR:		bin/126682
MFC after:	1 week
2008-11-09 01:10:21 +00:00
Ed Schouten
5bbae50149 Reduce the default baud rate of PTY's to 9600.
On RELENG_6 (and probably RELENG_7) we see our syscons windows and
pseudo-terminals have the following buffer sizes:

| LINE RAW CAN OUT IHIWT ILOWT OHWT LWT     COL STATE  SESS      PGID DISC
| ttyv0  0   0   0  7680  6720 2052 256       7 OCcl       1146  1146 term
| ttyp0  0   0   0  7680  6720 1296 256       0 OCc       82033 82033 term

These buffer sizes make no sense, because we often have much more output
than input, but I guess having higher input buffer sizes improves
guarantees of the system.

On MPSAFE TTY I just sent both the input and output buffer sizes to 7
KB, which is pretty big on a standard FreeBSD install with 8 syscons
windows and some PTY's. Reduce the baud rate to 9600 baud, which means
we now have the following buffer sizes:

|  LINE   INQ  CAN  LIN  LOW  OUTQ  USE  LOW   COL  SESS  PGID STATE
| ttyv0  1920    0    0  192  1984    0  199     7  2401  2401 Oil
| pts/0  1920    0    0  192  1984    0  199  5631  1305  2526 Oi

This is a lot smaller, but for pseudo-devices this should be good
enough. You need to do a lot of punching to fill up a 7.5 KB input
buffer. If it turns out things don't work out this way, we'll just
switch to 19200 baud.
2008-11-08 20:40:39 +00:00
Edward Tomasz Napierala
4bdaada206 Require write access on a directory being moved from one parent
directory to another in ZFS.

Approved by:	rwatson (mentor), pjd
2008-11-08 19:56:32 +00:00
Giorgos Keramidas
af4831d48f Spell 'different' correctly. 2008-11-08 17:45:47 +00:00
Alexander Motin
45056382d0 Don't use curthread to resolve file descriptor. Request may be queued, so
thread will be different. Instead require sender to send process ID
together with file descriptor.
2008-11-08 06:25:57 +00:00
Tim Kientzle
85ae3122e9 New command-line parser for bsdtar.
This replaces the getopt()/getopt_long() wrapper, the old-style
argument rewriter and the associated configuration glue with a more
straightforward custom command parser.  In particular, this ensures
that bsdtar will have consistent option parsing on every platform,
regardless of whether the platform supports getopt_long().

MFC after:	30 days
2008-11-08 04:43:24 +00:00
Alexander Motin
76371b5a80 Assign new cookie to the node to reflect API change.
All applications will have to be adapted and rebuilt.
2008-11-08 02:05:41 +00:00
Marc Fonvieille
8d0b36a3c1 Update ports number and size of Ports Collection. 2008-11-07 22:01:31 +00:00
Alexander Motin
169e1f79d8 Don't assign completely meaningless name to the node on creation.
As soon as node is created from the netgraph side now, it can be found
without using this. Allow application to assign whatever name it want later.
2008-11-07 19:51:07 +00:00
Alexander Motin
8ab00b3855 Two minor fixes. 2008-11-07 17:55:09 +00:00
Edward Tomasz Napierala
7968104d73 Add one more EACCES clause to rename.2.
Approved by:	rwatson (mentor)
2008-11-07 15:01:40 +00:00
Edward Tomasz Napierala
24878441f6 Make test for write access to the directory being moved a little more
specific.

Approved by:	rwatson (mentor)
2008-11-07 14:46:46 +00:00
Edward Tomasz Napierala
74019bf2bc Improve output when a test fails.
Approved by:	rwatson (mentor)
2008-11-07 14:45:42 +00:00
Doug Rabson
f8dcc5a8f7 Range-check NFSv2 procedure numbers before converting to NFSv3.
Submitted by:	csjp
2008-11-07 10:43:01 +00:00
Pyun YongHyeon
dca3a3a011 Remove informational messages left. These messages were intended to
show up in verbose boot mode.

Reported by:	pluknet ( pluknet<> gmail DOT com )
2008-11-07 07:02:28 +00:00
Max Laier
246b6a6d70 Restore (intmax_t) casts I lost during the last change & unbreak the build. 2008-11-06 23:55:28 +00:00
Edward Tomasz Napierala
36d227d9ed Backoff the last patch. It was overly restrictive - we want to check
for write permission on target only when moving the target between two
directories.

Approved by:	rwatson (mentor)
2008-11-06 22:28:04 +00:00
Alexander Motin
a3ffa4e0ae A lot of spelling fixes.
Submitted by:	keramida
2008-11-06 21:47:02 +00:00
Edward Tomasz Napierala
b92eda309d Change ZFS behaviour to match UFS: when moving (rename(2)) a subdirectory
from one parent directory to another, in addition to the usual access checks
one also needs write access to the subdirectory being moved.

Approved by:    rwatson (mentor), pjd
2008-11-06 19:17:58 +00:00
Warner Losh
0762c37122 Bring in http://perforce.freebsd.org/chv.cgi?CH=152584 from hps.
Submitted by:	hps
2008-11-06 17:26:12 +00:00
Marcel Moolenaar
dd7ebc0a76 Fix copyright notice. 2008-11-06 17:00:19 +00:00
Marcel Moolenaar
dd0db05da2 Fix a panic caused by a corrupted table when the header is
still valid. We were checking the state of the header and
not the table.

PR:		119868
Based on a patch from:	Jaakko Heinonen <jh@saunalahti.fi>
MFC after: 1 week
2008-11-06 16:51:33 +00:00
Max Laier
fd543f2759 Add two new options to du(1):
-A      Display the apparent size instead of the disk usage.  This can be
             helpful when operating on compressed volumes or sparse files.

     -B blocksize
             Calculate block counts in blocksize byte blocks.  This is differ-
             ent from the -k, -m options or setting BLOCKSIZE and gives an
             estimate of how much space the examined file hierachy would
             require on a filesystem with the given blocksize.  Unless in -A
             mode, blocksize is rounded up to the next multiple of 512.

The former is similar to GNU's du(1) --apparent-size.  The latter is
different from what GNU's du(1) -B does, which is equivalent to setting
BLOCKSIZE in our implementation and is rather pointless as it doesn't add
any real value (i.e. you can achieve the same with a simple awk-script).

No change in the normal output or processing.

Reviewed by:			keramida@, Peter French
Otherwise silience from:	freebsd-hackers@
2008-11-06 16:30:38 +00:00
Rafal Jaworowski
c38116e6bb Eliminate dead declarations in libstand. 2008-11-06 16:30:32 +00:00
Bjoern A. Zeeb
8e5c87f4b6 Fix typo and while here another one.
Reviewed by:	keramida
Reported by:	keramida
MFC after:	2 months (with r184720)
2008-11-06 16:30:20 +00:00
Rafal Jaworowski
65d75768c3 ARM pmap style(9) and cosmetics. 2008-11-06 16:28:28 +00:00
Rafal Jaworowski
71f00bea66 Auto-size kernel page tables allocation on Marvell systems.
This allows mini dumps to fully work for these platforms.

Obtained from:	Juniper Networks, Semihalf
2008-11-06 16:25:12 +00:00
Rafal Jaworowski
8e321b7943 Support kernel crash mini dumps on ARM architecture.
Obtained from:	Juniper Networks, Semihalf
2008-11-06 16:20:27 +00:00
Bjoern A. Zeeb
5a97c9d46c Include if_arp.h for IFP2AC so that the netgraph parts in if.c
are happy even if compiled without INET or INET6.

MFC after:	2 months
2008-11-06 15:26:09 +00:00
Bjoern A. Zeeb
91d6cfa6b1 Fix a bug introduced with r182851 splitting tcp_mss() into
tcp_mss() and tcp_mss_update() so that tcp_mtudisc() could
re-use the same code.

Move the TSO logic back to tcp_mss() and out of tcp_mss_update().
We tried to avoid that initially but if were are called from
tcp_output() with EMSGSIZE, we cleared the TSO flag on the tcpcb
there, called into tcp_mtudisc() and tcp_mss_update() which
then would reenable TSO on the tcpcb based on TSO capabilities
of the interface as learnt in tcp_maxmtu/6().
So if TSO was enabled on the (possibly new) outgoing interface
it was turned back on, which lead to an endless loop between
tcp_output() and tcp_mtudisc() until we overflew the stack.

Reported by:	kmacy
MFC after:	2 months (along with r182851)
2008-11-06 13:25:59 +00:00
Bjoern A. Zeeb
4b3f4d3818 Adopt the comment for tcp_maxmtu(); we are returning a number
not a pointer. While here update the rest of the comment to
better match what we have these days.

MFC after:	2 months
2008-11-06 12:59:00 +00:00
Bjoern A. Zeeb
6f01cac68a Fix a bug introduced with r182851 splitting tcp_mss() into
tcp_mss() and tcp_mss_update() so that tcp_mtudisc() could
re-use the same code.

In case we return early and got a metricptr to pass the hostcache
info back to the caller we need to initialize the data to a defined
state (zero it) as tcp_hc_get() would do if there was no hit.
Without that the caller would check on random stack garbage which
could lead to undefined results.

This only affected tcp_mss() if there was no routing entry for the peer,
tcp_mtudisc() was not affected.

MFC after:	2 months (along with r182851)
2008-11-06 12:33:33 +00:00
Doug Rabson
c3c1513719 Don't depend on krpc.ko in the NFS_LEGACYRPC case. 2008-11-06 11:43:49 +00:00
Bjoern A. Zeeb
c30067e8bf Hide AF_INET specific ioctl handling under #ifdef INET.
MFC after:	2 months
2008-11-06 11:11:25 +00:00
Bjoern A. Zeeb
edb04458d5 Hide AF_INET specific ioctl handling under #ifdef INET.
MFC after:	2 months
2008-11-06 11:00:57 +00:00