github.com/kubiko/snapd@v0.0.0-20201013125620-d4f3094d9ddf/interfaces/builtin/dcdbas_control.go (about) 1 // -*- Mode: Go; indent-tabs-mode: t -*- 2 3 /* 4 * Copyright (C) 2016 Canonical Ltd 5 * 6 * This program is free software: you can redistribute it and/or modify 7 * it under the terms of the GNU General Public License version 3 as 8 * published by the Free Software Foundation. 9 * 10 * This program is distributed in the hope that it will be useful, 11 * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 * GNU General Public License for more details. 14 * 15 * You should have received a copy of the GNU General Public License 16 * along with this program. If not, see <http://www.gnu.org/licenses/>. 17 * 18 */ 19 20 package builtin 21 22 const dcdbasControlSummary = `allows access to Dell Systems Management Base Driver` 23 24 const dcdbasControlBaseDeclarationSlots = ` 25 dcdbas-control: 26 allow-installation: 27 slot-snap-type: 28 - core 29 deny-auto-connection: true 30 ` 31 32 // https://www.kernel.org/doc/Documentation/dcdbas.txt 33 const dcdbasControlConnectedPlugAppArmor = ` 34 # Description: This interface allows communication with Dell Systems Management Base Driver 35 # which provides a sysfs interface for systems management software such as Dell OpenManage 36 # to perform system management interrupts and host control actions (system power cycle or 37 # power off after OS shutdown) on certain Dell systems. The Dell libsmbios project aims 38 # towards providing access to as much BIOS information as possible. 39 # 40 # See http://linux.dell.com/libsmbios/main/ for more information about the libsmbios project. 41 42 # entries pertaining to System Management Interrupts (SMI) 43 /sys/devices/platform/dcdbas/smi_data rw, 44 /sys/devices/platform/dcdbas/smi_data_buf_phys_addr rw, 45 /sys/devices/platform/dcdbas/smi_data_buf_size rw, 46 /sys/devices/platform/dcdbas/smi_request rw, 47 48 # entries pertaining to Host Control Action 49 /sys/devices/platform/dcdbas/host_control_action rw, 50 /sys/devices/platform/dcdbas/host_control_smi_type rw, 51 /sys/devices/platform/dcdbas/host_control_on_shutdown rw, 52 ` 53 54 func init() { 55 registerIface(&commonInterface{ 56 name: "dcdbas-control", 57 summary: dcdbasControlSummary, 58 implicitOnCore: true, 59 implicitOnClassic: true, 60 baseDeclarationSlots: dcdbasControlBaseDeclarationSlots, 61 connectedPlugAppArmor: dcdbasControlConnectedPlugAppArmor, 62 }) 63 }