- jmc@cvs.openbsd.org 2004/11/29 00:05:17
[sftp.1]
missing full stop;
+ - djm@cvs.openbsd.org 2004/11/29 07:41:24
+ [sftp-client.h sftp.c]
+ Some small fixes from moritz@jodeit.org. ok deraadt@
20041203
- (dtucker) OpenBSD CVS Sync
-/* $OpenBSD: sftp-client.h,v 1.12 2004/02/17 05:39:51 djm Exp $ */
+/* $OpenBSD: sftp-client.h,v 1.13 2004/11/29 07:41:24 djm Exp $ */
/*
* Copyright (c) 2001-2004 Damien Miller <djm@openbsd.org>
};
/*
- * Initialiase a SSH filexfer connection. Returns -1 on error or
- * protocol version on success.
+ * Initialiase a SSH filexfer connection. Returns NULL on error or
+ * a pointer to a initialized sftp_conn struct on success.
*/
struct sftp_conn *do_init(int, int, u_int, u_int);
#include "includes.h"
-RCSID("$OpenBSD: sftp.c,v 1.58 2004/11/25 22:22:14 markus Exp $");
+RCSID("$OpenBSD: sftp.c,v 1.59 2004/11/29 07:41:24 djm Exp $");
#ifdef USE_LIBEDIT
#include <histedit.h>
cmd_interrupt(int signo)
{
const char msg[] = "\rInterrupt \n";
+ int olderrno = errno;
write(STDERR_FILENO, msg, sizeof(msg) - 1);
interrupted = 1;
+ errno = olderrno;
}
static void
return (xstrdup(path));
len = strlen(strip);
- if (strip != NULL && strncmp(path, strip, len) == 0) {
+ if (strncmp(path, strip, len) == 0) {
if (strip[len - 1] != '/' && path[len] == '/')
len++;
return (xstrdup(path + len));