From owner-cvs-bin Mon Dec 26 04:59:44 1994 Return-Path: cvs-bin-owner Received: (from root@localhost) by freefall.cdrom.com (8.6.9/8.6.6) id EAA25060 for cvs-bin-outgoing; Mon, 26 Dec 1994 04:59:44 -0800 Received: (from bde@localhost) by freefall.cdrom.com (8.6.9/8.6.6) id EAA25046; Mon, 26 Dec 1994 04:59:30 -0800 Date: Mon, 26 Dec 1994 04:59:30 -0800 From: Bruce Evans Message-Id: <199412261259.EAA25046@freefall.cdrom.com> To: cvs-bin, CVS-commiters Subject: cvs commit: src/bin/date date.c Sender: cvs-bin-owner@FreeBSD.org Precedence: bulk bde 94/12/26 04:59:29 Modified: bin/date date.c Log: Obtained from: partly from 386BSD-0.1.2.4 Fix several bugs involving the obsolescent -d and -t options: -d 0 and -t 0 were ignored -t -600 was a usage error -d 'atoi is not suitable for parsing args' and -t duh were not usage errors Change some error messages to say which call to settimeofday failed. Restore casts of NULL in function calls. Finish conversion to using err() instead of perror(). From owner-cvs-bin Mon Dec 26 05:02:11 1994 Return-Path: cvs-bin-owner Received: (from root@localhost) by freefall.cdrom.com (8.6.9/8.6.6) id FAA25130 for cvs-bin-outgoing; Mon, 26 Dec 1994 05:02:11 -0800 Received: (from bde@localhost) by freefall.cdrom.com (8.6.9/8.6.6) id FAA25113; Mon, 26 Dec 1994 05:02:07 -0800 Date: Mon, 26 Dec 1994 05:02:07 -0800 From: Bruce Evans Message-Id: <199412261302.FAA25113@freefall.cdrom.com> To: cvs-bin, CVS-commiters Subject: cvs commit: src/bin/sh cd.c Sender: cvs-bin-owner@FreeBSD.org Precedence: bulk bde 94/12/26 05:02:06 Modified: bin/sh cd.c Log: Obtained from: partly from 1.1.5 Convert "" to "." for "cd" and "cd ''". chdir("") is required to fail on POSIX systems. From owner-cvs-bin Fri Dec 30 05:13:42 1994 Return-Path: cvs-bin-owner Received: (from root@localhost) by freefall.cdrom.com (8.6.9/8.6.6) id FAA18254 for cvs-bin-outgoing; Fri, 30 Dec 1994 05:13:42 -0800 Received: (from bde@localhost) by freefall.cdrom.com (8.6.9/8.6.6) id FAA18228; Fri, 30 Dec 1994 05:12:14 -0800 Date: Fri, 30 Dec 1994 05:12:14 -0800 From: Bruce Evans Message-Id: <199412301312.FAA18228@freefall.cdrom.com> To: cvs-bin, CVS-commiters Subject: cvs commit: src/bin/cp cp.c Sender: cvs-bin-owner@FreeBSD.org Precedence: bulk bde 94/12/30 05:12:13 Modified: bin/cp cp.c Log: Don't strip off the last slash in the pathname "/". cp used to stat the pathname "" in order to decide that the pathname "/" is a directory. This caused `cp kernel /' to fail if the kernel has the POSIX behaviour of not allowing the pathname "" to be an alias for ".". It presumably also caused `cp /etc/motd /' to fail in the unlikely event that "." is not stat'able. Be more careful about concatenating pathnames: don't check that the pathname fits until prefixes have been discarded (the check was too strict). Print the final pathname in error messages. Terminate the target directory name properly for error messages. Don't add a slash between components if there is already a slash.