We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 9f38244 commit 926b253Copy full SHA for 926b253
source/common.c
@@ -405,14 +405,14 @@ int unload_device_tree(const char *name)
405
#ifdef BBBVERSION41
406
char slots[41];
407
snprintf(ctrl_dir, sizeof(ctrl_dir), "/sys/devices/platform/bone_capemgr");
408
- snprintf(slots, sizeof(slots), "%s/slots", ctrl_dir);
409
#else
410
char slots[40];
411
build_path("/sys/devices", "bone_capemgr", ctrl_dir, sizeof(ctrl_dir));
412
#endif
413
char line[256];
414
char *slot_line;
415
+ snprintf(slots, sizeof(slots), "%s/slots", ctrl_dir);
416
file = fopen(slots, "r+");
417
if (!file) {
418
PyErr_SetFromErrnoWithFilename(PyExc_IOError, slots);
0 commit comments