---
name: "subsys_virtual_register"
section: "9"
platform: "linux"
package: "linux-manual-3.16"
version: "3.16.56-1+deb8u1"
release: "Debian 8 (Jessie)"
platforms: ["linux"]
url: "https://new.carta.tech/subsys_virtual_register"
---

# subsys\_virtual\_register(9)

register a subsystem at /sys/devices/virtual/

## NAME

subsys\_virtual\_register - register a subsystem at /sys/devices/virtual/

## SYNOPSIS

**int subsys\_virtual\_register(struct bus\_type \*** *subsys***, const struct attribute\_group \*\*** *groups***);**

## ARGUMENTS

*subsys*

virtual subsystem

*groups*

default attributes for the root device

## DESCRIPTION

All 'virtual' subsystems have a /sys/devices/system/\<name\> root device with the name of the subystem. The root device can carry subsystem-wide attributes. All registered devices are below this single root device. There's no restriction on device naming. This is for kernel software constructs which need sysfs interface.

## COPYRIGHT
