summaryrefslogtreecommitdiff
path: root/misc/dahdi-kmod/files/patch-freebsd-drivers-dahdi-dahdi-base.c
blob: 6b928dff60e5cd2c460098deefb694309651e321 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
--- freebsd/drivers/dahdi/dahdi-base.c.orig	2015-03-22 00:41:01.893409000 +0600
+++ freebsd/drivers/dahdi/dahdi-base.c	2015-03-22 00:47:34.870157000 +0600
@@ -4344,8 +4344,7 @@
 		if (spans[i]->manufacturer)
 			dahdi_copy_string(stack.spaninfo.manufacturer, spans[i]->manufacturer,
 				sizeof(stack.spaninfo.manufacturer));
-		if (spans[i]->devicetype)
-			dahdi_copy_string(stack.spaninfo.devicetype, spans[i]->devicetype, sizeof(stack.spaninfo.devicetype));
+		dahdi_copy_string(stack.spaninfo.devicetype, spans[i]->devicetype, sizeof(stack.spaninfo.devicetype));
 		dahdi_copy_string(stack.spaninfo.location, spans[i]->location, sizeof(stack.spaninfo.location));
 		if (spans[i]->spantype)
 			dahdi_copy_string(stack.spaninfo.spantype, spans[i]->spantype, sizeof(stack.spaninfo.spantype));
@@ -4406,10 +4405,9 @@
 			dahdi_copy_string(stack.spaninfo_v1.manufacturer,
 				spans[i]->manufacturer,
 				sizeof(stack.spaninfo_v1.manufacturer));
-		if (spans[i]->devicetype)
-			dahdi_copy_string(stack.spaninfo_v1.devicetype,
-					  spans[i]->devicetype,
-					  sizeof(stack.spaninfo_v1.devicetype));
+		dahdi_copy_string(stack.spaninfo_v1.devicetype,
+				  spans[i]->devicetype,
+				  sizeof(stack.spaninfo_v1.devicetype));
 		dahdi_copy_string(stack.spaninfo_v1.location,
 				  spans[i]->location,
 				  sizeof(stack.spaninfo_v1.location));
@@ -9263,7 +9261,9 @@
 	.d_poll		= dahdi_device_poll,
 	.d_mmap		= dahdi_device_mmap,
 	.d_name		= "dahdi",
-#if __FreeBSD_version >= 800039
+#if __FreeBSD_version >= 1000000
+	.d_flags	= D_TRACKCLOSE | D_NEEDMINOR,
+#elif __FreeBSD_version >= 800039
 	.d_flags	= D_PSEUDO | D_TRACKCLOSE | D_NEEDMINOR
 #else
 	.d_flags	= D_PSEUDO | D_TRACKCLOSE