From 5026cf8dae6b0bd58684c51641c5f9324bcd48f6 Mon Sep 17 00:00:00 2001 From: brueffer Date: Tue, 14 Jul 2015 10:49:36 +0000 Subject: Unbreak ggatec and ggatel on i386 after r238119, which added two more 'struct g_gate_ctl_create' fields. While the behaviour was technically undefined on other architectures as well, on the reporter's amd64 systems the uninitialized bytes the kernel cares about were always zero so everything worked as expected. PR: 197309, 199559 Submitted by: ota@j.email.ne.jp, Fabian Keil Reviewed by: pjd MFC after: 1 week --- sbin/ggate/ggatec/ggatec.c | 1 + 1 file changed, 1 insertion(+) (limited to 'sbin/ggate/ggatec') diff --git a/sbin/ggate/ggatec/ggatec.c b/sbin/ggate/ggatec/ggatec.c index 6f9263c..ea4f701 100644 --- a/sbin/ggate/ggatec/ggatec.c +++ b/sbin/ggate/ggatec/ggatec.c @@ -447,6 +447,7 @@ g_gatec_create(void) /* * Ok, got both sockets, time to create provider. */ + memset(&ggioc, 0, sizeof(ggioc)); ggioc.gctl_version = G_GATE_VERSION; ggioc.gctl_mediasize = mediasize; ggioc.gctl_sectorsize = sectorsize; -- cgit v1.1