Lines Matching refs:buf
82 sysfs_obj_name(struct pci_dev *d, char *object, char *buf) in sysfs_obj_name() argument
84 int n = snprintf(buf, OBJNAMELEN, "%s/devices/%04x:%02x:%02x.%d/%s", in sysfs_obj_name()
93 sysfs_get_string(struct pci_dev *d, char *object, char *buf, int mandatory) in sysfs_get_string() argument
108 n = read(fd, buf, OBJBUFSIZE); in sysfs_get_string()
121 buf[n] = 0; in sysfs_get_string()
146 char buf[OBJBUFSIZE]; in sysfs_get_value() local
148 if (sysfs_get_string(d, object, buf, mandatory)) in sysfs_get_value()
149 return strtol(buf, NULL, 0); in sysfs_get_value()
158 char namebuf[OBJNAMELEN], buf[256]; in sysfs_get_resources() local
172 if (!fgets(buf, sizeof(buf), file)) in sysfs_get_resources()
174 if (sscanf(buf, "%llx %llx %llx", &start, &end, &flags) != 3) in sysfs_get_resources()
293 char namebuf[OBJNAMELEN], buf[16]; in sysfs_fill_slots() local
315 if (!fgets(buf, sizeof(buf), file) || (res = sscanf(buf, "%x:%x:%x", &dom, &bus, &dev)) < 3) in sysfs_fill_slots()
323 a->warning("sysfs_fill_slots: Couldn't parse entry address %s", buf); in sysfs_fill_slots()
438 char buf[OBJBUFSIZE]; in sysfs_fill_info() local
439 if (sysfs_get_string(d, "modalias", buf, 0)) in sysfs_fill_info()
440 d->module_alias = pci_set_property(d, PCI_FILL_MODULE_ALIAS, buf); in sysfs_fill_info()
445 char buf[OBJBUFSIZE]; in sysfs_fill_info() local
446 if (sysfs_get_string(d, "label", buf, 0)) in sysfs_fill_info()
447 d->label = pci_set_property(d, PCI_FILL_LABEL, buf); in sysfs_fill_info()
489 char buf[OBJBUFSIZE]; in sysfs_fill_info() local
490 if (sysfs_get_string(d, "rcd_link_cap", buf, 0)) in sysfs_fill_info()
491 d->rcd_link_cap = strtoul(buf, NULL, 16); in sysfs_fill_info()
492 if (sysfs_get_string(d, "rcd_link_ctrl", buf, 0)) in sysfs_fill_info()
493 d->rcd_link_ctrl = strtoul(buf, NULL, 16); in sysfs_fill_info()
494 if (sysfs_get_string(d, "rcd_link_status", buf, 0)) in sysfs_fill_info()
495 d->rcd_link_status = strtoul(buf, NULL, 16); in sysfs_fill_info()
543 static int sysfs_read(struct pci_dev *d, int pos, byte *buf, int len) in sysfs_read() argument
550 res = pread(fd, buf, len, pos); in sysfs_read()
561 static int sysfs_write(struct pci_dev *d, int pos, byte *buf, int len) in sysfs_write() argument
568 res = pwrite(fd, buf, len, pos); in sysfs_write()
582 static int sysfs_read_vpd(struct pci_dev *d, int pos, byte *buf, int len) in sysfs_read_vpd() argument
589 res = pread(fd, buf, len, pos); in sysfs_read_vpd()