From fbe84585a0324f2be1fb021323deb7f116ce0255 Mon Sep 17 00:00:00 2001 From: pooka Date: Tue, 22 Feb 2011 15:03:30 +0000 Subject: [PATCH] -f no longer has effect. from Snader_LB on irc. --- usr.bin/touch/touch.1 | 7 +++---- usr.bin/touch/touch.c | 9 ++++----- 2 files changed, 7 insertions(+), 9 deletions(-) diff --git a/usr.bin/touch/touch.1 b/usr.bin/touch/touch.1 index 89bbd7f44338..407b3e5023fa 100644 --- a/usr.bin/touch/touch.1 +++ b/usr.bin/touch/touch.1 @@ -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 diff --git a/usr.bin/touch/touch.c b/usr.bin/touch/touch.c index 40ef858414bd..24c0f1737466 100644 --- a/usr.bin/touch/touch.c +++ b/usr.bin/touch/touch.c @@ -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 @@ -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;