Module Name: src
Committed By: christos
Date: Tue Dec 1 01:49:23 UTC 2015
Modified Files:
src/sbin/gpt: gpt.c
Log Message:
only update the wedge information if it is supported.
To generate a diff of this commit:
cvs rdiff -u -r1.46 -r1.47 src/sbin/gpt/gpt.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/sbin/gpt/gpt.c
diff -u src/sbin/gpt/gpt.c:1.46 src/sbin/gpt/gpt.c:1.47
--- src/sbin/gpt/gpt.c:1.46 Mon Nov 30 14:59:34 2015
+++ src/sbin/gpt/gpt.c Mon Nov 30 20:49:23 2015
@@ -35,7 +35,7 @@
__FBSDID("$FreeBSD: src/sbin/gpt/gpt.c,v 1.16 2006/07/07 02:44:23 marcel Exp $");
#endif
#ifdef __RCSID
-__RCSID("$NetBSD: gpt.c,v 1.46 2015/11/30 19:59:34 christos Exp $");
+__RCSID("$NetBSD: gpt.c,v 1.47 2015/12/01 01:49:23 christos Exp $");
#endif
#include <sys/param.h>
@@ -572,11 +572,14 @@ gpt_open(const char *dev, int flags)
void
gpt_close(int fd)
{
- int bits;
- if (modified && !nosync)
+ if (modified && !nosync) {
+#ifdef DIOCMWEDGES
+ int bits;
if (ioctl(fd, DIOCMWEDGES, &bits) == -1)
warn("Can't update wedge information");
+#endif
+ }
/* XXX post processing? */
close(fd);