Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/usr.bin/ftp Use "r+" instead of "r+w", since the latter is n...



details:   https://anonhg.NetBSD.org/src/rev/be9ee6b64de0
branches:  trunk
changeset: 526611:be9ee6b64de0
user:      lukem <lukem%NetBSD.org@localhost>
date:      Tue May 07 02:04:09 2002 +0000

description:
Use "r+" instead of "r+w", since the latter is not standard.
Noted by <Steve.McClellan%radisys.com@localhost> in private email.

diffstat:

 usr.bin/ftp/cmds.c |  14 +++++++-------
 usr.bin/ftp/ftp.c  |   6 +++---
 2 files changed, 10 insertions(+), 10 deletions(-)

diffs (89 lines):

diff -r fb3aea305dee -r be9ee6b64de0 usr.bin/ftp/cmds.c
--- a/usr.bin/ftp/cmds.c        Tue May 07 02:02:41 2002 +0000
+++ b/usr.bin/ftp/cmds.c        Tue May 07 02:04:09 2002 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: cmds.c,v 1.96 2002/05/06 14:36:41 lukem Exp $  */
+/*     $NetBSD: cmds.c,v 1.97 2002/05/07 02:04:09 lukem Exp $  */
 
 /*-
  * Copyright (c) 1996-2001 The NetBSD Foundation, Inc.
@@ -107,7 +107,7 @@
 #if 0
 static char sccsid[] = "@(#)cmds.c     8.6 (Berkeley) 10/9/94";
 #else
-__RCSID("$NetBSD: cmds.c,v 1.96 2002/05/06 14:36:41 lukem Exp $");
+__RCSID("$NetBSD: cmds.c,v 1.97 2002/05/07 02:04:09 lukem Exp $");
 #endif
 #endif /* not lint */
 
@@ -540,14 +540,14 @@
 reget(int argc, char *argv[])
 {
 
-       (void)getit(argc, argv, 1, "r+w");
+       (void)getit(argc, argv, 1, "r+");
 }
 
 void
 get(int argc, char *argv[])
 {
 
-       (void)getit(argc, argv, 0, restart_point ? "r+w" : "w" );
+       (void)getit(argc, argv, 0, restart_point ? "r+" : "w" );
 }
 
 /*
@@ -713,7 +713,7 @@
                        else
                                warn("stat %s", tp);
                }
-               recvrequest("RETR", tp, cp, restart_point ? "r+w" : "w",
+               recvrequest("RETR", tp, cp, restart_point ? "r+" : "w",
                    tp != cp || !interactive, 1);
                restart_point = 0;
                if (!mflag && fromatty) {
@@ -751,7 +751,7 @@
        }
 
        argv[0] = "get";
-       mode = restart_point ? "r+w" : "w";
+       mode = restart_point ? "r+" : "w";
 
        for (;
            (buf = fparseln(fp, NULL, NULL, "\0\0\0", 0)) != NULL;
@@ -2550,7 +2550,7 @@
        orestart_point = restart_point;
        overbose = verbose;
        hash = restart_point = verbose = 0;
-       recvrequest("RETR", pager, argv[1], "r+w", 1, 0);
+       recvrequest("RETR", pager, argv[1], "r+", 1, 0);
        hash = ohash;
        restart_point = orestart_point;
        verbose = overbose;
diff -r fb3aea305dee -r be9ee6b64de0 usr.bin/ftp/ftp.c
--- a/usr.bin/ftp/ftp.c Tue May 07 02:02:41 2002 +0000
+++ b/usr.bin/ftp/ftp.c Tue May 07 02:04:09 2002 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: ftp.c,v 1.118 2002/04/25 10:55:43 itojun Exp $ */
+/*     $NetBSD: ftp.c,v 1.119 2002/05/07 02:04:09 lukem Exp $  */
 
 /*-
  * Copyright (c) 1996-2001 The NetBSD Foundation, Inc.
@@ -103,7 +103,7 @@
 #if 0
 static char sccsid[] = "@(#)ftp.c      8.6 (Berkeley) 10/27/94";
 #else
-__RCSID("$NetBSD: ftp.c,v 1.118 2002/04/25 10:55:43 itojun Exp $");
+__RCSID("$NetBSD: ftp.c,v 1.119 2002/05/07 02:04:09 lukem Exp $");
 #endif
 #endif /* not lint */
 
@@ -736,7 +736,7 @@
                }
                if (command("REST " LLF, (LLT)restart_point) != CONTINUE)
                        goto cleanupsend;
-               lmode = "r+w";
+               lmode = "r+";
        }
        if (remote) {
                if (command("%s %s", cmd, remote) != PRELIM)



Home | Main Index | Thread Index | Old Index