Date: Mon, 07 Dec 2009 09:05:00 +0300 From: Vladimir Grebenschikov <vova@fbsd.ru> To: Ed Schouten <ed@FreeBSD.org> Cc: svn-src-head@FreeBSD.org, svn-src-all@FreeBSD.org, src-committers@FreeBSD.org Subject: Re: svn commit: r200157 - head/bin/date Message-ID: <1260165900.1994.1.camel@localhost> In-Reply-To: <200912052009.nB5K9okL098577@svn.freebsd.org> References: <200912052009.nB5K9okL098577@svn.freebsd.org>
next in thread | previous in thread | raw e-mail | index | archive | help
Hi=20 Looks like this change broke boot process, it shows following message on early stage of boot: /libexec/ld-elf.so.1: Shared object "libulog.so.0" not found, required by "= date" date is used while /usr is not mounted yet, but libulog.so located in /use/lib: $ ldd /bin/date /bin/date: libulog.so.0 =3D> /usr/lib/libulog.so.0 (0x48090000) libc.so.7 =3D> /lib/libc.so.7 (0x48094000) $ -----Original Message----- From: Ed Schouten <ed@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r200157 - head/bin/date Date: Sat, 5 Dec 2009 20:09:50 +0000 (UTC) Author: ed Date: Sat Dec 5 20:09:50 2009 New Revision: 200157 URL: http://svn.freebsd.org/changeset/base/200157 Log: Let date(1) use utmpx instead of logwtmp(). =20 utmpx also has OLD_TIME/NEW_TIME messages, which seem to be intended for the same purpose as how we call logwtmp() here. Modified: head/bin/date/Makefile head/bin/date/date.c Modified: head/bin/date/Makefile =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D --- head/bin/date/Makefile Sat Dec 5 20:05:25 2009 (r200156) +++ head/bin/date/Makefile Sat Dec 5 20:09:50 2009 (r200157) @@ -3,7 +3,7 @@ =20 PROG=3D date SRCS=3D date.c netdate.c vary.c -DPADD=3D ${LIBUTIL} -LDADD=3D -lutil +DPADD=3D ${LIBULOG} +LDADD=3D -lulog =20 .include <bsd.prog.mk> Modified: head/bin/date/date.c =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D --- head/bin/date/date.c Sat Dec 5 20:05:25 2009 (r200156) +++ head/bin/date/date.c Sat Dec 5 20:09:50 2009 (r200157) @@ -48,11 +48,12 @@ __FBSDID("$FreeBSD$"); #include <ctype.h> #include <err.h> #include <locale.h> -#include <libutil.h> #include <stdio.h> #include <stdlib.h> #include <string.h> #include <syslog.h> +#define _ULOG_POSIX_NAMES +#include <ulog.h> #include <unistd.h> =20 #include "extern.h" @@ -181,6 +182,7 @@ main(int argc, char *argv[]) static void setthetime(const char *fmt, const char *p, int jflag, int nflag) { + struct utmpx utx; struct tm *lt; struct timeval tv; const char *dot, *t; @@ -271,12 +273,16 @@ setthetime(const char *fmt, const char * if (!jflag) { /* set the time */ if (nflag || netsettime(tval)) { - logwtmp("|", "date", ""); + utx.ut_type =3D OLD_TIME; + gettimeofday(&utx.ut_tv, NULL); + pututxline(&utx); tv.tv_sec =3D tval; tv.tv_usec =3D 0; if (settimeofday(&tv, (struct timezone *)NULL)) err(1, "settimeofday (timeval)"); - logwtmp("{", "date", ""); + utx.ut_type =3D NEW_TIME; + gettimeofday(&utx.ut_tv, NULL); + pututxline(&utx); } =20 if ((p =3D getlogin()) =3D=3D NULL) _______________________________________________ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscribe@freebsd.org" --=20 Vladimir B. Grebenschikov vova@fbsd.ru
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?1260165900.1994.1.camel>