Date: Fri, 2 Feb 2018 00:07:39 +0000 (UTC) From: Kirk McKusick <mckusick@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r328763 - head/sbin/fsck_ffs Message-ID: <201802020007.w1207dWn067046@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: mckusick Date: Fri Feb 2 00:07:38 2018 New Revision: 328763 URL: https://svnweb.freebsd.org/changeset/base/328763 Log: Use sbput(3) rather than sbwrite(3) to ensure that the updated copy of the superblock gets written. Reported by: Mark Johnston <markj@FreeBSD.org> Modified: head/sbin/fsck_ffs/suj.c Modified: head/sbin/fsck_ffs/suj.c ============================================================================== --- head/sbin/fsck_ffs/suj.c Fri Feb 2 00:01:50 2018 (r328762) +++ head/sbin/fsck_ffs/suj.c Fri Feb 2 00:07:38 2018 (r328763) @@ -213,8 +213,8 @@ closedisk(const char *devnam) fs->fs_clean = 1; fs->fs_time = time(NULL); fs->fs_mtime = time(NULL); - if (sbwrite(&disk, 0) == -1) - err(EX_OSERR, "sbwrite(%s)", devnam); + if (sbput(disk.d_fd, fs, 0) == -1) + err(EX_OSERR, "sbput(%s)", devnam); if (ufs_disk_close(&disk) == -1) err(EX_OSERR, "ufs_disk_close(%s)", devnam); fs = NULL;
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201802020007.w1207dWn067046>