From owner-svn-src-head@freebsd.org Tue Feb 27 12:53:26 2018 Return-Path: Delivered-To: svn-src-head@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 8D873F22CF5; Tue, 27 Feb 2018 12:53:26 +0000 (UTC) (envelope-from tsoome@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 3A92474A10; Tue, 27 Feb 2018 12:53:26 +0000 (UTC) (envelope-from tsoome@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 350042984; Tue, 27 Feb 2018 12:53:26 +0000 (UTC) (envelope-from tsoome@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w1RCrQU0058518; Tue, 27 Feb 2018 12:53:26 GMT (envelope-from tsoome@FreeBSD.org) Received: (from tsoome@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w1RCrPn7058515; Tue, 27 Feb 2018 12:53:25 GMT (envelope-from tsoome@FreeBSD.org) Message-Id: <201802271253.w1RCrPn7058515@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: tsoome set sender to tsoome@FreeBSD.org using -f From: Toomas Soome Date: Tue, 27 Feb 2018 12:53:25 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r330056 - head/stand/libsa X-SVN-Group: head X-SVN-Commit-Author: tsoome X-SVN-Commit-Paths: head/stand/libsa X-SVN-Commit-Revision: 330056 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 27 Feb 2018 12:53:26 -0000 Author: tsoome Date: Tue Feb 27 12:53:25 2018 New Revision: 330056 URL: https://svnweb.freebsd.org/changeset/base/330056 Log: 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(). Reviewed by: cem, imp, kan Differential Revision: https://reviews.freebsd.org/D14523 Modified: head/stand/libsa/cd9660.c head/stand/libsa/nullfs.c head/stand/libsa/tftp.c Modified: head/stand/libsa/cd9660.c ============================================================================== --- head/stand/libsa/cd9660.c Tue Feb 27 10:55:33 2018 (r330055) +++ head/stand/libsa/cd9660.c Tue Feb 27 12:53:25 2018 (r330056) @@ -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: head/stand/libsa/nullfs.c ============================================================================== --- head/stand/libsa/nullfs.c Tue Feb 27 10:55:33 2018 (r330055) +++ head/stand/libsa/nullfs.c Tue Feb 27 12:53:25 2018 (r330056) @@ -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: head/stand/libsa/tftp.c ============================================================================== --- head/stand/libsa/tftp.c Tue Feb 27 10:55:33 2018 (r330055) +++ head/stand/libsa/tftp.c Tue Feb 27 12:53:25 2018 (r330056) @@ -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