Linux-Sysfs
view release on metacpan or search on metacpan
struct sysfs_bus* bus
CODE:
sysfs_close_bus(bus);
void
get_devices(bus)
struct sysfs_bus* bus
PREINIT:
struct dlist* dev_list = NULL;
struct sysfs_device* dev = NULL;
PPCODE:
dev_list = sysfs_get_bus_devices(bus);
if (dev_list == NULL)
XSRETURN_EMPTY;
EXTEND(SP, dev_list->count);
dlist_for_each_data(dev_list, dev, struct sysfs_device) {
PUSHs(sv_2mortal( perl_sysfs_new_sv_from_ptr(dev, "Linux::Sysfs::Device") ));
}
void
get_drivers(bus)
struct sysfs_bus* bus
PREINIT:
struct dlist* drv_list = NULL;
struct sysfs_driver* drv = NULL;
PPCODE:
drv_list = sysfs_get_bus_drivers(bus);
if (drv_list == NULL)
XSRETURN_EMPTY;
EXTEND(SP, drv_list->count);
dlist_for_each_data(drv_list, drv, struct sysfs_driver) {
PUSHs(sv_2mortal( perl_sysfs_new_sv_from_ptr(drv, "Linux::Sysfs::Driver") ));
}
xs/Class.xs view on Meta::CPAN
RETVAL = sysfs_get_class_device(class, name);
OUTPUT:
RETVAL
void
get_devices(class)
struct sysfs_class* class
PREINIT:
struct dlist* dev_list = NULL;
struct sysfs_class_device* dev = NULL;
PPCODE:
dev_list = sysfs_get_class_devices(class);
if (dev_list == NULL)
XSRETURN_EMPTY;
EXTEND(SP, dev_list->count);
dlist_for_each_data(dev_list, dev, struct sysfs_class_device) {
PUSHs(sv_2mortal( perl_sysfs_new_sv_from_ptr(dev, "Linux::Sysfs::ClassDevice") ));
}
xs/ClassDevice.xs view on Meta::CPAN
RETVAL
void
get_attrs(classdev)
struct sysfs_class_device* classdev
ALIAS:
get_attributes = 1
PREINIT:
struct dlist* attr_list = NULL;
struct sysfs_attribute* attr = NULL;
PPCODE:
PERL_UNUSED_VAR(ix);
attr_list = sysfs_get_classdev_attributes(classdev);
if (attr_list == NULL)
XSRETURN_EMPTY;
EXTEND(SP, attr_list->count);
dlist_for_each_data(attr_list, attr, struct sysfs_attribute) {
PUSHs(sv_2mortal( perl_sysfs_new_sv_from_ptr(attr, "Linux::Sysfs::Attribute") ));
}
xs/Device.xs view on Meta::CPAN
RETVAL
void
get_attrs(dev)
struct sysfs_device* dev
ALIAS:
get_attributes = 1
PREINIT:
struct dlist* attr_list = NULL;
struct sysfs_attribute* attr = NULL;
PPCODE:
PERL_UNUSED_VAR(ix);
attr_list = sysfs_get_device_attributes(dev);
if (attr_list == NULL)
XSRETURN_EMPTY;
EXTEND(SP, attr_list->count);
dlist_for_each_data(attr_list, attr, struct sysfs_attribute) {
PUSHs(sv_2mortal( perl_sysfs_new_sv_from_ptr(attr, "Linux::Sysfs::Attribute") ));
}
xs/Driver.xs view on Meta::CPAN
RETVAL
void
get_attrs(driver)
struct sysfs_driver* driver
ALIAS:
get_attributes = 1
PREINIT:
struct dlist* attr_list = NULL;
struct sysfs_attribute* attr = NULL;
PPCODE:
PERL_UNUSED_VAR(ix);
attr_list = sysfs_get_driver_attributes(driver);
if (attr_list == NULL)
XSRETURN_EMPTY;
EXTEND(SP, attr_list->count);
dlist_for_each_data(attr_list, attr, struct sysfs_attribute) {
PUSHs(sv_2mortal( perl_sysfs_new_sv_from_ptr(attr, "Linux::Sysfs::Attribute") ));
}
void
get_devices(driver)
struct sysfs_driver* driver
PREINIT:
struct dlist* dev_list = NULL;
struct sysfs_device* dev = NULL;
PPCODE:
dev_list = sysfs_get_driver_devices(driver);
if (dev_list == NULL)
XSRETURN_EMPTY;
EXTEND(SP, dev_list->count);
dlist_for_each_data(dev_list, dev, struct sysfs_device) {
PUSHs(sv_2mortal( perl_sysfs_new_sv_from_ptr(dev, "Linux::Sysfs::Device") ));
}
xs/Module.xs view on Meta::CPAN
struct sysfs_module* module
CODE:
sysfs_close_module(module);
void
get_parms(module)
struct sysfs_module* module
PREINIT:
struct dlist* parms_list = NULL;
struct sysfs_attribute* parm = NULL;
PPCODE:
parms_list = sysfs_get_module_parms(module);
if (parms_list == NULL)
XSRETURN_EMPTY;
EXTEND(SP, parms_list->count);
dlist_for_each_data(parms_list, parm, struct sysfs_attribute) {
PUSHs(sv_2mortal( perl_sysfs_new_sv_from_ptr(parm, "Linux::Sysfs::Attribute") ));
}
void
get_sections(module)
struct sysfs_module* module
PREINIT:
struct dlist* sections_list = NULL;
struct sysfs_attribute* section = NULL;
PPCODE:
sections_list = sysfs_get_module_sections(module);
if (sections_list == NULL)
XSRETURN_EMPTY;
EXTEND(SP, sections_list->count);
dlist_for_each_data(sections_list, section, struct sysfs_attribute) {
PUSHs(sv_2mortal( perl_sysfs_new_sv_from_ptr(section, "Linux::Sysfs::Attribute") ));
}
void
get_attributes(module)
struct sysfs_module* module
ALIAS:
get_attrs = 1
PREINIT:
struct dlist* attr_list = NULL;
struct sysfs_attribute* attr = NULL;
PPCODE:
PERL_UNUSED_VAR(ix);
attr_list = sysfs_get_module_attributes(module);
if (attr_list == NULL)
XSRETURN_EMPTY;
EXTEND(SP, attr_list->count);
dlist_for_each_data(attr_list, attr, struct sysfs_attribute) {
PUSHs(sv_2mortal( perl_sysfs_new_sv_from_ptr(attr, "Linux::Sysfs::Attribute") ));
}
( run in 1.999 second using v1.01-cache-2.11-cpan-5511b514fd6 )