summaryrefslogtreecommitdiffstats
path: root/kernel/drivers/isdn/capi/Kconfig
blob: 7641b3096ea67627a9a77b708380f4c681ed0ab9 (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
38
39
40
41
42
43
44
config CAPI_TRACE
	bool "CAPI trace support"
	default y
	help
	  If you say Y here, the kernelcapi driver can make verbose traces
	  of CAPI messages. This feature can be enabled/disabled via IOCTL for
	  every controller (default disabled).
	  This will increase the size of the kernelcapi module by 20 KB.
	  If unsure, say Y.

config ISDN_CAPI_CAPI20
	tristate "CAPI2.0 /dev/capi20 support"
	help
	  This option will provide the CAPI 2.0 interface to userspace
	  applications via /dev/capi20. Applications should use the
	  standardized libcapi20 to access this functionality.  You should say
	  Y/M here.

config ISDN_CAPI_MIDDLEWARE
	bool "CAPI2.0 Middleware support"
	depends on ISDN_CAPI_CAPI20 && TTY
	help
	  This option will enhance the capabilities of the /dev/capi20
	  interface.  It will provide a means of moving a data connection,
	  established via the usual /dev/capi20 interface to a special tty
	  device.  If you want to use pppd with pppdcapiplugin to dial up to
	  your ISP, say Y here.

config ISDN_CAPI_CAPIDRV
	tristate "CAPI2.0 capidrv interface support"
	depends on ISDN_I4L
	help
	  This option provides the glue code to hook up CAPI driven cards to
	  the legacy isdn4linux link layer.  If you have a card which is
	  supported by a CAPI driver, but still want to use old features like
	  ippp interfaces or ttyI emulation, say Y/M here.

config ISDN_CAPI_CAPIDRV_VERBOSE
	bool "Verbose reason code reporting"
	depends on ISDN_CAPI_CAPIDRV
	help
	  If you say Y here, the capidrv interface will give verbose reasons
	  for disconnecting. This will increase the size of the kernel by 7 KB.
	  If unsure, say N.
> with open('/proc/meminfo') as mem_file: mem_info = mem_file.readlines() # first check if module is loaded for line in mem_info: result = hugepage_re.match(line) if not result: continue num_huge = result.group('num_hp') if not num_huge: _LOGGER.info('No free hugepages.') else: _LOGGER.info('Found \'%s\' free hugepage(s).', num_huge) return True return False def is_hugepage_mounted(): """Check if hugepages are mounted. """ output = subprocess.check_output(['mount'], shell=True) my_encoding = locale.getdefaultlocale()[1] for line in output.decode(my_encoding).split('\n'): if 'hugetlbfs' in line: return True return False def mount_hugepages(): """Ensure hugepages are mounted. """ if not is_hugepage_available(): return if is_hugepage_mounted(): return if not os.path.exists(settings.getValue('HUGEPAGE_DIR')): os.makedirs(settings.getValue('HUGEPAGE_DIR')) try: tasks.run_task(['sudo', 'mount', '-t', 'hugetlbfs', 'nodev', settings.getValue('HUGEPAGE_DIR')], _LOGGER, 'Mounting hugepages...', True) except subprocess.CalledProcessError: _LOGGER.error('Unable to mount hugepages.') def umount_hugepages(): """Ensure hugepages are unmounted. """ if not is_hugepage_mounted(): return try: tasks.run_task(['sudo', 'umount', settings.getValue('HUGEPAGE_DIR')], _LOGGER, 'Unmounting hugepages...', True) except subprocess.CalledProcessError: _LOGGER.error('Unable to umount hugepages.')