Commit Graph

142528 Commits

Author SHA1 Message Date
Bjoern A. Zeeb
a37de8bed9 Make compile without INET.
MFC after:	2 months
2008-11-05 11:43:01 +00:00
Bjoern A. Zeeb
063acb9ac1 Make tun(4) compile without INET.
MFC after:	2 months
2008-11-05 11:39:46 +00:00
Bjoern A. Zeeb
e0de57f9ea Do only define the variable if either INET or INET6 is defined.
To prevent it from compiling without INET and INET6 we should put
an explicit #error in there like we have in other files,
but not rely on an unused variable.

MFC after:	2 months
2008-11-05 11:37:26 +00:00
Dag-Erling Smørgrav
c5eca3d84d Comment out WARNS. There are too many alignment issues in libutil. 2008-11-05 11:06:10 +00:00
Dag-Erling Smørgrav
b67921fc4b Disconnect gr_util.c from the build. It isn't documented or used anywhere
in the tree, and due to unsafe pointer arithmetic, it will most likely crash
on architectures with strict alignment requirements.
2008-11-05 10:45:39 +00:00
Giorgos Keramidas
00935aacf5 Add defaults for /etc/rc.d/gssd
Approved by:	dfr
2008-11-05 10:20:33 +00:00
Giorgos Keramidas
831cbaf1f1 Tiny typo fix and remove 'example' from a "real" manpage. 2008-11-05 09:42:05 +00:00
Maxim Konovalov
69573e862d o One more s/gpt/gpart/. 2008-11-05 09:28:30 +00:00
Maxim Konovalov
7922d6f987 o Replace Xr to gpt(8) which is gone by gpart(8). 2008-11-05 09:27:13 +00:00
Tim Kientzle
025b20f6e5 When comparing, cast to the larger size, off_t in this case.
Once we know which one is smaller, then we cast to the smaller size.

Thanks to Xin Li (delphij@)
Pointy hat: /me
2008-11-05 06:40:53 +00:00
Tim Kientzle
f4e24c4e7a Fix compile warnings building on amd64. This is modified slightly
from Jaakko's original patch: I have misgivings about the portability
of the 'z' printf modifier so opted to cast the arguments to (int)
instead.

PR:		bin/128561
Submitted by:	Jaakko Heinonen
MFC after:	30 days
2008-11-05 05:26:11 +00:00
David Xu
7b4a950a7d Revert rev 184216 and 184199, due to the way the thread_lock works,
it may cause a lockup.

Noticed by: peter, jhb
2008-11-05 03:01:23 +00:00
Xin LI
cef3930d7c Correct a typo that prevented my laptop from starting
devd.
2008-11-04 23:03:36 +00:00
John Baldwin
927edcc9ba Use shared vnode locks for auditing vnode arguments as auditing only
does a VOP_GETATTR() which does not require an exclusive lock.

Reviewed by:	csjp, rwatson
2008-11-04 22:31:04 +00:00
John Baldwin
16da60664d Don't lock the vnode around calls to vn_fullpath().
Reviewed by:	csjp, rwatson
2008-11-04 22:30:24 +00:00
Rink Springer
203b82c842 Even though the previous commit was functionally equivalent with the code it replaced, it was wrong: le16toh should have been used.
Note that these changes will not make the driver work on powerpc, but it should fix at least the i386/amd64 cases.

Obtained from:	//depot/projects/usb/src/sys/dev/usb2/wlan/if_zyd2.c#20
Noticed by:	jeli, ed
2008-11-04 20:57:39 +00:00
Rink Springer
9fbaa8e74d Fix the build (on at least powerpc) by moving the htole16() from the case(x) expression directly to the switch(x) itself.
Reviewed by:	imp@
2008-11-04 19:28:19 +00:00
Max Laier
0551897af2 Declare functions and variables static and save a few byte. This is a
style(9)-change, too.  Separate commit as it changes the object.
2008-11-04 19:23:48 +00:00
Remko Lodder
07d214248b Add Rene Ladan, as well as my relationship towards Rene. 2008-11-04 19:20:19 +00:00
Max Laier
40850176c9 style(9): mostly avoiding line wrap by not indenting cases. No obj change. 2008-11-04 19:17:32 +00:00
John Baldwin
0caf1ab15a Don't bother calling setrunnable() and clearing the sleeping flag in
sleepq_resume_thread() if the thread isn't asleep.
2008-11-04 19:13:53 +00:00
John Baldwin
2ff47c5f18 Remove unnecessary locking around vn_fullpath(). The vnode lock for the
vnode in question does not need to be held.  All the data structures used
during the name lookup are protected by the global name cache lock.
Instead, the caller merely needs to ensure a reference is held on the
vnode (such as vhold()) to keep it from being freed.

In the case of procfs' <pid>/file entry, grab the process lock while we
gain a new reference (via vhold()) on p_textvp to fully close races with
execve(2).

For the kern.proc.vmmap sysctl handler, use a shared vnode lock around
the call to VOP_GETATTR() rather than an exclusive lock.

MFC after:	1 month
2008-11-04 19:04:01 +00:00
John Baldwin
2ef42c06d6 Quiet a WITNESS warning with the dirhash sx locks by setting the DUPOK
flag.  Specifically, if two threads race to create a dirhash for a
directory, then one might already have created a private dirhash
structure (and locked it) when it realizes the directory now has a
structure and tries to lock that one.
2008-11-04 18:56:12 +00:00
John Baldwin
7265164f53 Don't pass WANTPARENT to the pathname lookup of the mount point for a
unionfs mount just so we can immediately drop the reference on the parent
directory vnode without using it.
2008-11-04 18:54:44 +00:00
John Baldwin
b1b3a8653d Don't leak a reference on the /compat/linux vnode everytime
the linprocfs 'mtab' file is read.

MFC after:	1 month
2008-11-04 18:53:33 +00:00
Giorgos Keramidas
e9d8f84b73 Fix comment typo that managed to sneak in when I copy pasted some
comments & code from iostat.
2008-11-04 18:20:54 +00:00
Giorgos Keramidas
4fb6032f19 Repeat vmstat header after window.rows instead of a hardcoded 20.
Use ioctl() to get the window size in vmstat(8), and force a new
header to be prepended to the output every time the current window
size changes.  Change the number of lines before each header to the
current lines of the terminal when the terminal is resized, so that
the full terminal length can be used for output lines.

Inspired by:	svn change 175562 (same feature for iostat)
Reviewed by:	ru (who fixed some of my bugs too)
MFC after:	1 week
2008-11-04 18:02:35 +00:00
Doug Rabson
a720ad3450 Include <sys/eventhandler.h>. 2008-11-04 16:43:02 +00:00
Dag-Erling Smørgrav
3ebc694460 Whitespace and style fixes, build at WARNS level 6.
MFC after:	3 weeks
2008-11-04 14:17:49 +00:00
Dag-Erling Smørgrav
5e1a74e82f libutil now builds at WARNS level 6.
MFC after:	3 weeks
2008-11-04 13:51:15 +00:00
Dag-Erling Smørgrav
b4d2cfd941 Add missing header. 2008-11-04 13:50:50 +00:00
Dag-Erling Smørgrav
b8a5cd86e3 Avoid assigning a const char * to a char *.
MFC after:	3 weeks
2008-11-04 13:49:53 +00:00
Edward Tomasz Napierala
4a4f18ed37 In UFS, when reading EA that contains ACL fails for some reason, include
inode number and filesystem name, so the administrator can fix the problem.

Approved by:	rwatson (mentor)
2008-11-04 12:30:31 +00:00
Rui Paulo
31fb990621 Add support for Asus A8Sr notebooks.
PR:		128553
Submitted by:	Eygene Ryabinkin <rea-fbsd at codelabs.ru>
Reviewed by:	philip
MFC after:	2 months
2008-11-04 11:52:50 +00:00
Ed Schouten
394e94079c Remove redundant return value tests.
There is no need to test whether the return value is non-zero here. Just
return the error number directly.
2008-11-04 10:58:02 +00:00
Alfred Perlstein
c63c25015a add usb2_if.m to mfiles to unbreak build of modules. 2008-11-04 03:42:01 +00:00
Alfred Perlstein
eabe30fc9c Bring in USB4BSD, Hans Petter Selasky rework of the USB stack
that includes significant features and SMP safety.

This commit includes a more or less complete rewrite of the *BSD USB
stack, including Host Controller and Device Controller drivers and
updating all existing USB drivers to use the new USB API:

1) A brief feature list:

  - A new and mutex enabled USB API.

  - Many USB drivers are now running Giant free.

  - Linux USB kernel compatibility layer.

  - New UGEN backend and libusb library, finally solves the "driver
    unloading" problem. The new BSD licensed libusb20 library is fully
    compatible with libusb-0.1.12 from sourceforge.

  - New "usbconfig" utility, for easy configuration of USB.

  - Full support for Split transactions, which means you can use your
    full speed USB audio device on a high speed USB HUB.

  - Full support for HS ISOC transactions, which makes writing drivers
    for various HS webcams possible, for example.

  - Full support for USB on embedded platforms, mostly cache flushing
    and buffer invalidating stuff.

  - Safer parsing of USB descriptors.

  - Autodetect of annoying USB install disks.

  - Support for USB device side mode, also called USB gadget mode,
    using the same API like the USB host side. In other words the new
    USB stack is symmetric with regard to host and device side.

  - Support for USB transfers like I/O vectors, means more throughput
    and less interrupts.

  - ... see the FreeBSD quarterly status reports under "USB project"

2) To enable the driver in the default kernel build:

2.a) Remove all existing USB device options from your kernel config
file.

2.b) Add the following USB device options to your kernel configuration
file:

# USB core support
device          usb2_core

# USB controller support
device		usb2_controller
device		usb2_controller_ehci
device		usb2_controller_ohci
device		usb2_controller_uhci

# USB mass storage support
device		usb2_storage
device		usb2_storage_mass

# USB ethernet support, requires miibus
device		usb2_ethernet
device		usb2_ethernet_aue
device		usb2_ethernet_axe
device		usb2_ethernet_cdce
device		usb2_ethernet_cue
device		usb2_ethernet_kue
device		usb2_ethernet_rue
device		usb2_ethernet_dav

# USB wireless LAN support
device		usb2_wlan
device		usb2_wlan_rum
device		usb2_wlan_ral
device		usb2_wlan_zyd

# USB serial device support
device		usb2_serial
device		usb2_serial_ark
device		usb2_serial_bsa
device		usb2_serial_bser
device		usb2_serial_chcom
device		usb2_serial_cycom
device		usb2_serial_foma
device		usb2_serial_ftdi
device		usb2_serial_gensa
device		usb2_serial_ipaq
device		usb2_serial_lpt
device		usb2_serial_mct
device		usb2_serial_modem
device		usb2_serial_moscom
device		usb2_serial_plcom
device		usb2_serial_visor
device		usb2_serial_vscom

# USB bluetooth support
device		usb2_bluetooth
device		usb2_bluetooth_ng

# USB input device support
device		usb2_input
device		usb2_input_hid
device		usb2_input_kbd
device		usb2_input_ms

# USB sound and MIDI device support
device		usb2_sound

2) To enable the driver at runtime:

2.a) Unload all existing USB modules. If USB is compiled into the
kernel then you might have to build a new kernel.

2.b) Load the "usb2_xxx.ko" modules under /boot/kernel having the same
base name like the kernel device option.

Submitted by: Hans Petter Selasky hselasky at c2i dot net
Reviewed by: imp, alfred
2008-11-04 02:31:03 +00:00
Warner Losh
68b2399298 Replace the non-standard disclaimer with the standard one from /COPYRIGHT
Approved by:	jedgar@
2008-11-04 00:20:43 +00:00
Warner Losh
09988d1e9a Use more standardized license language
Approved by:	Thomas Quinot
2008-11-03 22:43:37 +00:00
Nick Hibma
92ad2cd779 Bugfix: Cut&paste error from the NetBSD code.
Also: Change the initialisation of the command string to a static
initialiser. Verify it against the output of umass.c when being sent a
command using 'camcontrol eject da0' to a Bulk-Only device.

This should make those devices work that need a SCSI eject command to
switch to modem mode (Novatel 950D and others).
2008-11-03 22:09:27 +00:00
Nick Hibma
bcde061b22 uaa->ifaces contains pointers so set its entry to NULL not 0. 2008-11-03 22:05:44 +00:00
Jason Evans
b74d3e0c37 Revert to preferring mmap(2) over sbrk(2) when mapping memory, due to
potential extreme contention in the kernel for multi-threaded applications
on SMP systems.

Reported by:	kris
2008-11-03 21:17:18 +00:00
John Baldwin
4482f952b1 Adjust the license statement to more closely match a standard 3-clause BSD
license.

MFC after:	3 days
2008-11-03 21:17:02 +00:00
John Baldwin
21fc02d271 Use shared vnode locks instead of exclusive vnode locks for the access(),
chdir(), chroot(), eaccess(), fpathconf(), fstat(), fstatfs(), lseek()
(when figuring out the current size of the file in the SEEK_END case),
pathconf(), readlink(), and statfs() system calls.

Submitted by:	ups (mostly)
Tested by:	pho
MFC after:	1 month
2008-11-03 20:31:00 +00:00
Attilio Rao
30f60d8c31 Remove the mnt_holdcnt and mnt_holdcntwaiters because they are useless.
Really, the concept of holdcnt in the struct mount is rappresented by
the mnt_ref (which prevents the type-stable structure from being
"recycled) handled through vfs_ref() and vfs_rel().
On this optic, switch the holdcnt acquisition into an emulated vfs_ref()
(and subsequent release into vfs_rel()).

Discussed with:	kib
Tested by:	pho
2008-11-03 20:00:35 +00:00
John Baldwin
c439bdd86f Remove some unused and broken code that attempted to not invoke locking
asserts on NULL vnode pointers.  All the vnode assertion routines already
check for NULL vnode pointers.
2008-11-03 19:57:40 +00:00
John Baldwin
0f54f8c2b3 A few style nits. 2008-11-03 19:33:20 +00:00
Alexander Motin
9325b9b23b Remove " + 1".
Thread ID can't be zero anyway while increment may give owerflow.
2008-11-03 18:28:12 +00:00
Edward Tomasz Napierala
ea49f15447 Fix few missed accmode changes in coda.
Approved by:	rwatson (mentor)
2008-11-03 16:36:23 +00:00
Warner Losh
8481e37b53 Nit: Add a few leading zeros to make this match other mask constants
in this file.  Also to make sure that I got other ASI constants right.
2008-11-03 15:38:45 +00:00