Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 6 Apr 2018 19:34:21 +0000 (UTC)
From:      Kyle Evans <kevans@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org
Subject:   svn commit: r332141 - stable/11/stand/libsa
Message-ID:  <201804061934.w36JYLJD032971@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: kevans
Date: Fri Apr  6 19:34:21 2018
New Revision: 332141
URL: https://svnweb.freebsd.org/changeset/base/332141

Log:
  MFC r330056: libsa: replace remaining _write callbacks by null_write
  
  There are some _write callbacks left only returning EROFS, replace them
  by null_write. return EROFS from null_write().

Modified:
  stable/11/stand/libsa/cd9660.c
  stable/11/stand/libsa/nullfs.c
  stable/11/stand/libsa/tftp.c
Directory Properties:
  stable/11/   (props changed)

Modified: stable/11/stand/libsa/cd9660.c
==============================================================================
--- stable/11/stand/libsa/cd9660.c	Fri Apr  6 19:24:04 2018	(r332140)
+++ stable/11/stand/libsa/cd9660.c	Fri Apr  6 19:34:21 2018	(r332141)
@@ -66,8 +66,6 @@ static int	cd9660_open(const char *path, struct open_f
 static int	cd9660_close(struct open_file *f);
 static int	cd9660_read(struct open_file *f, void *buf, size_t size,
 		    size_t *resid);
-static int	cd9660_write(struct open_file *f, const void *buf, size_t size,
-		    size_t *resid);
 static off_t	cd9660_seek(struct open_file *f, off_t offset, int where);
 static int	cd9660_stat(struct open_file *f, struct stat *sb);
 static int	cd9660_readdir(struct open_file *f, struct dirent *d);
@@ -86,7 +84,7 @@ struct fs_ops cd9660_fsops = {
 	cd9660_open,
 	cd9660_close,
 	cd9660_read,
-	cd9660_write,
+	null_write,
 	cd9660_seek,
 	cd9660_stat,
 	cd9660_readdir
@@ -554,13 +552,6 @@ again:
 
 	fp->f_off += isonum_711(ep->length);
 	return (0);
-}
-
-static int
-cd9660_write(struct open_file *f __unused, const void *buf __unused,
-    size_t size __unused, size_t *resid __unused)
-{
-	return EROFS;
 }
 
 static off_t

Modified: stable/11/stand/libsa/nullfs.c
==============================================================================
--- stable/11/stand/libsa/nullfs.c	Fri Apr  6 19:24:04 2018	(r332140)
+++ stable/11/stand/libsa/nullfs.c	Fri Apr  6 19:34:21 2018	(r332141)
@@ -85,7 +85,7 @@ int	null_read (struct open_file *f, void *buf, size_t 
 
 int	null_write (struct open_file *f, const void *buf, size_t size, size_t *resid)
 {
-	return EIO;
+	return EROFS;
 }
 
 off_t	null_seek (struct open_file *f, off_t offset, int where)

Modified: stable/11/stand/libsa/tftp.c
==============================================================================
--- stable/11/stand/libsa/tftp.c	Fri Apr  6 19:24:04 2018	(r332140)
+++ stable/11/stand/libsa/tftp.c	Fri Apr  6 19:34:21 2018	(r332141)
@@ -69,8 +69,6 @@ static int	tftp_open(const char *path, struct open_fil
 static int	tftp_close(struct open_file *f);
 static int	tftp_parse_oack(struct tftp_handle *h, char *buf, size_t len);
 static int	tftp_read(struct open_file *f, void *buf, size_t size, size_t *resid);
-static int	tftp_write(struct open_file *f, const void *buf, size_t size,
-		size_t *resid);
 static off_t	tftp_seek(struct open_file *f, off_t offset, int where);
 static int	tftp_set_blksize(struct tftp_handle *h, const char *str);
 static int	tftp_stat(struct open_file *f, struct stat *sb);
@@ -80,7 +78,7 @@ struct fs_ops tftp_fsops = {
 	tftp_open,
 	tftp_close,
 	tftp_read,
-	tftp_write,
+	null_write,
 	tftp_seek,
 	tftp_stat,
 	null_readdir
@@ -572,13 +570,6 @@ tftp_close(struct open_file *f)
 	}
 	is_open = 0;
 	return (0);
-}
-
-static int
-tftp_write(struct open_file *f __unused, const void *start __unused,
-    size_t size __unused, size_t *resid __unused /* out */)
-{
-	return (EROFS);
 }
 
 static int 



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