]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/log
FreeBSD/FreeBSD.git
14 years agoPull up vendor changes. The following local changes made obsolete:
Ruslan Ermilov [Fri, 15 Jan 2010 13:59:50 +0000 (13:59 +0000)]
Pull up vendor changes.  The following local changes made obsolete:

- Addition of several FreeBSD versions.
- r192561 that attempted to fix UTF-8 issues.

14 years agoCherry-pick some vendor changes to mdoc and man macro packages.
Ruslan Ermilov [Fri, 15 Jan 2010 13:48:29 +0000 (13:48 +0000)]
Cherry-pick some vendor changes to mdoc and man macro packages.
(They were all made before Groff switched from GPLv2 to GPLv3,
though the mdoc macro packages is not affected by the switch.)

: 2007-11-10  Michail Vidiassov  <master@iaas.msu.ru>
:
:         * tmac/doc-syms (doc-str-St--susv3): New string.
:         * tmac/groff_mdoc.man: Document it.
:
: 2008-09-06  Werner LEMBERG  <wl@gnu.org>
:
:         * tmac/doc-common (Dd, Os, Dt): Reset `doc-command-name' to make
:         `.Nm' work properly if next manual page is printed.
:
: 2008-10-04  Werner LEMBERG  <wl@gnu.org>
:
:         * tmac/doc-common (doc-operating-system-*): Update releases.
:
:         * tmac/groff_mdoc.man: Document it.
:
: 2008-10-13  Werner LEMBERG  <wl@gnu.org>
:
:         * tmac/groff_mdoc.man: Update documentation on BSD-like OS string
:         versions.
:
: 2008-10-16  Werner LEMBERG  <wl@gnu.org>
:
:         * tmac/doc-common (doc-operating-system-*), tmac/groff_mdoc.man: Add
:         NetBSD 4.0.1.
:
: 2008-11-05  Werner LEMBERG  <wl@gnu.org>
:
:         * tmac/doc-common (Dt): Start a new page if necessary and set up
:         headers.
:
: 2008-12-24  Michail Vidiassov  <master@iaas.msu.ru>
:
:         * tmac/doc-common: Add entries for Mac OS X and FreeBSD.
:
: 2009-01-02  Werner LEMBERG  <wl@gnu.org>
:
:         * tmac/groff_mdoc.man: Update OS version string listing.
:
: 2009-01-03  Werner LEMBERG  <wl@gnu.org>
:
:         * tmac/an-old.tmac, tmac/doc.tmac: For -Tutf8, map \-, -, ', and `
:         conservatively to ASCII for the sake of easy cut and paste.

14 years agoDo not free the dmamap if it is still busy.
Olivier Houchard [Fri, 15 Jan 2010 12:39:48 +0000 (12:39 +0000)]
Do not free the dmamap if it is still busy.

Submitted by: Mark Tinguely
MFC after: 3 days

14 years agoFlatten out vendor tree.
Ruslan Ermilov [Fri, 15 Jan 2010 12:01:25 +0000 (12:01 +0000)]
Flatten out vendor tree.

14 years agoOnly allocate the space we need before calling kern_getgroups instead
Brooks Davis [Fri, 15 Jan 2010 07:18:46 +0000 (07:18 +0000)]
Only allocate the space we need before calling kern_getgroups instead
of allocating what ever the user asks for up to "ngroups_max + 1".  On
systems with large values of kern.ngroups this will be more efficient.

The now redundant check that the array is large enough in
kern_getgroups() is deliberate to allow this change to be merged to
stable/8 without breaking potential third party consumers of the API.

Reported by: bde
MFC after: 28 days

14 years agoSince all other comparisons involving ngroups_max use
Brooks Davis [Fri, 15 Jan 2010 07:05:00 +0000 (07:05 +0000)]
Since all other comparisons involving ngroups_max use
"ngroups_max + 1", use ">= ngroups_max+1" instead of the equivalent
"> ngroups_max" to reduce confusion.

14 years agoOops, deleted one line too many. Add back the null case for IGNORE_MOTD
Doug Barton [Fri, 15 Jan 2010 04:09:22 +0000 (04:09 +0000)]
Oops, deleted one line too many. Add back the null case for IGNORE_MOTD

14 years agoNow that we've officially arrived at FreeBSD 9, remove the IGNORE_MOTD
Doug Barton [Fri, 15 Jan 2010 03:56:48 +0000 (03:56 +0000)]
Now that we've officially arrived at FreeBSD 9, remove the IGNORE_MOTD
compat shim as advertised. This change should not be MFC'ed.

14 years agoAlso call sem_module_init in sem_close to initialize mutex
David Xu [Fri, 15 Jan 2010 01:19:58 +0000 (01:19 +0000)]
Also call sem_module_init in sem_close to initialize mutex
with some attributes.

14 years agoIn 'make delete-old', use 'exec' to redirect an fd persistently.
Jilles Tjoelker [Thu, 14 Jan 2010 23:27:23 +0000 (23:27 +0000)]
In 'make delete-old', use 'exec' to redirect an fd persistently.

That is, write 'exec 3<&0' instead of '3<&0'. Due to an sh(1) bug fixed in
r199953, the latter also persisted, provided that fd 3 was not open before.
With newer sh or fd 3 open, it would not delete orphaned catpages.

MFC after: 2 weeks

14 years agoAdd manpages for ipwfw(4) and iwifw(4), based on iwnfw(4).
Christian Brueffer [Thu, 14 Jan 2010 22:21:43 +0000 (22:21 +0000)]
Add manpages for ipwfw(4) and iwifw(4), based on iwnfw(4).

MFC after: 2 weeks

14 years agoFix a typo: accouting -> accounting.
Ed Schouten [Thu, 14 Jan 2010 22:21:20 +0000 (22:21 +0000)]
Fix a typo: accouting -> accounting.

14 years agoFix a few whitespace issues and comment typos that I found while reading
Joel Dahl [Thu, 14 Jan 2010 22:04:08 +0000 (22:04 +0000)]
Fix a few whitespace issues and comment typos that I found while reading
through this file.

14 years agoAdd wtmpcvt(1).
Ed Schouten [Thu, 14 Jan 2010 20:58:45 +0000 (20:58 +0000)]
Add wtmpcvt(1).

This utility allows users to convert their wtmp databases to the new
format. It makes no sense for users to keep their wtmp log files if they
are unable to view them.

It basically copies ut_line into ut_id as well. This makes it possible
for last(1) and ac(8) to match login records with their corresponding
logout record.

14 years agoFix bugs introduced in previous commit: off-by-one in add_meshconf() and
Rui Paulo [Thu, 14 Jan 2010 19:23:41 +0000 (19:23 +0000)]
Fix bugs introduced in previous commit: off-by-one in add_meshconf() and
big-endian bug on verify_meshconf()

14 years agoAdd check for fiber mode for BCM5714 PHY. This PHY supports both
Pyun YongHyeon [Thu, 14 Jan 2010 19:14:24 +0000 (19:14 +0000)]
Add check for fiber mode for BCM5714 PHY. This PHY supports both
copper and fiber interfaces over GMII so an explicit check is
necessary to know whether it was configured for fiber interface.
This change make BCM5715S work.

Tested by: olli
MFC after: 1 week

14 years agoFor controllers that has dual mode PHY(copper or fiber) interfaces
Pyun YongHyeon [Thu, 14 Jan 2010 19:08:43 +0000 (19:08 +0000)]
For controllers that has dual mode PHY(copper or fiber) interfaces
over GMII, make sure to enable GMII. With this change brgphy(4) is
used to handle the dual mode PHY. Since we still don't have a sane
way to pass PHY specific information to mii(4) layer special
handling is needed in brgphy(4) to determine which mode of PHY was
configured in parent interface.
This change make BCM5715S work.

Tested by: olli
Obtained from: OpenBSD
MFC after: 1 week

14 years agoBuild iwi(4) and iwifw(4) modules on amd64 as well.
Christian Brueffer [Thu, 14 Jan 2010 16:49:22 +0000 (16:49 +0000)]
Build iwi(4) and iwifw(4) modules on amd64 as well.

PR: 113117
Submitted by: "O. Hartmann" <ohartman@zedat.fu-berlin.de>
MFC after: 1 week

14 years agoReject invalid CIDR widths rather than silently stopping at the first
Ed Maste [Thu, 14 Jan 2010 15:27:18 +0000 (15:27 +0000)]
Reject invalid CIDR widths rather than silently stopping at the first
non-digit character.

Due to an issue with rc(8) in a test configuration, ifconfig was being
invoked with the address used again as the width - for example,

  ifconfig vlan0 10.0.0.1/10.0.0.1

Prior to this change, that address/width would be interpreted as
10.0.0.1/10.

14 years agoRemove ttyslot from Symbol.map anyway.
Ed Schouten [Thu, 14 Jan 2010 15:20:46 +0000 (15:20 +0000)]
Remove ttyslot from Symbol.map anyway.

Requested by: kan

14 years agoUnbreak pututxline() on 32-bit architectures.
Ed Schouten [Thu, 14 Jan 2010 15:20:09 +0000 (15:20 +0000)]
Unbreak pututxline() on 32-bit architectures.

I forgot to cast the size_t's back to off_t before negating them,
causing all sorts of artifacts where the log files would grow to 2^32 -
197 bytes.

Reported by: ume

14 years agoUpdate the ident for the XENHVM kernel config to match the filename.
John Baldwin [Thu, 14 Jan 2010 15:07:18 +0000 (15:07 +0000)]
Update the ident for the XENHVM kernel config to match the filename.

MFC after: 1 week

14 years ago- Note that if_xname, if_dname, and if_dunit are usually initialized via
John Baldwin [Thu, 14 Jan 2010 14:43:16 +0000 (14:43 +0000)]
- Note that if_xname, if_dname, and if_dunit are usually initialized via
  if_initname().
- Document if_drv_flags and replace references to IFF_(RUNNING|OACTIVE)
  with references to IFF_DRV_(RUNNING|OACTIVE).
- Complete truncated sentence in the description of if_transmit by copying
  from the description in if_qflush.
- Add missing line breaks for translators.

Reviewed by: brooks (1)
MFC after: 3 days

14 years ago- Update required headers for namei() to add <sys/fcntl.h> and remove
John Baldwin [Thu, 14 Jan 2010 14:36:39 +0000 (14:36 +0000)]
- Update required headers for namei() to add <sys/fcntl.h> and remove
  <sys/proc.h>.
- Add RETURN VALUES and ERROR sections for namei()'s error return values.
- Add a missing link to NDHASGIANT.9.

PR: docs/142815, docs/142816
Submitted by: Lachlan Kang (1, 2)
MFC after: 3 days

14 years agoBring in the ext2fs work done by Aditya Sarawgi during and after Google Summer
Ulf Lilleengen [Thu, 14 Jan 2010 14:30:54 +0000 (14:30 +0000)]
Bring in the ext2fs work done by Aditya Sarawgi during and after Google Summer
of Code 2009:

- BSDL block and inode allocation policies for ext2fs. This involves the use
  FFS1 style block and inode allocation for ext2fs. Preallocation was removed
  since it was GPL'd.
- Make ext2fs MPSAFE by introducing locks to per-mount datastructures.
- Fixes for kern/122047 PR.
- Various small bugfixes.
- Move out of gnu/ directory.

Sponsored by:   Google Inc.
Submitted by: Aditya Sarawgi <sarawgi.aditya AT SPAMFREE gmail DOT com>

14 years agoThe group field is called `gid', not `group'.
Ed Schouten [Thu, 14 Jan 2010 11:03:26 +0000 (11:03 +0000)]
The group field is called `gid', not `group'.

14 years agoMake whois capable of searching for IPv6 addresses just like it can
Edwin Groothuis [Thu, 14 Jan 2010 10:56:54 +0000 (10:56 +0000)]
Make whois capable of searching for IPv6 addresses just like it can
do for IPv4 addresses without having to explicetly specify that the
ARIN server should be used to get the initial information

PR: bin/128725
Submitted by: "Matt D. Harris" <mdh_lists@yahoo.com>
MFC after: 1 week

14 years agoRemove -d option, whois.nic.mil doesn't exist anymore.
Edwin Groothuis [Thu, 14 Jan 2010 10:40:54 +0000 (10:40 +0000)]
Remove -d option, whois.nic.mil doesn't exist anymore.

PR: bin/142507
Submitted by: Dan Mahoney <danm@prime.gushi.org>
MFC after: 1 week

14 years agoRevert the change to Symbol.map, made in r202274.
Ed Schouten [Thu, 14 Jan 2010 10:00:01 +0000 (10:00 +0000)]
Revert the change to Symbol.map, made in r202274.

Even though we use __sym_compat(), we should list the symbol in
Symbol.map.

ttyslot() is now listed as follows, which seems to do the right thing:

| Symbol table '.dynsym' contains 2755 entries:
|    Num:    Value          Size Type    Bind   Vis      Ndx Name
|    613: 00000000000477b0   121 FUNC    GLOBAL DEFAULT   10 ttyslot@FBSD_1.0

Reported by: kib

14 years agoDocument that the IEEE80211_DEBUG kernel option is needed for
Peter Pentchev [Thu, 14 Jan 2010 09:38:23 +0000 (09:38 +0000)]
Document that the IEEE80211_DEBUG kernel option is needed for
using the wlan(4) debugging controls with wording slightly
different from that in the PR.

PR: 142367
Submitted by: Matthew Thyer <matt.thyer@gmail.com>
MFC after: 2 weeks

14 years agoDon't use fseeko() to obtain the file offset.
Ed Schouten [Thu, 14 Jan 2010 08:08:55 +0000 (08:08 +0000)]
Don't use fseeko() to obtain the file offset.

I was a bit confused with lseek(), which returns the new offset. We
should ftello() to obtain it using stdio.

14 years agoAdd two changes that should have gone into commit r202274.
Ed Schouten [Thu, 14 Jan 2010 05:37:43 +0000 (05:37 +0000)]
Add two changes that should have gone into commit r202274.

  Phase out ttyslot(3).

  The ttyslot() function was originally part for SUSv1, marked LEGACY in
  SUSv2 and removed later on. This function only makes sense when using
  utmp(5), because it was used to determine the offset of the record for
  the controlling TTY. It makes little sense to keep it here, because the
  new utmpx file format doesn't index based on TTY slots.

14 years agoPhase out ttyslot(3).
Ed Schouten [Thu, 14 Jan 2010 05:35:32 +0000 (05:35 +0000)]
Phase out ttyslot(3).

The ttyslot() function was originally part for SUSv1, marked LEGACY in
SUSv2 and removed later on. This function only makes sense when using
utmp(5), because it was used to determine the offset of the record for
the controlling TTY. It makes little sense to keep it here, because the
new utmpx file format doesn't index based on TTY slots.

14 years agoAdd ioctl requests to /dev/io on ia64 for reading and writing
Marcel Moolenaar [Thu, 14 Jan 2010 02:48:39 +0000 (02:48 +0000)]
Add ioctl requests to /dev/io on ia64 for reading and writing
EFI variables. The primary reason for this is that it allows
sysinstall(8) to add a boot menu item for the newly installed
FreeBSD image.

14 years agoFix previous commitr:. efi_var_set() was copied from efi_var_get(),
Marcel Moolenaar [Thu, 14 Jan 2010 02:38:46 +0000 (02:38 +0000)]
Fix previous commitr:. efi_var_set() was copied from efi_var_get(),
but wasn't actually changed.

14 years agoAdd wrappers for the RT Variable Services. While here, translate the
Marcel Moolenaar [Thu, 14 Jan 2010 02:14:21 +0000 (02:14 +0000)]
Add wrappers for the RT Variable Services. While here, translate the
EFI status into a standard errno value and change efi_set_time() to
return a standard error.

MFC after: 1 week

14 years agoGrammar nits.
Andrew Thompson [Thu, 14 Jan 2010 01:16:20 +0000 (01:16 +0000)]
Grammar nits.

Submitted by: Ben Kaduk

14 years agoAdd BCM5754 PHY id that is found on Dell Studio XPS 16.
Pyun YongHyeon [Thu, 14 Jan 2010 00:36:49 +0000 (00:36 +0000)]
Add BCM5754 PHY id that is found on Dell Studio XPS 16.

Tested by: scf
MFC after: 1 week

14 years ago o Add PCI ID for BCM 5756.
Xin LI [Wed, 13 Jan 2010 22:39:39 +0000 (22:39 +0000)]
 o Add PCI ID for BCM 5756.
 o Don't enable BGE_FLAG_BER_BUG on both 5722 and 5756, and based
   on their PCI IDs rather than their chip IDs.

Reported by: several PC-BSD users via kmoore
Reviewed by: yongari, imp, jhb, davidch
Sponsored by: iXsystems, Inc.
MFC after: 2 weeks

14 years agoHide from default sndstat some information not used on daily basis,
Alexander Motin [Wed, 13 Jan 2010 22:22:16 +0000 (22:22 +0000)]
Hide from default sndstat some information not used on daily basis,
to make it readable by average user with average screen size.

14 years agoRemove the 1000 pseudo terminal limit from pts(4).
Ed Schouten [Wed, 13 Jan 2010 21:22:23 +0000 (21:22 +0000)]
Remove the 1000 pseudo terminal limit from pts(4).

Even with the old utmp format, we could in fact go to pts/9999, because
ut_line wasn't guaranteed to be null terminated there.

14 years agoUpdate to Fredrik's latest uhso driver. This changes port detection, adds
Andrew Thompson [Wed, 13 Jan 2010 20:54:18 +0000 (20:54 +0000)]
Update to Fredrik's latest uhso driver. This changes port detection, adds
comments and other code nits.

Submitted by: Fredrik Lindberg <fli@shapeshifter.se>

14 years agoAdd a missing $FreeBSD$ string.
Ed Schouten [Wed, 13 Jan 2010 20:30:16 +0000 (20:30 +0000)]
Add a missing $FreeBSD$ string.

I was requested to add this string to any file that was modified by my
commit, which I forgot to do so.

Requested by: des

14 years agoComplete the migration towards utmpx.
Ed Schouten [Wed, 13 Jan 2010 19:25:03 +0000 (19:25 +0000)]
Complete the migration towards utmpx.

- Add a notice to UPDATING, explaining users may need to recompile
  applications that use the old database.
- Bump __FreeBSD_version.

14 years agoLet rc and periodic infrastructure and newsyslog use the utmpx files.
Ed Schouten [Wed, 13 Jan 2010 19:07:48 +0000 (19:07 +0000)]
Let rc and periodic infrastructure and newsyslog use the utmpx files.

14 years agoRemove <utmp.h> and its corresponding manual page.
Ed Schouten [Wed, 13 Jan 2010 19:03:48 +0000 (19:03 +0000)]
Remove <utmp.h> and its corresponding manual page.

14 years agoRemove login(3), logout(3) and logwtmp(3) from libutil.
Ed Schouten [Wed, 13 Jan 2010 18:59:51 +0000 (18:59 +0000)]
Remove login(3), logout(3) and logwtmp(3) from libutil.

These functions only apply to utmp(5). They cannot be kept intact when
moving towards utmpx. The login(3) function would break, because its
argument is an utmp structure. The logout(3) and logwtmp(3) functions
cannot be used, since they provide a functionality which partially
overlaps.

Increment SHLIB_MAJOR to 9 to indicate the removal.

14 years agoRemove utmpx stub from libulog.
Ed Schouten [Wed, 13 Jan 2010 18:53:06 +0000 (18:53 +0000)]
Remove utmpx stub from libulog.

I'm not increasing the shlib major version for this, because not a
single application outside the base system should have used these
functions in such a short timespan.

Rewrite ulog_login(3) and ulog_logout(3) to build on top of the utmpx
implementation in libc.

14 years agoForgot a part that was missing in the previous commit.
Ed Schouten [Wed, 13 Jan 2010 18:46:50 +0000 (18:46 +0000)]
Forgot a part that was missing in the previous commit.

There is no need to call trimdomain() anymore now that ut_host is big
enough to fit decent hostnames.

14 years agoMake OpenSSH work with utmpx.
Ed Schouten [Wed, 13 Jan 2010 18:43:32 +0000 (18:43 +0000)]
Make OpenSSH work with utmpx.

- Partially revert r184122 (sshd.c). Our ut_host is now big enough to
  fit proper hostnames.

- Change config.h to match reality.

- defines.h requires UTMPX_FILE to be set by <utmpx.h> before it allows
  the utmpx code to work. This makes no sense to me. I've already
  mentioned this upstream.

- Add our own platform-specific handling of lastlog. The version I will
  send to the OpenSSH folks will use proper autoconf generated
  definitions instead of `#if 1'.

14 years agoLet telnetd build without utmp and logwtmp(3).
Ed Schouten [Wed, 13 Jan 2010 18:37:42 +0000 (18:37 +0000)]
Let telnetd build without utmp and logwtmp(3).

Just like rlogind, there is no need to change the ownership of the
terminal during shutdown anymore. Also don't call logwtmp, because the
login(1)/PAM is responsible for doing this. Also use SHUT_RDWR instead
of 2.

14 years agoLet pam_lastlog use utmpx instead of libulog's utmpx interface.
Ed Schouten [Wed, 13 Jan 2010 18:32:31 +0000 (18:32 +0000)]
Let pam_lastlog use utmpx instead of libulog's utmpx interface.

It will still use ulog_login(3) and ulog_logout(3), which will remain
present.

14 years agoPort all apps in libexec/ from libulog to utmpx.
Ed Schouten [Wed, 13 Jan 2010 18:28:58 +0000 (18:28 +0000)]
Port all apps in libexec/ from libulog to utmpx.

14 years agoPort ftpd to utmpx.
Ed Schouten [Wed, 13 Jan 2010 18:28:41 +0000 (18:28 +0000)]
Port ftpd to utmpx.

Unfortunately I have to partially wreck its functionality, though. ftpd
used to keep a file descriptor to the wtmp, which allowed it to work
from within a chroot. The current utmpx implementation doesn't offer a
way to do this. Maybe we can address this in the future, if it turns out
to be a real issue.

14 years agoPort comsat to utmpx.
Ed Schouten [Wed, 13 Jan 2010 18:25:43 +0000 (18:25 +0000)]
Port comsat to utmpx.

It seems comsat stats the utmpx database each 15 seconds to see whether
it has been changed. I am changing this behaviour to look at the utmpx
database upon processing. I don't want to allow direct interference with
the database files. I also wonder whether this optimization has any
measurable performance benefit nowadays.

14 years agoRemove `dead code' from rlogind.
Ed Schouten [Wed, 13 Jan 2010 18:24:04 +0000 (18:24 +0000)]
Remove `dead code' from rlogind.

- It shouldn't call logwtmp(). Applications like login(1) already make
  sure both login and logout entries are written to the storage.
- There's no need to restore permissions on the pseudo-terminal, since
  it should be garbage collected by the kernel.

14 years agoPort all applications in usr.sbin/ from libulog to utmpx.
Ed Schouten [Wed, 13 Jan 2010 18:17:53 +0000 (18:17 +0000)]
Port all applications in usr.sbin/ from libulog to utmpx.

14 years agoPort lastlogin(8) to utmpx.
Ed Schouten [Wed, 13 Jan 2010 18:17:12 +0000 (18:17 +0000)]
Port lastlogin(8) to utmpx.

While there, fix a bug I introduced previously. We must reopen the
database for each username passed on the command line. We must rewind
the database and search from the beginning.

14 years agoPort timed away from logwtmp(3). Let it use utmpx.
Ed Schouten [Wed, 13 Jan 2010 18:15:46 +0000 (18:15 +0000)]
Port timed away from logwtmp(3). Let it use utmpx.

14 years agoPort ac(8) to utmpx.
Ed Schouten [Wed, 13 Jan 2010 18:14:59 +0000 (18:14 +0000)]
Port ac(8) to utmpx.

Similar to last(1), it must compare ut_id's instead of TTYs to determine
whether a session has been terminated. It must also use ut_type to
determine the type of the login record instead figuring it out by
itself.

14 years agoPerform all trivial ports to utmpx for usr.bin/.
Ed Schouten [Wed, 13 Jan 2010 18:09:54 +0000 (18:09 +0000)]
Perform all trivial ports to utmpx for usr.bin/.

They were already converted to use libulog, so it's easy to convert them
to utmpx.

14 years agoPort w(1) to utmpx.
Ed Schouten [Wed, 13 Jan 2010 18:09:21 +0000 (18:09 +0000)]
Port w(1) to utmpx.

Let it print "-" when the TTY string is empty. In this case, it must
also make sure it doesn't match processes who also have no controlling
TTY. Otherwise it will print random kernel processes when trying to pick
the best matching process.

Eventually it should look at the value of ut_pid as well.

14 years agoAllow getent(1) to display utmpx entries as well.
Ed Schouten [Wed, 13 Jan 2010 18:08:00 +0000 (18:08 +0000)]
Allow getent(1) to display utmpx entries as well.

Because getutxent also matches the typical get*ent format of library
routines, I thought it would be a good idea to teach it how to read
utmpx databases. getent(1) just gives a raw dump, which is very useful
when debugging problems related to parsing/logging.

14 years agoPort last(1) to use utmpx.
Ed Schouten [Wed, 13 Jan 2010 18:06:31 +0000 (18:06 +0000)]
Port last(1) to use utmpx.

Basically there are three major things I changed about last(1):

- It should use ut_type instead of determining by hand what type of
  record was given.
- It should now keep track of ut_id's instead of TTYs. This means the
  ttylist has been renamed to the idlist, storing all the ut_id's it has
  processed until the next reboot.
- I've removed the signal handler. Because our wtmp is rotated so often,
  it makes little sense. Even on a simple piece of hardware it should be
  capable of grinding through megabytes of logs in a second.

14 years agoLet libopie use utmpx instead of utmp.
Ed Schouten [Wed, 13 Jan 2010 18:02:30 +0000 (18:02 +0000)]
Let libopie use utmpx instead of utmp.

14 years agoPort the remaining apps in sbin/ to utmpx; only reboot(8).
Ed Schouten [Wed, 13 Jan 2010 17:59:23 +0000 (17:59 +0000)]
Port the remaining apps in sbin/ to utmpx; only reboot(8).

14 years agoMigrate init(8) towards utmpx.
Ed Schouten [Wed, 13 Jan 2010 17:58:49 +0000 (17:58 +0000)]
Migrate init(8) towards utmpx.

According to a comment, we cannot safely remove utmpx entries here
anymore. This is because the libc routines may block on file locking. In
an ideal world login(1) should just remove the entries, which is why I'm
disabling this code for now. If it turns out we get lots of stale
entries here, we should figure out a way to deal with that.

14 years agoPort everything in bin/ from utmp to utmpx.
Ed Schouten [Wed, 13 Jan 2010 17:56:54 +0000 (17:56 +0000)]
Port everything in bin/ from utmp to utmpx.

date: use libc utmpx routines instead of the ones provided by libulog.
pax:  don't depend on <utmp.h>

14 years agoPort ppp(8) to utmpx.
Ed Schouten [Wed, 13 Jan 2010 17:54:32 +0000 (17:54 +0000)]
Port ppp(8) to utmpx.

A nice thing about utmpx is that it makes it very easy to log sessions
that don't use TTYs. This is because the file is not indexed by TTY
slots anymore.

Silence from: brian

14 years agoMigrate finger(1) towards utmpx.
Ed Schouten [Wed, 13 Jan 2010 17:50:58 +0000 (17:50 +0000)]
Migrate finger(1) towards utmpx.

It was already ported to use libulog, which makes it simpler now. Be
sure to catch the error returned by setutxdb(). Otherwise it may perform
a lookup on the utx.active database.

14 years agoLet csh(1) use utmpx instead of utmp.
Ed Schouten [Wed, 13 Jan 2010 17:49:35 +0000 (17:49 +0000)]
Let csh(1) use utmpx instead of utmp.

csh allows you to monitor the utmp(x) file to monitor certain user
logins. Unfortunately it needs to directly stat() this file. I don't
want to break this module , but eventually it shouldn't do that. The
idea of the getutxent(3) API is to hide file access.

Approved by: mp

14 years agoImplement <utmpx.h>.
Ed Schouten [Wed, 13 Jan 2010 17:29:55 +0000 (17:29 +0000)]
Implement <utmpx.h>.

The utmpx interface is the standardized interface of the user accounting
database. The standard only defines a subset of the functions that were
present in System V-like systems.

I'd like to highlight some of the traits my implementation has:

- The standard allows the on-disk format to be different than the
  in-memory representation (struct utmpx). Most operating systems don't
  do this, but we do. This allows us to keep our ABI more stable, while
  giving us the opportunity to modify the on-disk format. It also allows
  us to use a common file format across different architectures (i.e.
  byte ordering).

- Our implementation of pututxline() also updates wtmp and lastlog (now
  called utx.log and utx.lastlogin). This means the databases are more
  likely to be in sync.

- Care must be taken that our implementation discard any fields that are
  not applicable. For example, our DEAD_PROCESS records do not hold a
  TTY name. Just a time stamp, a record identifier and a process
  identifier. It also guarantees that strings (ut_host, ut_line and
  ut_user) are null terminated. ut_id is obviously not null terminated,
  because it's not a string.

- The API and its behaviour should be conformant to POSIX, but there may
  be things that slightly deviate from the standard. This implementation
  uses separate file descriptors when writing to the log files. It also
  doesn't use getutxid() to search for a field to overwrite. It uses an
  allocation strategy similar to getutxid(), but prevents DEAD_PROCESS
  records from accumulating.

Make sure libulog doesn't overwrite the manpages shipped with our C
library. Also keep the symbol list in Symbol.map sorted.

I'll bump __FreeBSD_version later this evening. I first want to convert
everything to <utmpx.h> and get rid of <utmp.h>.

14 years ago- Fix some style bugs in tmpfs_mount(). [1]
Jaakko Heinonen [Wed, 13 Jan 2010 14:17:21 +0000 (14:17 +0000)]
- Fix some style bugs in tmpfs_mount(). [1]
- Remove a stale comment about tmpfs_mem_info() 'total' argument.

Reported by: bde [1]

14 years agoReturn SEM_FAILED instead of NULL, though there are same, but the
David Xu [Wed, 13 Jan 2010 08:53:23 +0000 (08:53 +0000)]
Return SEM_FAILED instead of NULL, though there are same, but the
SEM_FAILED is more suitable name.
In function, sem_close(), always set errno on error.

14 years agoAdd a driver by Fredrik Lindberg for Option HSDPA USB devices. These differ
Andrew Thompson [Wed, 13 Jan 2010 03:16:31 +0000 (03:16 +0000)]
Add a driver by Fredrik Lindberg for Option HSDPA USB devices. These differ
from standard 3G wireless units by supplying a raw IP/IPv6 endpoint rather than
using PPP over serial. uhsoctl(1) is used to initiate and close the WAN
connection.

Obtained from: Fredrik Lindberg <fli@shapeshifter.se>

14 years agoUpdate mesh code to to D4.0.
Rui Paulo [Tue, 12 Jan 2010 22:22:27 +0000 (22:22 +0000)]
Update mesh code to to D4.0.

14 years agoMiscellaneous mdoc, spelling and inconsistency fixes.
Christian Brueffer [Tue, 12 Jan 2010 21:45:03 +0000 (21:45 +0000)]
Miscellaneous mdoc, spelling and inconsistency fixes.

PR: 142573, 142576 (mostly)
Submitted by: brucec
MFC after: 1 week

14 years agoSet the svn:eol-style = native and svn:mime-type = text/plain
Warner Losh [Tue, 12 Jan 2010 21:36:08 +0000 (21:36 +0000)]
Set the svn:eol-style = native and svn:mime-type = text/plain
properties on all files in this tree.

Submitted by: rpaulo@

14 years agoPlace proper svn:keywords tag on all these files. They were created
Warner Losh [Tue, 12 Jan 2010 21:17:36 +0000 (21:17 +0000)]
Place proper svn:keywords tag on all these files.  They were created
somehow without them on projects/mips, and that mistake was propigated
over to head.

Submitted by: rpaulo@

14 years agoAdd a regular comment explaining what this file is.
Rui Paulo [Tue, 12 Jan 2010 20:55:12 +0000 (20:55 +0000)]
Add a regular comment explaining what this file is.

14 years agoFix svn properties and remove a P4 keyword.
Rui Paulo [Tue, 12 Jan 2010 20:52:41 +0000 (20:52 +0000)]
Fix svn properties and remove a P4 keyword.

14 years agoMake OSS_GETVERSION ioctl supported also for DSP devices,
Alexander Motin [Tue, 12 Jan 2010 20:10:40 +0000 (20:10 +0000)]
Make OSS_GETVERSION ioctl supported also for DSP devices,
same as 4Front and Linux do.

MFC after: 1 month

14 years agoMake default recording source choosing more intelligent.
Alexander Motin [Tue, 12 Jan 2010 19:41:07 +0000 (19:41 +0000)]
Make default recording source choosing more intelligent.
Change default recording level from 0 to 75.
It should increase chances for things to work just out of the box.

14 years agoDeclare the kern.ngroups sysctl to be read-only, but tunable at boot for
Brooks Davis [Tue, 12 Jan 2010 18:20:20 +0000 (18:20 +0000)]
Declare the kern.ngroups sysctl to be read-only, but tunable at boot for
better error reporting.

Submitted by: Matthew Fleming <matthew dot fleming at isilon dot com>
MFC After: 1 month

14 years agoVarious fixes.
Christian Brueffer [Tue, 12 Jan 2010 18:07:12 +0000 (18:07 +0000)]
Various fixes.

14 years agoSpell "Hz" correctly wherever it is user-visible.
Gavin Atkinson [Tue, 12 Jan 2010 17:59:58 +0000 (17:59 +0000)]
Spell "Hz" correctly wherever it is user-visible.

PR: bin/142566
Submitted by: N.J. Mann   njm njm.me.uk
Approved by: ed (mentor)
MFC after: 2 weeks

14 years agoUpdate, reflecting added multichannel playback support.
Alexander Motin [Tue, 12 Jan 2010 17:50:26 +0000 (17:50 +0000)]
Update, reflecting added multichannel playback support.

14 years agoRemove useless .TE groff macro.
Christian Brueffer [Tue, 12 Jan 2010 17:38:23 +0000 (17:38 +0000)]
Remove useless .TE groff macro.

Submitted by: Joerg Sonnenberger
MFC after: 3 days

14 years agoBug fix: add a missing initializer.
Joseph Koshy [Tue, 12 Jan 2010 17:03:55 +0000 (17:03 +0000)]
Bug fix: add a missing initializer.

Submitted by: Luca Pizzamiglio <luca.pizzamiglio at gmail dot com>
PR: i386/142742

14 years agoAlign buffer size to LCM of 128bytes, required by hardware, and alignment of
Alexander Motin [Tue, 12 Jan 2010 16:40:13 +0000 (16:40 +0000)]
Align buffer size to LCM of 128bytes, required by hardware, and alignment of
current format. This fixes problems with non-power-of-2 number of channels.

Enable 5.1 formats support, as they are working fine now.

14 years agoMake OSS_GETVERSION ioctl really work. It has 'M' group, not 'P',
Alexander Motin [Tue, 12 Jan 2010 11:11:25 +0000 (11:11 +0000)]
Make OSS_GETVERSION ioctl really work. It has 'M' group, not 'P',
as different nearby ones, and was grabbed by MIXER_xxx() handler.

While there, replace '(cmd & MIXER_xxx(0)) == MIXER_xxx(0)' expressions
with more correct '(cmd & ~0xff) == MIXER_READ(0)'. Use of bit operations
to compare numeric fields doesn't looks sane.

MFC after: 1 month

14 years agoReplace the static NGROUPS=NGROUPS_MAX+1=1024 with a dynamic
Brooks Davis [Tue, 12 Jan 2010 07:49:34 +0000 (07:49 +0000)]
Replace the static NGROUPS=NGROUPS_MAX+1=1024 with a dynamic
kern.ngroups+1.  kern.ngroups can range from NGROUPS_MAX=1023 to
INT_MAX-1.  Given that the Windows group limit is 1024, this range
should be sufficient for most applications.

MFC after: 1 month

14 years agoUpdate manuals of sem_open and sem_init.
David Xu [Tue, 12 Jan 2010 01:30:05 +0000 (01:30 +0000)]
Update manuals of sem_open and sem_init.

Submitted by: ru

14 years agoCast 64-bit quantity to intptr_t rather than int so as to work properly
Kirk McKusick [Mon, 11 Jan 2010 23:33:30 +0000 (23:33 +0000)]
Cast 64-bit quantity to intptr_t rather than int so as to work properly
with 64-bit architectures (such as amd64).

Reported by:  Xin LI and Josh Paetzel

14 years agoSet svn:executable to *.
Xin LI [Mon, 11 Jan 2010 23:32:36 +0000 (23:32 +0000)]
Set svn:executable to *.

MFC after: 1 month

14 years agoReport ZFS filesystem version instead of the zpool version when we say it.
Xin LI [Mon, 11 Jan 2010 23:15:11 +0000 (23:15 +0000)]
Report ZFS filesystem version instead of the zpool version when we say it.

Reported by: Yuri Pankov (on -fs@)
Submitted by: delphij
Approved by: pjd
MFC after: 1 week

14 years agoAdd multichannel (4.0 and 7.1) playback support. 5.1 mode support blocked
Alexander Motin [Mon, 11 Jan 2010 22:57:52 +0000 (22:57 +0000)]
Add multichannel (4.0 and 7.1) playback support. 5.1 mode support blocked
now due to unidentified synchonization problem. For 7.1 soundcards 5.1
support handled correctly via software upmix done by sound(4).

Stereo stream is no more duplicated to all ports. If you loose sound, check
you are using right connectors. Front speakers connector is usually green,
center/LFE - orange, rear - black, side - gray.

14 years agoCast 64-bit quantity to intptr_t rather than int so as to work properly
Kirk McKusick [Mon, 11 Jan 2010 22:42:06 +0000 (22:42 +0000)]
Cast 64-bit quantity to intptr_t rather than int so as to work properly
with 64-bit architectures (such as amd64).

Reported by: bz

14 years agoChange DDB show prison:
Bjoern A. Zeeb [Mon, 11 Jan 2010 22:34:25 +0000 (22:34 +0000)]
Change DDB show prison:
- name some columns more closely to the user space variables,
  as we do for host.* or allow.* (in the listing) already.
- print pr_childmax (children.max).
- prefix hex values with 0x.

MFC after: 3 weeks

14 years agoUse better default RSS hash (src + dst, rather than just src port)
Andrew Gallatin [Mon, 11 Jan 2010 22:28:40 +0000 (22:28 +0000)]
Use better default RSS hash (src + dst, rather than just src port)

MFC after:3 days