From owner-svn-ports-all@freebsd.org Wed Jan 31 20:44:30 2018 Return-Path: Delivered-To: svn-ports-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 0D548EE0B30; Wed, 31 Jan 2018 20:44:30 +0000 (UTC) (envelope-from mi@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id B5AF1774FC; Wed, 31 Jan 2018 20:44:29 +0000 (UTC) (envelope-from mi@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id B06452AEE1; Wed, 31 Jan 2018 20:44:29 +0000 (UTC) (envelope-from mi@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w0VKiTON020389; Wed, 31 Jan 2018 20:44:29 GMT (envelope-from mi@FreeBSD.org) Received: (from mi@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w0VKiTcw020388; Wed, 31 Jan 2018 20:44:29 GMT (envelope-from mi@FreeBSD.org) Message-Id: <201801312044.w0VKiTcw020388@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mi set sender to mi@FreeBSD.org using -f From: Mikhail Teterin Date: Wed, 31 Jan 2018 20:44:29 +0000 (UTC) To: ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org Subject: svn commit: r460528 - head/sysutils/fusefs-smbnetfs/files X-SVN-Group: ports-head X-SVN-Commit-Author: mi X-SVN-Commit-Paths: head/sysutils/fusefs-smbnetfs/files X-SVN-Commit-Revision: 460528 X-SVN-Commit-Repository: ports MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-ports-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for the ports tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 31 Jan 2018 20:44:30 -0000 Author: mi Date: Wed Jan 31 20:44:29 2018 New Revision: 460528 URL: https://svnweb.freebsd.org/changeset/ports/460528 Log: Actually add the patch advertized earlier. Reported by: tijl Added: head/sysutils/fusefs-smbnetfs/files/patch-3 (contents, props changed) Added: head/sysutils/fusefs-smbnetfs/files/patch-3 ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sysutils/fusefs-smbnetfs/files/patch-3 Wed Jan 31 20:44:29 2018 (r460528) @@ -0,0 +1,117 @@ +Part of the: + + https://sourceforge.net/p/smbnetfs/patches/3/ + +--- src/samba.h 2018-01-04 20:59:38.000000000 +0000 ++++ src/samba.h 2018-01-31 14:48:19.375119000 +0000 +@@ -16,6 +16,6 @@ + samba_fd samba_open (const char *url, int flags, mode_t mode); + samba_fd samba_creat (const char *url, mode_t mode); +-ssize_t samba_read (samba_fd fd, off_t offset, void *buf, size_t bufsize); +-ssize_t samba_write (samba_fd fd, off_t offset, void *buf, size_t bufsize); ++ssize_t samba_read (samba_fd fd, off_t offset, char *buf, size_t bufsize); ++ssize_t samba_write (samba_fd fd, off_t offset, const char *buf, size_t bufsize); + int samba_close (samba_fd fd); + int samba_unlink (const char *url); +--- src/samba.c 2018-01-04 20:59:38.000000000 +0000 ++++ src/samba.c 2018-01-31 14:49:26.546183000 +0000 +@@ -255,5 +255,5 @@ + } + +-ssize_t samba_read(samba_fd fd, off_t offset, void *buf, size_t bufsize){ ++ssize_t samba_read(samba_fd fd, off_t offset, char *buf, size_t bufsize){ + ssize_t result = 0; + +@@ -278,5 +278,5 @@ + } + +-ssize_t samba_write(samba_fd fd, off_t offset, void *buf, size_t bufsize){ ++ssize_t samba_write(samba_fd fd, off_t offset, const char *buf, size_t bufsize){ + ssize_t result = 0; + +Constify the writing and reduce the number of calls to time(). + + -mi + +--- src/smb_conn.h 2018-01-04 20:59:38 ++++ src/smb_conn.h 2018-01-31 14:55:24 +@@ -46,5 +46,5 @@ + ssize_t smb_conn_write(struct smb_conn_ctx *ctx, + smb_conn_fd fd, off_t offset, +- void *buf, size_t bufsize); ++ const void *buf, size_t bufsize); + int smb_conn_close(struct smb_conn_ctx *ctx, + smb_conn_fd fd); +--- src/smb_conn.c 2018-01-04 20:59:38 ++++ src/smb_conn.c 2018-01-31 14:54:37 +@@ -630,6 +630,5 @@ + + pthread_mutex_lock(&ctx->mutex); +- ctx->access_time = time(NULL); +- file->access_time = time(NULL); ++ ctx->access_time = file->access_time = time(NULL); + error = smb_conn_process_query( + ctx, OPEN, +@@ -676,6 +675,5 @@ + + pthread_mutex_lock(&ctx->mutex); +- ctx->access_time = time(NULL); +- file->access_time = time(NULL); ++ ctx->access_time = file->access_time = time(NULL); + error = smb_conn_process_query( + ctx, CREAT, +@@ -719,6 +717,5 @@ + pthread_mutex_lock(&ctx->mutex); + if ((file->reopen_cmd == OPEN) && (file->ctx == ctx)){ +- ctx->access_time = time(NULL); +- file->access_time = time(NULL); ++ ctx->access_time = file->access_time = time(NULL); + error = smb_conn_process_fd_query( + ctx, READ, file, +@@ -740,5 +737,5 @@ + ssize_t smb_conn_write(struct smb_conn_ctx *ctx, + smb_conn_fd fd, off_t offset, +- void *buf, size_t bufsize){ ++ const void *buf, size_t bufsize){ + + int error; +@@ -762,6 +759,5 @@ + pthread_mutex_lock(&ctx->mutex); + if ((file->reopen_cmd == OPEN) && (file->ctx == ctx)){ +- ctx->access_time = time(NULL); +- file->access_time = time(NULL); ++ ctx->access_time = file->access_time = time(NULL); + memcpy(ctx->shmem_ptr, buf, bufsize); + msync(ctx->shmem_ptr, bufsize, MS_SYNC); +@@ -886,6 +882,5 @@ + + pthread_mutex_lock(&ctx->mutex); +- ctx->access_time = time(NULL); +- file->access_time = time(NULL); ++ ctx->access_time = file->access_time = time(NULL); + error = smb_conn_process_query( + ctx, OPENDIR, +@@ -964,6 +959,5 @@ + pthread_mutex_lock(&ctx->mutex); + if ((file->reopen_cmd == OPENDIR) && (file->ctx == ctx)){ +- ctx->access_time = time(NULL); +- file->access_time = time(NULL); ++ ctx->access_time = file->access_time = time(NULL); + + /* we cant reopen directory with non-zero offset, so use */ +@@ -1104,6 +1098,5 @@ + pthread_mutex_lock(&ctx->mutex); + if ((file->reopen_cmd == OPEN) && (file->ctx == ctx)){ +- ctx->access_time = time(NULL); +- file->access_time = time(NULL); ++ ctx->access_time = file->access_time = time(NULL); + error = smb_conn_process_fd_query( + ctx, FSTAT, file, +@@ -1141,6 +1134,5 @@ + pthread_mutex_lock(&ctx->mutex); + if ((file->reopen_cmd == OPEN) && (file->ctx == ctx)){ +- ctx->access_time = time(NULL); +- file->access_time = time(NULL); ++ ctx->access_time = file->access_time = time(NULL); + error = smb_conn_process_fd_query( + ctx, FTRUNCATE, file,