-f no longer has effect. from Snader_LB on irc.

This commit is contained in:
pooka 2011-02-22 15:03:30 +00:00
parent 68b1a98bc8
commit fbe84585a0
2 changed files with 7 additions and 9 deletions

View File

@ -1,4 +1,4 @@
.\" $NetBSD: touch.1,v 1.16 2003/08/07 11:16:44 agc Exp $
.\" $NetBSD: touch.1,v 1.17 2011/02/22 15:03:30 pooka Exp $
.\"
.\" Copyright (c) 1991, 1993
.\" The Regents of the University of California. All rights reserved.
@ -32,7 +32,7 @@
.\"
.\" @(#)touch.1 8.3 (Berkeley) 4/28/95
.\"
.Dd April 28, 1995
.Dd February 22, 2011
.Dt TOUCH 1
.Os
.Sh NAME
@ -65,8 +65,7 @@ The
utility does not treat this as an error.
No error messages are displayed and the exit value is not affected.
.It Fl f
Attempt to force the update, even if the file permissions do not
currently permit it.
This flag has no effect; it is accepted for compatibility reasons.
.It Fl h
If
.Ar file

View File

@ -1,4 +1,4 @@
/* $NetBSD: touch.c,v 1.28 2009/04/28 02:47:12 yamt Exp $ */
/* $NetBSD: touch.c,v 1.29 2011/02/22 15:03:30 pooka Exp $ */
/*
* Copyright (c) 1993
@ -39,7 +39,7 @@ __COPYRIGHT("@(#) Copyright (c) 1993\
#if 0
static char sccsid[] = "@(#)touch.c 8.2 (Berkeley) 4/28/95";
#endif
__RCSID("$NetBSD: touch.c,v 1.28 2009/04/28 02:47:12 yamt Exp $");
__RCSID("$NetBSD: touch.c,v 1.29 2011/02/22 15:03:30 pooka Exp $");
#endif /* not lint */
#include <sys/types.h>
@ -71,14 +71,14 @@ main(argc, argv)
{
struct stat sb;
struct timeval tv[2];
int aflag, cflag, fflag, hflag, mflag, ch, fd, len, rval, timeset;
int aflag, cflag, hflag, mflag, ch, fd, len, rval, timeset;
char *p;
int (*change_file_times) __P((const char *, const struct timeval *));
int (*get_file_status) __P((const char *, struct stat *));
setlocale(LC_ALL, "");
aflag = cflag = fflag = hflag = mflag = timeset = 0;
aflag = cflag = hflag = mflag = timeset = 0;
if (gettimeofday(&tv[0], NULL))
err(1, "gettimeofday");
@ -91,7 +91,6 @@ main(argc, argv)
cflag = 1;
break;
case 'f':
fflag = 1;
break;
case 'h':
hflag = 1;