halt='variable declared with a cleanup macro must be initialized' \
$(_sc_search_regexp)
+# "class" in headers is not good because by default Vim treats it as a keyword
+# Let's prohibit it in source files as well.
+sc_prohibit_class:
+ @prohibit=' +_?class *;' \
+ in_vc_files='\.[chx]$$' \
+ halt='use klass instead of class or _class' \
+ $(_sc_search_regexp)
+
+
# We don't use this feature of maint.mk.
prev_version_file = /dev/null
virBufferAsprintf(buf, "<number>%d</number>\n",
data->usb_if.number);
virBufferAsprintf(buf, "<class>%d</class>\n",
- data->usb_if._class);
+ data->usb_if.klass);
virBufferAsprintf(buf, "<subclass>%d</subclass>\n",
data->usb_if.subclass);
virBufferAsprintf(buf, "<protocol>%d</protocol>\n",
goto out;
if (virNodeDevCapsDefParseULong("number(./class[1])", ctxt,
- &usb_if->_class, def,
+ &usb_if->klass, def,
_("no USB interface class supplied for '%s'"),
_("invalid USB interface class supplied for '%s'")) < 0)
goto out;
privileged = driver->privileged;
nodeDeviceUnlock();
- if (udevGetUintProperty(device, "PCI_CLASS", &pci_dev->class, 16) < 0)
+ if (udevGetUintProperty(device, "PCI_CLASS", &pci_dev->klass, 16) < 0)
goto cleanup;
if ((p = strrchr(def->sysfs_path, '/')) == NULL ||
return -1;
if (udevGetUintSysfsAttr(device, "bInterfaceClass",
- &usb_if->_class, 16) < 0)
+ &usb_if->klass, 16) < 0)
return -1;
if (udevGetUintSysfsAttr(device, "bInterfaceSubClass",
char *id;
int vendor;
int device;
- int class;
+ int klass;
int iommuGroup;
struct pciDriver *driver; /* Driver attached. NULL if attached to no driver */
};
ABORT("@tmp overflow");
make_file(devpath, "device", tmp, -1);
- if (snprintf(tmp, sizeof(tmp), "0x%.4x", dev->class) < 0)
+ if (snprintf(tmp, sizeof(tmp), "0x%.4x", dev->klass) < 0)
ABORT("@tmp overflow");
make_file(devpath, "class", tmp, -1);
MAKE_PCI_DEVICE("0000:00:01.0", 0x8086, 0x0044);
MAKE_PCI_DEVICE("0000:00:02.0", 0x8086, 0x0046);
MAKE_PCI_DEVICE("0000:00:03.0", 0x8086, 0x0048);
- MAKE_PCI_DEVICE("0001:00:00.0", 0x1014, 0x03b9, .class = 0x060400);
+ MAKE_PCI_DEVICE("0001:00:00.0", 0x1014, 0x03b9, .klass = 0x060400);
MAKE_PCI_DEVICE("0001:01:00.0", 0x8086, 0x105e, .iommuGroup = 0);
MAKE_PCI_DEVICE("0001:01:00.1", 0x8086, 0x105e, .iommuGroup = 0);
- MAKE_PCI_DEVICE("0005:80:00.0", 0x10b5, 0x8112, .class = 0x060400);
+ MAKE_PCI_DEVICE("0005:80:00.0", 0x10b5, 0x8112, .klass = 0x060400);
MAKE_PCI_DEVICE("0005:90:01.0", 0x1033, 0x0035, .iommuGroup = 1);
MAKE_PCI_DEVICE("0005:90:01.1", 0x1033, 0x0035, .iommuGroup = 1);
MAKE_PCI_DEVICE("0005:90:01.2", 0x1033, 0x00e0, .iommuGroup = 1);