Commit Graph

144273 Commits

Author SHA1 Message Date
Ed Schouten
4873b07e2a Properly implement the VT100 SCS sequences in xterm-mode.
Even though VT100-like devices can display non-ASCII characters, they do
not use an 8-bit character set. Special escape sequences allow the VT100
to switch character maps. The special graphics character set stores the
box drawing characters, starting at 0x60, ending at 0x7e. This means
we now pass the character map tests in vttest, even the save/restore
cursor test, combined with character maps. dialog(1) also works a lot
better now.

This commit also includes some other minor fixes:

- Default to 24 lines in teken_demo when using xterm emulation.
- Make white foreground and background work in teken_demo.
2009-01-20 11:34:28 +00:00
Konstantin Belousov
b1a4c8e522 When extending inode size, we call vnode_pager_setsize(), to have a
address space where to put vnode pages, and then call UFS_BALLOC(),
to actually allocate new block and map it. When UFS_BALLOC() returns
error, sometimes we forget to revert the vm object size increase,
allowing for the pages that are not backed by the logical disk blocks.

Revert vnode_pager_setsize() back when UFS_BALLOC() failed, for
ffs_truncate() and ffs_write().

PR:	129956
Reviewed by:	ups
MFC after:	3 weeks
2009-01-20 11:30:22 +00:00
Konstantin Belousov
9316467d05 FFS puts the extended attributes blocks at the negative blocks for the
vnode, from -1 down. When vinvalbuf(vp, V_ALT) is done for the vnode, it
incorrectly does vm_object_page_remove(0, 0), removing all pages from
the underlying vm object, not only the pages that back the extended
attributes data.

Change vinvalbuf() to not remove any pages from the object when
V_NORMAL or V_ALT are specified. Instead, the only in-tree caller
in ffs_inode.c:ffs_truncate() that specifies V_ALT explicitely
removes the corresponding page range. The V_NORMAL caller
does vnode_pager_setsize(vp, 0) immediately after the call to
vinvalbuf(V_NORMAL) already.

Reported by:	csjp
Reviewed by:	ups
MFC after:	3 weeks
2009-01-20 11:27:45 +00:00
Stephen McKay
58c1607e03 Add a limit on namecache entries.
In normal operation, the number of cache entries is roughly equal to the
number of active vnodes.  However, when most of the recently accessed
vnodes have many hard links, the number of cache entries can be 32000
times as large, exhausting kernel memory and provoking a panic in
kmem_malloc().

MFC after: 2 weeks
2009-01-20 04:21:21 +00:00
Maxim Sobolev
e8bbeae7b0 Tone down warning about the quality of the NTFS VFS module. It appears that
not all developers share luigi opinion about quality of sysutils/fusefs-ntfs
compared to our kernel NTFS module.
2009-01-20 02:08:21 +00:00
Nathan Whitehorn
f5a78b2f7e Change the probe priority for PCI and I2C generic bus modules from
numerical constants to BUS_PROBE_GENERIC.

Suggested by:	jhb
2009-01-20 00:05:43 +00:00
Nathan Whitehorn
717b010f87 Provide a device description for macio-attached ATA cells. 2009-01-19 23:25:18 +00:00
Maksim Yevmenkin
90326507bd Properly return error code to the caller. This should fix the following
panic in ng_l2cap(4).

panic: ng_l2cap_l2ca_con_req: ubt0l2cap - could not find connection!

While i'm here get rid of few goto's.

MFC after:	1 week
2009-01-19 22:06:35 +00:00
Andrew Thompson
70e1b678ee Set the pipe pointer before calling usbd_transfer() as its possible for the
xfer callback to be invoked on error.

MFC after:	2 weeks
2009-01-19 21:22:10 +00:00
Alexander Motin
8e097e5b32 Add two more nVidia HDMI codec IDs. 2009-01-19 19:16:50 +00:00
Sam Leffler
917280dfa9 re-enable wi: was accidentally disabled in r1.502 2009-01-19 17:20:09 +00:00
Maxim Sobolev
74f91fb9e2 Mention removal of NTFS from GENERIC/amd64. 2009-01-19 17:00:42 +00:00
Maxim Sobolev
1bea7c61aa Mention the fact that the NTFS kernel support isn't
very well maintained and point user to sysutils/fusefs-ntfs, which
at the time of this writing seems to be a better alternative.

Suggested by:	luigi
MFC after:	2 weeks
2009-01-19 16:19:53 +00:00
Maxim Sobolev
940369b908 In the CAVEATS section mention the fact that the NTFS kernel support isn't
very well maintained and point user to sysutils/fusefs-ntfs, which
at the time of this writing seems to be a better alternative.

Suggested by:	luigi

MFC after:	2 weeks
2009-01-19 15:59:05 +00:00
Maxim Sobolev
9cfe40d9fa Take NTFS option out to match i386 GENERIC.
Suggested by:	phk, luigi
2009-01-19 15:33:06 +00:00
Maxim Sobolev
4d598bc1de asr(4) is not amd64-clean, not amr(4).
Pointy hat to:	myself
Submitted by:	scottl
2009-01-19 08:51:20 +00:00
Maxim Sobolev
69b2984e2e Comment amr(4) out - according to scottl it's not 64-bit clean. 2009-01-19 08:25:41 +00:00
Maxim Sobolev
68ce278eea Whitespace-only: reduce diff to the i386 GENERIC. 2009-01-19 07:18:32 +00:00
Maxim Sobolev
579aaaa4ea Add asr(4) and stge(4) from i386 GENERIC. Both drivers compile on amd64 and
there is no particular reason for them to be i386-only.

MFC after:	2 weeks
2009-01-19 07:10:11 +00:00
David Schultz
f8f571931d - Add support for multibyte decimal_point encodings, e.g., U+066B.
A forthcoming gdtoa import is needed to make this fully work.
- Improve the way "nan(...)" is parsed.
2009-01-19 06:19:51 +00:00
David Schultz
5004a238c3 Add support for multibyte decimal_point encodings, e.g., U+066B. 2009-01-19 06:19:38 +00:00
Pyun YongHyeon
96b774f489 Sometimes RTL8168B seems to take long time to access GMII registers
in device attach phase. Double GMII register access timeout value
to fix the issue.

Reported by:	wkoszek
Tested by:	wkoszek
2009-01-19 02:31:27 +00:00
Andrew Thompson
07707a2428 Also strip the machine arch from SRCDIR in case it is a cross build so
svnversion works.
2009-01-18 23:21:04 +00:00
Alexander Motin
67898a2385 If source mbuf chain consists of only one mbuf, use it directly as source
buffer to avoid extra copying.
2009-01-18 21:09:34 +00:00
Alexander Motin
129c5c814d Teach m_copyback() to use trailing space of the last mbuf in chain. 2009-01-18 20:19:55 +00:00
Alexander Motin
e4651e0595 Use m_unshare()+m_copyback() instead of m_freem()+m_devget() to keep
original mbuf chain headers. It can be less efficient in some cases, but it
looks better then mess of copying headers into the nonempty chain.
2009-01-18 19:25:36 +00:00
Stanislav Sedov
b51ba332bb - Eliminate warnings in debug print macros by explicitly converting all
field to unsigned long.
2009-01-18 15:10:46 +00:00
Stanislav Sedov
e6b6691abb - Whitespace fixes.
- s_bmask field doesn't exist.
- Use correct flags in debug printf.
2009-01-18 14:54:46 +00:00
Stanislav Sedov
291156ecf1 - Obtain inode sizes and location of the first inode based on the contents
of superblock rather than using hardcoded values. This fixes ext2fs on
  filesystems with inode sized other than 128.

Submitted by:	Alex Lyashkov <Alexey.Lyashkov@Sun.COM> (based on)
MFC after:	2 weeks
2009-01-18 14:04:56 +00:00
Marius Strobl
4c67374c75 Adjust the padding of struct pcpu to r187357. 2009-01-18 13:04:38 +00:00
Alexander Motin
aa559f63d1 Remove strict limitation on minimal multilink MRRU. RFC claims that MRRU
of 1500 must be supported, but allows smaller values to be negotiated.
Enforce specified MRRU for outgoing frames.

MFC after:	2 weeks
2009-01-18 12:03:43 +00:00
Alexander Motin
b814ca8a4f Fix regression introduced in rev. 173124:
0.0.0.0/1 is not the same as 0.0.0.0/0.

MFC after:	1 month
2009-01-18 11:38:35 +00:00
Ed Schouten
fcf1ff110a Don't forget to mark the color translation array as const.
Spotted by:	Christoph Mallon <christoph mallon gmx de>
2009-01-18 09:44:33 +00:00
Alan Cox
2dad52b0c5 Correct an error in revision 1.170 of this file. When get_pv_entry() is
forced to reclaim pv entries, the one pv entry that it returns should not
be freed.
2009-01-18 08:00:55 +00:00
Sam Leffler
cbd1844537 remove too noisy DIAGNOSTIC code
Reviewed by:	qingli
2009-01-18 07:20:02 +00:00
Jeff Roberson
932f0fa22e - Add summary information to the title once the file is parsed rather than
printing it to the terminal.  Now only parse errors go to the terminal.
 - Speedup drawing by raising and lowering tags only once everything has
   been drawn.  Surprisingly, it now takes a little longer to parse than
   it does to draw.
 - Parameterize the layout with X_ and Y_ defines that determine the sizes
   of various things.
 - Remove unnecessary tags.
2009-01-18 05:44:31 +00:00
Andrew Thompson
f2476867dc Just put the ifnet pointer first in the softc like it needs to be rather than
adding another deliciously evil pointer.
2009-01-18 05:35:58 +00:00
Jeff Roberson
50d670da08 - Significantly speedup hiding and displaying multiple rows by writing an
optimized single pass function for each.  This reduces the number of
   tkinter calls required to the minimum.
 - Add a right-click context menu for sources.  Supported commands hide
   the source, hide the whole group the source is in, and bring up a stat
   window.
 - Add a source stat frame that gives an event frequency table as well as
   the total duration for each event type that has a duration.  This can
   be used to see, for example, the total time a thread spent running or
   blocked by a wchan or lock.
2009-01-18 04:49:01 +00:00
Giorgos Keramidas
7efe59806b Add support for CMedia CMI120.
PR:		kern/123640
Approved by:	ariff
MFC after:	2 weeks
2009-01-18 04:29:42 +00:00
Ed Schouten
6cecf41bf7 Fix for my previous commit: color mapping is not 1:1.
Cons25 doesn't seem to use a straight 1:1 mapping to the ANSI colors,
but uses the same color numbers as at least used by syscons on i386. I
suspect if you change the definitions on a different architecture,
things may break? Not sure.

Add a small array to convert syscons-style color codes to ANSI
equivalents, which are used by libteken internally. I didn't notice this
bug, because I only tested my code with black, white and green, all of
them shared the same numbers.
2009-01-17 23:01:40 +00:00
Ed Schouten
ec9037a258 Make vidcontrol's color setting work again.
It turns out I forgot to implement two escape sequences that allows the
user to change the default foreground and background colors. I thought
they were implemented by syscons itself, but vidcontrol just generates
some escape sequences, which get interpreted by the terminal emulator.

Reported by:	mgp (forums)
2009-01-17 22:53:53 +00:00
Poul-Henning Kamp
bfe3989e73 Fix typo
Spotted by:	juli
2009-01-17 21:31:47 +00:00
Poul-Henning Kamp
68d566e62e Release the evil twin of nanobsd.sh: sysbuild.sh
quoth the README:

I have been running -current on my laptop since before FreeBSD 2.0 was
released and along the way developed this little trick to making the
task easier.

sysbuild.sh is a way to build a new FreeBSD system on a computer from
a specification, while leaving the current installation intact.

sysbuild.sh assume you have two partitions that can hold your rootfs
and can be booted, and roughly speaking, all it does is build a new
system into the one you don't use, from the one you do use.

A partition named /freebsd is assumed to be part of your layout, and
that is where the sources and ports will be found.

If you know how nanobsd works, you will find a lot of similarity.
2009-01-17 20:30:06 +00:00
David Schultz
a1805f7bb9 When f[w]printf() is called on an unbuffered file like stdout, it
sets up a fake buffered FILE and then effectively calls itself
recursively. Unfortunately, gcc doesn't know how to do tail call
elimination in this case, and actually makes things worse by
inlining __sbprintf(). This means that f[w]printf() to stderr was
allocating about 5k of stack on 64-bit platforms, much of which was
never used.

I've reorganized things to eliminate the waste. In addition to saving
some stack space, this improves performance in my tests by anywhere
from 5% to 17% (depending on the test) when -fstack-protector is
enabled. I found no statistically significant performance difference
when stack protection is turned off. (The tests redirected stderr to
/dev/null.)
2009-01-17 18:57:12 +00:00
Alexander Motin
0f9e2596e2 Convert battery capacity/rate from mA to mW only when summary is requested.
Unconditional conversion causes incorrect rate units reported by acpiconf.

MFC after:	2 weeks
2009-01-17 17:40:44 +00:00
Ed Schouten
83409a55ec Allow experimental libteken features to be tested without changing code.
The teken library already supports UTF-8 handling and xterm emulation,
but we have reasons to disable this right now. Because we should make it
easy and interesting for people to experiment with these features, allow
them to be set in kernel configuration files.

Before this commit we had a flag called `TEKEN_CONS25' to enable
cons25-style emulation. I'm calling it the opposite now, `TEKEN_XTERM',
because we want to enable it in kernel configuration files explicitly.

Requested by:	kib
2009-01-17 16:37:13 +00:00
Ed Schouten
4cb085f361 Fix handling of pts(4) device names in comsat(8). Also catch fork() errors.
Pseudo-terminals allocated with posix_openpt(2) will have more slashes
in their path names than comsat(8) allows, so allow slashes when the
character device name starts with "pts/".

This patch is loosely based on NetBSD's changes, revision 1.33. Because
it also included the changes to fork(), I imported them here as well.
Maybe we could import even more fixes from the other BSD's?

Original commit message from the NetBSD folks:

	PR/30170: Markus W Kilbinger: src/libexec/comsat complains
	about: '/' in "/dev/pts/1"

Reported by:	Robert Huff <roberthuff rcn com>
2009-01-17 15:56:38 +00:00
Bjoern A. Zeeb
12aec2f21a s,unmount 8,umount 8, it is unmount(2) which I did not mean.
Submitted by:	pluknet@gmail.com
MFC after:	1 week
2009-01-17 14:52:26 +00:00
Dag-Erling Smørgrav
3187195884 The FTP_TIMEOUT and HTTP_TIMEOUT environment variables were ignored because
T_secs already had a non-zero default.  Unbreak by moving the default to
ftp_timeout / http_timeout.

Submitted by:	Christoph Mallon <christoph.mallon@gmx.de>
MFC after:	2 weeks
2009-01-17 13:34:56 +00:00
Poul-Henning Kamp
972b3f3056 Bail on ENXIO, you won't get any further any way.
Submitted by:	tobez
2009-01-17 11:57:32 +00:00