- int status;
- int errno;
-
- if ((strncmp(orig, "/proc", 5) == 0) ||
- (strncmp(orig, "/sys", 4) == 0)) {
-
- status = snprintf(prefixed, BUFSIZE, "%s%s", PREFIX, orig);
- if ((unsigned int)status >= BUFSIZE) {
- error(status, ENAMETOOLONG, "'%s' got truncated when adding '%s' prefix: '%s'",
- orig, PREFIX, prefixed);
- return orig;
- } else if (status < 1) {
- error(status, errno, "adding '%s' prefix to file path failed: '%s' -> '%s'",
- PREFIX, orig, prefixed);
- return orig;
- } else {
- return (const char*) prefixed;
- }
-
- } else {
- return orig;
- }
+ int status;
+ int errno;
+
+ if ((strncmp(orig, "/proc", 5) == 0) || (strncmp(orig, "/sys", 4) == 0)) {
+
+ status = snprintf(prefixed, BUFSIZE, "%s%s", PREFIX, orig);
+ if ((unsigned int)status >= BUFSIZE) {
+ error(status, ENAMETOOLONG,
+ "'%s' got truncated when adding '%s' prefix: '%s'", orig, PREFIX,
+ prefixed);
+ return orig;
+ } else if (status < 1) {
+ error(status, errno,
+ "adding '%s' prefix to file path failed: '%s' -> '%s'", PREFIX,
+ orig, prefixed);
+ return orig;
+ } else {
+ return (const char *)prefixed;
+ }
+
+ } else {
+ return orig;
+ }