Commit Graph

151165 Commits

Author SHA1 Message Date
Ed Schouten
6951e12ec7 Add WARNS?=6, because it seems to build out of the box. 2009-12-05 19:55:26 +00:00
Ed Schouten
cfe41e3b68 Use _ULOG_POSIX_NAMES here, to make eventual porting to <utmpx.h> easier.
By the time we gain a real <utmpx.h>, it's just a matter of changing the
include at the top and -lulog from the Makefile.
2009-12-05 19:54:37 +00:00
Ed Schouten
42782e4717 Massively extend libulog:
- Just like struct utmp, store strings inside struct utmpx itself. This
  is needed to make things like pututxline() work.
- Add ut_id and ut_pid fields, even though they have little use in our
  implementation.
- It turns out our "reboot" wtmp entries indicate a system boot, so
  remove REBOOT_TIME
- Implement getutxline() and pututxline
- Add getutxuser() and setutxfile(), which allows us to crawl wtmp and
  lastlog files as well.
- Add _ULOG_POSIX_NAMES, so we can already use the POSIX names if we
  really want to.
2009-12-05 19:53:29 +00:00
Ed Schouten
2c201a9afe Fix many "function declaration isn't a prototype" warnings in libc.
I've only fixed code that seems to be written by `us'. There are still
many warnings like this present in resolv/, rpc/, stdtime/ and yp/.
2009-12-05 19:31:38 +00:00
Ed Schouten
dc29acd1a9 Don't let the C library depend on <utmp.h>.
The maximum length of a username has nothing to do with the size of the
username in the utmp files. Use MAXLOGNAME, which is defined as 17
(UT_USERSIZE + 1).
2009-12-05 19:04:21 +00:00
Ed Schouten
bbbe3054ff Remove warnings from exec.c.
The entries in the argv array are not const themselves, but sometimes we
want to fill in const values. Just make the array const and use
__DECONST() to make it const for the execve()-call itself.

Also convert the only K&R prototype to ANSI.
2009-12-05 18:55:16 +00:00
Ed Schouten
fd5e54d661 Use ANSI C prototypes inside termios.
While there, add a missing __unused to hide a warning in tcsetbreak().
2009-12-05 18:53:04 +00:00
Ed Schouten
86b6b655e4 Remove (hidden) warning about missing prototypes for fdevname(3). 2009-12-05 18:51:44 +00:00
Antoine Brodin
b768916f91 Add more obsolete files. 2009-12-05 17:46:51 +00:00
Antoine Brodin
4e2d83fc4a Remove trailing ";" in UMA_HASH_INSERT and UMA_HASH_REMOVE macros.
MFC after:	1 month
2009-12-05 17:45:56 +00:00
Pawel Jakub Dawidek
6468cb2ce0 Fix deadlock when ZVOLs are present and we are replacing dead component or
calling scrub when pool is in a degraded state. It will try to taste ZVOLs,
which will lead to deadlock, as ZVOL will try to acquire the same locks as
replace/scrub is holding already.

We can't simply skip provider based on their GEOM class, because ZVOL can have
providers build on top of it and we need to skip those as well.

We do it by asking for ZFS::iszvol attribute. Any ZVOL-based provider will give
us positive answer and we have to skip those providers.

This way we remove possibility to create ZFS pools on top of ZVOLs, but it is
not very useful anyway.

I believe deadlock is still possible in some very complex situations like when
we have MD provider on top of UFS file on top of ZVOL. When we try to replace
dead component in the pool mentioned ZVOL is based on, there might be a
deadlock when ZFS will try to taste MD provider. There is no easy way to detect
that, but it isn't very common.

MFC after:	1 week
2009-12-05 14:33:11 +00:00
Pawel Jakub Dawidek
ccba826977 Always check guid when opening by path, because we may end up with provider
that does have the same name, but only by accident.

MFC after:	1 week
2009-12-05 14:24:22 +00:00
Pawel Jakub Dawidek
29c8c85594 Avoid using additional variable for storing an error if we are not going
to do anything with it.
2009-12-05 14:21:42 +00:00
Shteryana Shopova
1753369083 Make sure enough memory is allocated for a struct pft_entry when
refreshing the list of pf tables.

OKed by:	philip
MFC after:	1 week
2009-12-05 13:45:21 +00:00
Alexander Motin
ff09f97fb4 Do not ignore device interrupt if bus mastering is still active. It is
normal in case of media read error and some ATAPI cases, when transfer size
is unknown beforehand. PCI ATA BM specification tells that in case of such
underrun driver should just manually stop DMA engine. DMA engine should
same time guarantie that all bus mastering transfers completed at the moment
of driver reads interrupt flag asserted.
This change should fix interrupt storms and command timeouts in many cases.

PR:		kern/103602, sparc64/121539, kern/133122, kern/139654
2009-12-05 13:40:51 +00:00
Stefan Farfeleder
023c421a96 Add a missing space to the error message when execvp() failed. 2009-12-05 13:12:04 +00:00
Luigi Rizzo
f573a0a634 adjust comment in previous commit after Julian's explanation 2009-12-05 11:51:32 +00:00
Alexander Motin
00f0143052 On Soft Reset, read device signature from FIS receive area, instead of
PxSIG register. It works better for NVidia chipsets. ahci(4) does the same.

PR:		kern/140472, i386/138668
2009-12-05 10:30:54 +00:00
Luigi Rizzo
bc0d5982e2 remove a dead block of code, document how the ipfw clients are
hooked and the difference in handling the 'enable' variable
for layer2 and layer3. The latter needs fixing once i figure out
how it worked pre-vnet.

MFC after:	7 days
2009-12-05 09:13:06 +00:00
Luigi Rizzo
e99816f1eb fix build with VNET enabled
Reported by: David Wolfskill
2009-12-05 08:32:12 +00:00
Konstantin Belousov
9afcc9986c Regenerate. 2009-12-04 21:53:20 +00:00
Konstantin Belousov
195edf8a5a Add several syscall compat32 entries for acl manipulation.
They do not require translation of the arguments.

Tested by:	bsam
MFC after:	1 week
2009-12-04 21:52:31 +00:00
Alexander Leidinger
7b6bedd3a7 This is v4l support for the linuxulator. This allows to access FreeBSD
native devices which support the v4l API from processes running within
the linuxulator, e.g. skype or flash can access the multimedia/pwcbsd driver.

Not tested is firmware upload, framebuffer stuff and video tuner stuff
due to lack of hardware.
The clipping part (VIDIOCSWIN) needs a little bit of further work (partly
in progress, but can not be tested due to lack of a suitable device).

The submitter tested this sucessfully with Skype and flash apps on amd64 and
i386 with the multimedia/pwcbsd driver.

Submitted by:	J.R. Oldroyd <fbsd@opal.com>
2009-12-04 21:06:54 +00:00
Alexander Leidinger
63f743fb25 Import the unchanged v4l videodev.h from the vendor branch. 2009-12-04 20:46:45 +00:00
Alexander Leidinger
8169e0068c Import the interface description of the video for linux (v4l) subsystem.
The header is importet from linux 2.6.17.

The header does not come with a license, the author
(Alan Cox <alan@redhat.com>) gave his permission to use it (note, X.org
has a copy of the header too):
---snip---
> Alan Cox <alan@redhat.com> said:
>
> > On Tue, Apr 12, 2005 at 03:13:15PM -0700, Julian Elischer wrote:
> > > How does the licensing of the include files stand?
>
> Basically you cannot copyright an interface - its a fact rather
> than creative expression normally.
>
> > > Of course there's always the "type it all in again" approach
> > > where we define a functionally equivalent but completely
> > > differntly spelled API,
>
> Wouldn't even need to be differently spelled.
>
> I'm all for this kind of sharing.
>
> Alan
---snip---

A more complete mail history is provided in the README file.

Approved by:	core
Thanks to:	julian	(he also has the OK to use the v4l2 header)
2009-12-04 20:42:08 +00:00
Hajimu UMEMOTO
2ea64e8ef9 Use INET_ADDRSTRLEN and INET6_ADDRSTRLEN rather than hard
coded number.

Spotted by:	bz
2009-12-04 15:39:37 +00:00
Luigi Rizzo
7139c5c496 fix argument type in the call to expand_number
Submitted by:	gcc 4.3
MFC after:	3 days
2009-12-04 14:18:30 +00:00
Jun Kuriyama
8fbf071375 - In ypproc_all_2_svc(), yp_fork() is called only when !debug case.
So _exit() in the bottom of this function should be called with the
  same case.
2009-12-04 14:12:37 +00:00
Jun Kuriyama
4293e80feb - Replace magic number with YPOLDVERS macro (which may be missed in
r14262).
2009-12-04 14:08:57 +00:00
Poul-Henning Kamp
5a42d563e4 Add disk-magic for amd64: same as i386.
Pass PORTS_OPTS wherever we invoke ports makefiles

Add a logfile where we can see the progress of distfile prefetching
2009-12-04 10:57:01 +00:00
Tom Rhodes
2ce5c85ed0 Add a missing word to a sentence in the return values section. 2009-12-04 09:20:20 +00:00
Andriy Gapon
5e6d0a234e ichsmb: drop default attachment to generic smbus hardware
Attach only to devices known to be supported.
This change overrided and undoes r200053.

Suggested by:	jhb
MFC after:	2 weeks (only to stable/8)
2009-12-04 05:45:46 +00:00
Matt Jacob
a01f5aeb09 Fix cases where we've managed to get a Loop UP event prior to initializing
the loop down counter, as well as other things. This was brought to my
attention with a different fix, more for RELENG_7- this one covers the
multiple channel case.

PR:		140438
MFC after:	1 month
2009-12-04 03:34:12 +00:00
Pyun YongHyeon
d94f2b8506 Add workaround to overcome hardware limitation which allows only a
single outstanding DMA read operation. Most controllers targeted to
client with PCIe bus interface(e.g. BCM5761) may have this
limitation. All controllers for servers does not have this
limitation.
Collapsing mbuf chains to reduce number of memory reads before
transmitting was most effective way to workaround this. I got about
940Mbps from 850Mbps with mbuf collapsing on BCM5761. However it
takes a lot of CPU cycles to collapse mbuf chains so add tunable to
control the number of allowed TX buffers before collapsing. The
default value is 0 which effectively disables the forced collapsing.
For most cases 2 would yield best performance(about 930Mbps)
without much sacrificing CPU cycles.
Note the collapsing is only activated when the controller is on
PCIe bus and the frame does not need TSO operation. TSO does not
seem to suffer from the hardware limitation because the payload
size is much bigger than normal IP datagram.
Thanks to davidch@ who told me the limitation of client controllers
and actually gave possible workarounds to mitigate the limitation.

Reviewed by:	davidch, marius
2009-12-03 23:57:06 +00:00
Andrew Thompson
ce70efd12e Add uhci/ehci controller ids.
Submitted by:	mitya_cabletv.dp.ua
2009-12-03 23:24:12 +00:00
Alexander Motin
891852cc12 Change 'load' balancing mode algorithm:
- Instead of measuring last request execution time for each drive and
choosing one with smallest time, use averaged number of requests, running
on each drive. This information is more accurate and timely. It allows to
distribute load between drives in more even and predictable way.
- For each drive track offset of the last submitted request. If new request
offset matches previous one or close for some drive, prefer that drive.
It allows to significantly speedup simultaneous sequential reads.

PR:		kern/113885
Reviewed by:	sobomax
2009-12-03 21:47:51 +00:00
Ed Schouten
9e9a895ea7 Repair breakage to last-minute API change.
I changed ulog_log{in,out} to return a void, but forgot to change
ulog-helper as well.

Reported by:	stefanf
2009-12-03 21:44:41 +00:00
John Baldwin
eb27d7fb1c Properly return an error reply if an NFS remove or link operation fails.
Previously the failing operation would allocate an mbuf and construct an
error reply, but because the function did not return 0, the NFS server
assumed it had failed to generate a reply and would leak the reply mbuf as
well as not sending the reply to the NFS client.

PR:		kern/140853
Submitted by:	Ted Faber  faber at isi edu (remove)
Reviewed by:	rmacklem (remove)
MFC after:	1 week
2009-12-03 20:59:28 +00:00
Nathan Whitehorn
9fbbaac0bb The first argument of dcbz interprets r0 as a literal zero, not the second.
This worked before by accident.

MFC after:	1 week
2009-12-03 20:55:09 +00:00
Konstantin Belousov
4f17d481ed Remove wrong assertion. Debugee is allowed to lose a signal.
Reported and tested by:	jh
MFC after:	2 weeks
2009-12-03 20:16:59 +00:00
Edward Tomasz Napierala
f32534450f Yet another cosmetic fix. 2009-12-03 20:06:03 +00:00
Edward Tomasz Napierala
1f5dd95b20 Cosmetical fixes. 2009-12-03 20:02:26 +00:00
Edward Tomasz Napierala
91c72a9ad2 Cosmetical fixes. 2009-12-03 19:59:27 +00:00
Gabor Kovesdan
208a6d2eb0 - Update the Spanish NLS catalog
Reviewed by:	carvay,
		the.infamous.paul@gmail.com,
		Joan Picanyol i Puig <lists-freebsd-es@biaix.org>,
		Ing . Marcos Luis Ortiz Valmaseda <mlortiz@uci.cu>,
		eskanete@gmail.com,
		Jose M Rodriguez <josemi@freebsd.jazztel.es>,
		Guillermo Hernandez <guillermo@QuerySoft.es>,
		dani.doni@gmail.com
2009-12-03 19:27:12 +00:00
Edward Tomasz Napierala
639e19ec07 Description of steps required to setup NFSv4 server is in nfsv4(4);
add reference to exports(5), since that's the obvious starting point
for searching for this.
2009-12-03 19:16:40 +00:00
Edward Tomasz Napierala
ff603f2fcc Remove unused code. 2009-12-03 18:16:14 +00:00
Nathan Whitehorn
eaddd81cbf Add manpages for ams(4), akbd(4), adb(4), and cuda(4), which describe
various drivers for Apple Desktop Bus controllers and peripherals.

MFC after:	3 days
2009-12-03 18:13:47 +00:00
Edward Tomasz Napierala
74991298d9 Remove unneeded ifdefs.
Reviewed by:	rmacklem
2009-12-03 18:03:42 +00:00
Roman Divacky
4c0191c569 Connect unzip to the build.
Approved by:	ed (mentor)
Approved by:	des (unzip author)
Tested by:	exp ports build (miwi)
2009-12-03 18:02:55 +00:00
Ed Schouten
178442d07a Use USER_PROCESS instead of LOGIN_PROCESS.
POSIX isn't clear about how the fields should be used, but according to
utmpx(5) on Linux, LOGIN_PROCESS refers to a TTY that's still running a
getty.
2009-12-03 17:05:36 +00:00