- djm@cvs.openbsd.org 2013/08/06 23:03:49

[sftp.c]
     fix some whitespace at EOL
     make list of commands an enum rather than a long list of defines
     add -a to usage()
This commit is contained in:
Damien Miller 2013-08-21 02:38:51 +10:00
parent acd2060f75
commit 02e878070d
2 changed files with 62 additions and 52 deletions

View File

@ -1,3 +1,11 @@
20130821
- (djm) OpenBSD CVS Sync
- djm@cvs.openbsd.org 2013/08/06 23:03:49
[sftp.c]
fix some whitespace at EOL
make list of commands an enum rather than a long list of defines
add -a to usage()
20130808
- (dtucker) [regress/Makefile regress/test-exec.sh] Don't try to use test -nt
since some platforms (eg really old FreeBSD) don't have it. Instead,

58
sftp.c
View File

@ -1,4 +1,4 @@
/* $OpenBSD: sftp.c,v 1.148 2013/07/25 00:56:52 djm Exp $ */
/* $OpenBSD: sftp.c,v 1.149 2013/08/06 23:03:49 djm Exp $ */
/*
* Copyright (c) 2001-2004 Damien Miller <djm@openbsd.org>
*
@ -129,32 +129,34 @@ extern char *__progname;
#define SORT_FLAGS (LS_NAME_SORT|LS_TIME_SORT|LS_SIZE_SORT)
/* Commands for interactive mode */
#define I_CHDIR 1
#define I_CHGRP 2
#define I_CHMOD 3
#define I_CHOWN 4
#define I_DF 24
#define I_GET 5
#define I_HELP 6
#define I_LCHDIR 7
#define I_LINK 25
#define I_LLS 8
#define I_LMKDIR 9
#define I_LPWD 10
#define I_LS 11
#define I_LUMASK 12
#define I_MKDIR 13
#define I_PUT 14
#define I_PWD 15
#define I_QUIT 16
#define I_RENAME 17
#define I_RM 18
#define I_RMDIR 19
#define I_SHELL 20
#define I_SYMLINK 21
#define I_VERSION 22
#define I_PROGRESS 23
#define I_REGET 26
enum sftp_command {
I_CHDIR = 1,
I_CHGRP,
I_CHMOD,
I_CHOWN,
I_DF,
I_GET,
I_HELP,
I_LCHDIR,
I_LINK,
I_LLS,
I_LMKDIR,
I_LPWD,
I_LS,
I_LUMASK,
I_MKDIR,
I_PUT,
I_PWD,
I_QUIT,
I_RENAME,
I_RM,
I_RMDIR,
I_SHELL,
I_SYMLINK,
I_VERSION,
I_PROGRESS,
I_REGET,
};
struct CMD {
const char *c;
@ -2116,7 +2118,7 @@ usage(void)
extern char *__progname;
fprintf(stderr,
"usage: %s [-1246Cpqrv] [-B buffer_size] [-b batchfile] [-c cipher]\n"
"usage: %s [-1246Capqrv] [-B buffer_size] [-b batchfile] [-c cipher]\n"
" [-D sftp_server_path] [-F ssh_config] "
"[-i identity_file] [-l limit]\n"
" [-o ssh_option] [-P port] [-R num_requests] "