From owner-svn-src-head@FreeBSD.ORG Sat Jul 31 17:41:58 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 5C9BF1065677; Sat, 31 Jul 2010 17:41:58 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 4CDA88FC16; Sat, 31 Jul 2010 17:41:58 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o6VHfwKq048664; Sat, 31 Jul 2010 17:41:58 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o6VHfwNT048662; Sat, 31 Jul 2010 17:41:58 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <201007311741.o6VHfwNT048662@svn.freebsd.org> From: Konstantin Belousov Date: Sat, 31 Jul 2010 17:41:58 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r210696 - head/bin/sleep X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 31 Jul 2010 17:41:58 -0000 Author: kib Date: Sat Jul 31 17:41:58 2010 New Revision: 210696 URL: http://svn.freebsd.org/changeset/base/210696 Log: Deal with proper format for printing time_t. Reported by: ache MFC after: 3 weeks Modified: head/bin/sleep/sleep.c Modified: head/bin/sleep/sleep.c ============================================================================== --- head/bin/sleep/sleep.c Sat Jul 31 17:23:37 2010 (r210695) +++ head/bin/sleep/sleep.c Sat Jul 31 17:41:58 2010 (r210696) @@ -45,6 +45,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include #include @@ -131,9 +132,10 @@ main(int argc, char *argv[]) * Reporting does not bother with * fractions of a second... */ - warnx("about %ld second(s) left" - " out of the original %ld", - time_to_sleep.tv_sec, original); + warnx("about %jd second(s) left" + " out of the original %jd", + (intmax_t)time_to_sleep.tv_sec, + (intmax_t)original); report_requested = 0; } else break;