Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 31 Jan 2018 20:44:29 +0000 (UTC)
From:      Mikhail Teterin <mi@FreeBSD.org>
To:        ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org
Subject:   svn commit: r460528 - head/sysutils/fusefs-smbnetfs/files
Message-ID:  <201801312044.w0VKiTcw020388@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
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,



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201801312044.w0VKiTcw020388>