git: libutil: Various updates from FreeBSD, esp. pid_* functions

John Marino marino at crater.dragonflybsd.org
Sun Feb 9 11:09:04 PST 2014


commit d316f7c95d4b8b07a5557eb0a39cfa39b7114297
Author: John Marino <draco at marino.st>
Date:   Sun Feb 9 15:21:13 2014 +0100

    libutil: Various updates from FreeBSD, esp. pid_* functions
    
    It appears that libutil.so is another Frankenstein monster where half
    of it came from FreeBSD and later it was updated with NetBSD functions.
    Like libm, this causes problems with syncing later.
    
    In order to update the daemon program, the set of pidfile_* functions
    had to be brought in from FreeBSD.  While doing that, I synced with
    FreeBSD as much as possible.  The expand number function was added
    as well as a dedicated pw_util man page.
    
    Specifically ignored were FreeBSD functionality involving kinfo and kld.
    The login functions are essentially incompatible as the FreeBSD ones
    require syscntls, so I left the NetBSD versions alone.  The various
    humanize functions that only exist on DragonFly were also left untouched.
    
    Collateral damage included:
      sbin/devd/devd.[ch][ch]       (partial sync)
      usr.sbin/authpf/authpf.c      (partial sync)
      usr.sbin/apmd/apmd.c
      usr.sbin/battd/battd.c
      usr.sbin/bthcid/bthcid.c
      usr.sbin/pflogd/pflogd.c
      usr.sbin/rwhod/rwhod.c
      usr.sbin/syslogd/             (full sync)
      usr.sbin/sysvipcd/sysvipcd.c

Summary of changes:
 lib/libutil/Makefile                               |  18 +-
 lib/libutil/_secure_path.3                         |   5 +-
 lib/libutil/_secure_path.c                         |   8 +-
 lib/libutil/auth.c                                 |   4 +-
 lib/libutil/dehumanize_number.c                    |   3 +-
 .../expand_number.3}                               |  91 ++---
 .../glxsb/glxsb.h => lib/libutil/expand_number.c   |  88 +++--
 lib/libutil/flopen.3                               |  28 +-
 lib/libutil/flopen.c                               |  26 +-
 lib/libutil/fparseln.3                             |   9 +-
 lib/libutil/fparseln.c                             |  18 +-
 lib/libutil/gr_util.c                              | 219 +++++++----
 lib/libutil/hexdump.3                              |   2 +-
 lib/libutil/hexdump.c                              |   1 +
 lib/libutil/humanize_number.3                      | 136 ++++---
 lib/libutil/humanize_number.c                      | 125 +++---
 lib/libutil/humanize_unsigned.c                    |   3 +-
 lib/libutil/libutil.h                              |  34 +-
 lib/libutil/login.c                                |   4 +-
 lib/libutil/login.conf.5                           | 167 ++++----
 lib/libutil/login_auth.3                           |   2 +-
 lib/libutil/login_auth.c                           |  10 +-
 lib/libutil/login_cap.3                            | 400 +++++++++++++------
 lib/libutil/login_cap.c                            | 136 ++++---
 lib/libutil/login_cap.h                            | 106 ++---
 lib/libutil/login_class.c                          | 126 +++---
 lib/libutil/login_crypt.c                          |   8 +-
 lib/libutil/login_ok.3                             |  14 +-
 lib/libutil/login_ok.c                             |  18 +-
 lib/libutil/login_times.3                          |   4 +-
 lib/libutil/login_times.c                          |  40 +-
 lib/libutil/login_tty.3                            |  15 +-
 lib/libutil/login_tty.c                            |   4 +-
 lib/libutil/logout.c                               |   4 +-
 lib/libutil/logwtmp.c                              |   3 +-
 lib/libutil/pidfile.3                              | 342 ++++++++++++----
 lib/libutil/pidfile.c                              | 307 +++++++++++----
 lib/libutil/property.3                             |  22 +-
 lib/libutil/property.c                             | 101 +++--
 lib/libutil/pty.3                                  |  69 ++--
 lib/libutil/pty.c                                  |  82 +---
 lib/libutil/pw_util.3                              | 286 ++++++++++++++
 lib/libutil/pw_util.c                              | 148 ++++---
 lib/libutil/realhostname.3                         |  12 +-
 lib/libutil/realhostname.c                         |  63 +--
 lib/libutil/realhostname_sa.3                      |  14 +-
 lib/libutil/stub.c                                 |   4 +-
 lib/libutil/trimdomain.3                           |  14 +-
 lib/libutil/trimdomain.c                           |  11 +-
 lib/libutil/uucplock.3                             |  20 +-
 lib/libutil/uucplock.c                             |  30 +-
 sbin/devd/devd.cc                                  | 125 ++++--
 sbin/devd/devd.hh                                  |  10 +-
 usr.sbin/apmd/apmd.c                               |   4 +-
 usr.sbin/authpf/authpf.c                           |  56 ++-
 usr.sbin/battd/battd.c                             |   5 +-
 usr.sbin/bthcid/bthcid.c                           |  12 +-
 usr.sbin/pflogd/pflogd.c                           |   4 +-
 usr.sbin/rwhod/rwhod.c                             |   4 +-
 usr.sbin/syslogd/Makefile                          |   9 +-
 usr.sbin/syslogd/pathnames.h                       |   7 +-
 usr.sbin/syslogd/syslog.conf.5                     |  36 +-
 usr.sbin/syslogd/syslogd.8                         |  38 +-
 usr.sbin/syslogd/syslogd.c                         | 428 +++++++++------------
 usr.sbin/sysvipcd/sysvipcd.c                       |   4 +-
 65 files changed, 2604 insertions(+), 1542 deletions(-)
 copy lib/{libpthread/pthread_rwlock_destroy.3 => libutil/expand_number.3} (51%)
 copy sys/dev/crypto/glxsb/glxsb.h => lib/libutil/expand_number.c (53%)
 create mode 100644 lib/libutil/pw_util.3

http://gitweb.dragonflybsd.org/dragonfly.git/commitdiff/d316f7c95d4b8b07a5557eb0a39cfa39b7114297


-- 
DragonFly BSD source repository


More information about the Commits mailing list