Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sbin/gpt only update the wedge information if it is supported.
details: https://anonhg.NetBSD.org/src/rev/407595e33e89
branches: trunk
changeset: 341960:407595e33e89
user: christos <christos%NetBSD.org@localhost>
date: Tue Dec 01 01:49:23 2015 +0000
description:
only update the wedge information if it is supported.
diffstat:
sbin/gpt/gpt.c | 9 ++++++---
1 files changed, 6 insertions(+), 3 deletions(-)
diffs (29 lines):
diff -r 8eb9bfb8211c -r 407595e33e89 sbin/gpt/gpt.c
--- a/sbin/gpt/gpt.c Tue Dec 01 01:19:02 2015 +0000
+++ b/sbin/gpt/gpt.c Tue Dec 01 01:49:23 2015 +0000
@@ -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 @@
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);
Home |
Main Index |
Thread Index |
Old Index