Commit graph

117827 commits

Author SHA1 Message Date
Takanori Watanabe 68a94b0d91 Oops, I forget to add item in files .
Pointed out by: pjd
2005-08-26 12:48:34 +00:00
Takanori Watanabe cf5a7ef8d1 Update Document. 2005-08-26 11:39:38 +00:00
Takanori Watanabe 7ba4d2eaeb Add NTFS labeling function.
Reviewed by:pjd
2005-08-26 11:35:10 +00:00
Dag-Erling Smørgrav d09dfa2bfd Two minor optimizations of fdalloc():
- if minfd < fd_freefile (as is most often the case, since minfd is
   usually 0), set it to fd_freefile.

 - remove a call to fd_first_free() which duplicates work already done
   by fdused().

This change results in a small but measurable speedup for processes
with large numbers (several thousands) of open files.

PR:		kern/85176
Submitted by:	Divacky Roman <xdivac02@stud.fit.vutbr.cz>
MFC after:	3 weeks
2005-08-26 11:16:39 +00:00
Tim J. Robbins 1d5cfebaca Fix a one byte off error which causes "less" to crash if you view a
large file, jump to the end, scroll backwards with "b" and try to search
backwards afterwards.

Submitted by:	Matthias Scheler
2005-08-26 10:05:59 +00:00
Paul Saab 13829828e7 Unbreak tail -f on non-local filesystems. 2005-08-26 08:15:57 +00:00
Alan Cox 8c190069a2 Remedy the following three problems:
1. The amd64 pmap, unlike the i386 pmap, maintains a reference count
   for each page directory (PD) page.  However, in the transformation
   of the i386 pmap into the amd64 pmap, operations, such as
   pmap_copy() and pmap_object_init_pt(), that create 2MB "superpage"
   mappings by setting the PG_PS bit in a PD entry were not modified
   to adjust the underlying PD page's reference count.  Consequently,
   superpage mappings could disappear prematurely.

2. pmap_object_init_pt() could crash or corrupt memory if either the
   virtual address range being mapped crosses a 1GB boundary in the
   virtual address space or nothing is mapped in the 1GB area.

3. When pmap_allocpte() destroys a 2MB "superpage" mapping it does not
   reduce the pmap's resident count accordingly.  It should.  (This
   bug is inherited from i386.)

Discussed with: peter
Reviewed by:    tegge
2005-08-26 05:18:46 +00:00
Brooks Davis 815e43db38 Support ifconfig_<ifn> variables containing quoted variables with spaces
in them by wrapping the ifconfig command with eval "...".

For example, this allows:

ifconfig_iwi0="DHCP ssid 'foo bar baz'"
2005-08-26 04:06:17 +00:00
Alexander Kabaev 83582626ad Unbreak compiles with ACPI_DEBUG. 2005-08-26 02:21:02 +00:00
Brooks Davis 753d6c0327 In read_string(), when the last character was a backslash, unincrement
the output index instead of keeping what ever trash was in the buffer.

Reported by:	iedowse
2005-08-26 01:25:59 +00:00
Brooks Davis 6ae27cb6ce Use a more robust, grep-free command to get the interface of the current
default route.

Submitted by:	Rostislav Krasny <rosti dot bsd at gmail dot com>
2005-08-26 01:07:51 +00:00
Brooks Davis 7e82455ea8 Don't and/remove a route to our assigned IP through 127.0.0.1. It
serves no apparent purpose (we commented this out ages ago in the ISC
scripts) and cases problems with some ADSL setups.

Reported by:	Rostislav Krasny <rosti dot bsd at gmail dot com>
2005-08-26 01:02:38 +00:00
Paul Saab 8910aa92ae For FreeBSD 4 binaries, when trying to read from a device that does
not exsist, do not have ioctl return an error, but instead set -1
in the data returned to the user.  This allows the HP bios flash
utilities to work without requiring changes to their code.

Reviewed by:	jhb
2005-08-26 01:00:19 +00:00
Warner Losh 89b9c5360e Clarify the confusion over Farallon cards taht differ only by arrow color 2005-08-25 23:11:10 +00:00
John Baldwin 4faaaed479 - Remove non-bus-dma code.
- Remove form feed characters.
- Fixup style of function declarations.
- Assume that an mbuf cluster is big enough to hold an ethernet frame.
  (This should really be using m_defrag(), but this diff is just simple
  changes for now.)
2005-08-25 21:06:56 +00:00
Stephan Uphoff 0e7bd54c71 NMI handler should not enable interrupts.
Tested by: kris@
MFC after:	3 weeks
2005-08-25 20:33:43 +00:00
Pawel Jakub Dawidek b94557c2aa Add regression tests for '-L' option. 2005-08-25 20:13:58 +00:00
John Baldwin f8190d8dc8 Major rototill of this driver to add FreeBSD bus-dma support:
- Allocate arrays of metadata for the descriptors in the rx and tx rings
  and change the ring pointers to walk the metadata array rather than the
  actual descriptor rings.  Each metadata object contains a pointer to its
  descriptor, a pointer to any associated mbuf, and a pointer to the
  associated bus_dmamap_t in the bus_dma case.  The mbuf pointers replace
  the tulip_txq and tulip_rxq local ifqueue's in the softc.
- Add lots of KTR trace entries using a local KTR_TULIP level which
  defaults to 0, but can be changed to KTR_DEV at the top of the file
  when debugging.
- Rename tulip_init(), tulip_start(), tulip_ifinit(), and tulip_ifstart()
  to tulip_init_locked(), tulip_start_locked(), tulip_init(), and
  tulip_start(), respectively, to match the convention in other drivers.
- Add a TULIP_SP_MAC() macro to encode two bytes of the MAC address into
  the setup buffer and use that in place of lots of BYTE_ORDER #ifdef's.
  Also, remove an incorrect XXX comment I added earlier, the driver was
  correct (at least it does the same thing dc(4) does).  TULIP_SP_MAC
  was shamelessly copied from DC_SP_MAC() in dc(4).
- Remove the #ifdef'd NetBSD bus-dma code and replace it with FreeBSD
  bus-dma code that not only compiles but even works at runtime.
- Use callout_init_mtx() instead of just callout_init().
- Correct the various wrapper macros for bus_dmamap_sync() for the rx
  and tx buffers to only ask for the sync ops that they actually need.
- Tidy the #ifdef TULIP_COPY_RXDATA code by expanding an #ifdef a bit
  so it becomes easier to read at the expense of a couple of duplicated
  lines of code.  Also, use m_getcl() to get an mbuf cluster rather than
  MGETHDR() followed by MCLGET().
- Maintain the ring free (ri_free) count for the rx ring metadata since
  we no longer have tulip_rxq.ifq_len around to indicate how many mbuf's
  are currently in the rx ring.
- Add code to teardown bus_dma resources when attach fails and generally
  fixup attach to do a better job of cleaning up when it fails.  This
  gets us a good bit closer to possibly having a detach method someday
  and making this driver an unloadable module.
- Add some functions that can be called from ddb to dump the state of
  a descriptor ring and to dump the state of an individual descriptor.
- Various comment grammer and spelling fixes.

I have bus-dma turned on by default, but I've left the non-bus-dma code
around so that it can be turned off to aid in debugging should any problems
turn up later on.  I'll be removing the non-bus-dma code in a subsequent
commit.
2005-08-25 20:12:43 +00:00
Pawel Jakub Dawidek 02a76f3fd7 '-F' option behaviour was reverted, so revert previous commit. 2005-08-25 20:11:39 +00:00
Pawel Jakub Dawidek 70ffddc463 Revert previous behaviour of '-F' option and add '-L' option, which will
tell pkill(1)/pgrep(1) to try to flock(2) pidfile before reading PID from
there.

Discussed with:	jhb, gad
2005-08-25 20:10:47 +00:00
Andre Oppermann b0bd2fdbab Bump __FreeBSD_version for memmem(3). 2005-08-25 19:49:53 +00:00
Andre Oppermann da506dcad2 Appropriate namespace protection for memmem(3).
Submitted by:	wollman
MFC after:	3 days
2005-08-25 19:46:38 +00:00
Andre Oppermann 6050c8fe05 Add the function memmem(3) as found in glibc and others.
It is the binary equivalent to strstr(3).

 void *memmem(const void *big, size_t big_len,
	const void *little, size_t little_len);

Submitted by:	Pascal Gloor <pascal.gloor at spale.com>
MFC after:	3 days
2005-08-25 18:26:58 +00:00
Maksim Yevmenkin 7a481a4f28 Add myself as a maintainer of Bluetooth code 2005-08-25 17:14:39 +00:00
Colin Percival a2c16fbcd0 Fix a bug introduced in revision 1.9 which causes chkgrp to coredump on
certain corrupt files.

Submitted by:	liamfoy@dragonflybsd.org
Reported by:	Nikolay Kalev, via freebsd-current
MFC after:	3 days
2005-08-25 17:01:06 +00:00
Maksim Yevmenkin f41317de66 Make sure ng_fec_init() uses the same calling convention as the rest of
the code, i.e. ng_fec_init() is called with the ifp->if_softc pointer and
NOT with the ifp pointer.

PR:		kern/85239
Reviewed by:	brooks
MFC after:	1 day
2005-08-25 17:00:02 +00:00
Søren Schmidt 071e98cbeb Dont set default mode to ATA_DMA_MAX on devices not capable of DMA. 2005-08-25 15:45:03 +00:00
Ollivier Robert 2fa9dad0ef Fixes for gcc 4.x.
PR:             bin/84995
Submitted by:   Divacky Roman <xdivac02@stud.fit.vutbr.cz>
2005-08-25 14:09:35 +00:00
Gleb Smirnoff 360856f60e - Refuse hashsize of 0, since it is invalid.
- Use defined constant instead of 512.
2005-08-25 13:57:00 +00:00
Gleb Smirnoff 88cd456676 Remove all references to T/TCP, which was removed several months ago.
Approved by:	andre
2005-08-25 13:47:41 +00:00
Ollivier Robert 8a0a76b862 Fixes for gcc4.x.
Submitted by:   Divacky Roman <xdivac02@stud.fit.vutbr.cz>
PR:             bin/84991
2005-08-25 13:44:02 +00:00
Robert Watson 7e994955ac De-spl parts of the routing socket code now generally protected
through locking; leave some spl references around code where there
are open questions about global variable references.  Also, add
an XXX regarding locking in sysctl.

MFC after:	3 days
2005-08-25 13:30:04 +00:00
Gleb Smirnoff 510b360fc0 When we have a published ARP entry for some IP address, do reply on
ARP requests only on the network where this IP address belong, to.

Before this change we did replied on all interfaces. This could
lead to an IP address conflict with host we are doing ARP proxy
for.

PR:		kern/75634
Reviewed by:	andre
2005-08-25 13:25:57 +00:00
Hajimu UMEMOTO b3130703e6 get current temperature from _TMP during passive cooling is active.
it makes CPU freq transition smooth.
2005-08-25 11:31:30 +00:00
Hajimu UMEMOTO 9b96aa9ad7 initialize only ACPI_BUFFER to avoid race condition with passive
cooling thread which refers psv, tc1, tc2 and tsp.  The previous
code made the period where sc->tz_zone.tsp was zero, and it caused
panic at msleep().

Reported by:	keramida
Tested by:	keramida
2005-08-25 10:50:36 +00:00
Tom Rhodes 849aee62b2 Hook getino.3 up to the build and link it to putino.3.
PR:	83820
2005-08-25 10:22:29 +00:00
Gleb Smirnoff d7f56eabab Backout revision 1.54, because it exposes a worse problem, than
it fixes. I believe the problem lives somewhere outside ng_ksocket,
but until it is found, let the node be working.

PR:		kern/84952
PR:		kern/82413
MFC after:	3 days
2005-08-25 07:21:15 +00:00
Don Lewis 4053cae340 Track all lock relationships instead of pruning direct relationships
if an indirect relationship exists (keep both A->B->C and A->C).
This allows witness_checkorder() to use isitmychild() instead of
the much more expensive isitmydescendant() to check for valid lock
ordering.

Don't do an expensive tree walk to update the w_level values when
the tree is updated.  Only update the w_level values when using the
debugger to display the tree.

Nuke the experimental "witness_watch > 1" mode that only compared
w_level for the two locks.  This information is no longer maintained
at run time, and the use of isitmychild() in witness_checkorder
should bring performance close enough to the acceptable level that
this hack is not needed.

Report witness data structure allocation statistics under the
debug.witness sysctl.

Reviewed by:	jhb
MFC after:	30 days
2005-08-25 03:47:37 +00:00
John Baldwin 00d101cf1f - Remove redundant assertions that the driver lock is not held in attach()
and detach() since mtx_lock() will assert that already since the driver
  lock is not recursive.
- Move the call to callout_init_mtx() before hme_stop() so that the
  callout_stop() in hme_stop() doesn't operate on an uninitialized callout
  structure during attach.

Reported by:	yongari (2)
MFC after:	3 days
2005-08-24 20:28:56 +00:00
Pawel Jakub Dawidek a9ed1f7ffc Test last minute changes, as gcc isn't too smart.
Reported by:	Steve Kargl <sgk@troutmask.apl.washington.edu>
2005-08-24 19:42:40 +00:00
Pawel Jakub Dawidek dfe47d36df '-F' option now needs locked pidfile. Modify regression tests respectively. 2005-08-24 19:39:29 +00:00
Pawel Jakub Dawidek 712bf6af16 Modify '-F' option to work nicely with pidfile(3) - a pidfile given as
an argument has to be locked.
2005-08-24 19:38:28 +00:00
Pawel Jakub Dawidek 0ea90af02e Use pidfile(3) in watchdogd(8). 2005-08-24 19:28:33 +00:00
Pawel Jakub Dawidek a032b226c8 Use pidfile(3) in mountd(8). There is no need to use /var/run/mountd.lock
anymore.
2005-08-24 19:17:06 +00:00
Pawel Jakub Dawidek f670195163 Use pidfile(3) in inetd(8). 2005-08-24 19:04:21 +00:00
Pawel Jakub Dawidek 78735592f5 Use pidfile(3) in cron(8).
Note, that when cron(8) cannot create pidfile, it'll exit. I didn't
changed this behaviour, but its better to ignore errors other than
EEXIST, so daemon can be started on systems where /var/ file system
doesn't support locking (like NFS without rpc.lockd(8)).
2005-08-24 17:51:36 +00:00
Wilko Bulte 73dcba4b4b About life 2005-08-24 17:45:09 +00:00
Pawel Jakub Dawidek 84148fd1da Add '-P' option which allows to specify pidfile. 2005-08-24 17:32:41 +00:00
Pawel Jakub Dawidek a80d5fc227 Use pidfile(3) in moused(8). 2005-08-24 17:27:06 +00:00
Pawel Jakub Dawidek fa39391686 Use pidfile(3) in syslogd(8). 2005-08-24 17:26:26 +00:00