diff options
author | ed <ed@FreeBSD.org> | 2010-01-17 21:40:05 +0000 |
---|---|---|
committer | ed <ed@FreeBSD.org> | 2010-01-17 21:40:05 +0000 |
commit | f9a77ba26579e3f9f2b0eec8ffe1f24442e5a59a (patch) | |
tree | 2916f578d99718849996bd8bce13ccfae4447a99 /lib/libc/gen/utxdb.h | |
parent | ea1469181ddbe4bbb08569416a314290534b1d7a (diff) | |
download | FreeBSD-src-f9a77ba26579e3f9f2b0eec8ffe1f24442e5a59a.zip FreeBSD-src-f9a77ba26579e3f9f2b0eec8ffe1f24442e5a59a.tar.gz |
Perform several small cleanups to the utmpx code.
- Massively reduce BSS usage. Let futx_to_utx() dynamically allocate the
structure. There is only a very small amount of applications out there
that needs to use the utmpx database. Wasting 1 KB on unused
structures makes little sense.
- Just let getutxid() search for matching ut_id's for any *PROCESS-type.
This makes the code a bit more future-proof.
- Fix a POSIX-mistake: when reading POSIX and the OpenSolaris
implementation, getutxline() must return USER_PROCESS and
LOGIN_PROCESS records whose ut_lines match. When reading POSIX, it
seems LOGIN_PROCESS should not use ut_line at the first place. I have
reported this issue.
Diffstat (limited to 'lib/libc/gen/utxdb.h')
-rw-r--r-- | lib/libc/gen/utxdb.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/libc/gen/utxdb.h b/lib/libc/gen/utxdb.h index ec02013..d9ebc93 100644 --- a/lib/libc/gen/utxdb.h +++ b/lib/libc/gen/utxdb.h @@ -56,6 +56,6 @@ struct futx { } __packed; void utx_to_futx(const struct utmpx *, struct futx *); -void futx_to_utx(const struct futx *, struct utmpx *); +struct utmpx *futx_to_utx(const struct futx *); #endif /* !_UTXDB_H_ */ |