MCPcopy Create free account
hub / github.com/F-Stack/f-stack / resource_int_value

Function resource_int_value

freebsd/kern/subr_hints.c:336–357  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

334}
335
336int
337resource_int_value(const char *name, int unit, const char *resname, int *result)
338{
339 int error;
340 const char *str;
341 char *op;
342 unsigned long val;
343 int line;
344
345 line = 0;
346 error = resource_find(&line, NULL, name, &unit, resname, NULL,
347 NULL, NULL, NULL, NULL, NULL, &str);
348 if (error)
349 return error;
350 if (*str == '\0')
351 return EFTYPE;
352 val = strtoul(str, &op, 0);
353 if (*op != '\0')
354 return EFTYPE;
355 *result = val;
356 return 0;
357}
358
359int
360resource_long_value(const char *name, int unit, const char *resname,

Callers 15

apb_hinted_childFunction · 0.85
ar933x_chip_init_gmacFunction · 0.85
ar71xx_pci_slot_fixupFunction · 0.85
ar71xx_pci_attachFunction · 0.85
ar724x_pci_slot_fixupFunction · 0.85
ar71xx_gpio_attachFunction · 0.85
arge_attachFunction · 0.85
apb_hinted_childFunction · 0.85

Calls 2

strtoulFunction · 0.85
resource_findFunction · 0.70

Tested by

no test coverage detected