ggatec.c (241720) | ggatec.c (285531) |
---|---|
1/*- 2 * Copyright (c) 2004 Pawel Jakub Dawidek <pjd@FreeBSD.org> 3 * All rights reserved. 4 * 5 * Redistribution and use in source and binary forms, with or without 6 * modification, are permitted provided that the following conditions 7 * are met: 8 * 1. Redistributions of source code must retain the above copyright --- 9 unchanged lines hidden (view full) --- 18 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 19 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 20 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 21 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 22 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 23 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 24 * SUCH DAMAGE. 25 * | 1/*- 2 * Copyright (c) 2004 Pawel Jakub Dawidek <pjd@FreeBSD.org> 3 * All rights reserved. 4 * 5 * Redistribution and use in source and binary forms, with or without 6 * modification, are permitted provided that the following conditions 7 * are met: 8 * 1. Redistributions of source code must retain the above copyright --- 9 unchanged lines hidden (view full) --- 18 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 19 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 20 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 21 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 22 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 23 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 24 * SUCH DAMAGE. 25 * |
26 * $FreeBSD: head/sbin/ggate/ggatec/ggatec.c 241720 2012-10-19 05:43:38Z ed $ | 26 * $FreeBSD: head/sbin/ggate/ggatec/ggatec.c 285531 2015-07-14 10:49:36Z brueffer $ |
27 */ 28 29#include <stdio.h> 30#include <stdlib.h> 31#include <stdint.h> 32#include <fcntl.h> 33#include <unistd.h> 34#include <string.h> --- 407 unchanged lines hidden (view full) --- 442 struct g_gate_ctl_create ggioc; 443 444 if (!g_gatec_connect()) 445 g_gate_xlog("Cannot connect: %s.", strerror(errno)); 446 447 /* 448 * Ok, got both sockets, time to create provider. 449 */ | 27 */ 28 29#include <stdio.h> 30#include <stdlib.h> 31#include <stdint.h> 32#include <fcntl.h> 33#include <unistd.h> 34#include <string.h> --- 407 unchanged lines hidden (view full) --- 442 struct g_gate_ctl_create ggioc; 443 444 if (!g_gatec_connect()) 445 g_gate_xlog("Cannot connect: %s.", strerror(errno)); 446 447 /* 448 * Ok, got both sockets, time to create provider. 449 */ |
450 memset(&ggioc, 0, sizeof(ggioc)); |
|
450 ggioc.gctl_version = G_GATE_VERSION; 451 ggioc.gctl_mediasize = mediasize; 452 ggioc.gctl_sectorsize = sectorsize; 453 ggioc.gctl_flags = flags; 454 ggioc.gctl_maxcount = queue_size; 455 ggioc.gctl_timeout = timeout; 456 ggioc.gctl_unit = unit; 457 snprintf(ggioc.gctl_info, sizeof(ggioc.gctl_info), "%s:%u %s", host, --- 185 unchanged lines hidden --- | 451 ggioc.gctl_version = G_GATE_VERSION; 452 ggioc.gctl_mediasize = mediasize; 453 ggioc.gctl_sectorsize = sectorsize; 454 ggioc.gctl_flags = flags; 455 ggioc.gctl_maxcount = queue_size; 456 ggioc.gctl_timeout = timeout; 457 ggioc.gctl_unit = unit; 458 snprintf(ggioc.gctl_info, sizeof(ggioc.gctl_info), "%s:%u %s", host, --- 185 unchanged lines hidden --- |