/*
- * SPDX-License-Identifier: LGPL-2.1-only
+ * SPDX-License-Identifier: MIT
*
* Copyright (C) 2011-2012 Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
* Copyright (C) 2019 Michael Jeanson <mjeanson@efficios.com>
}
#endif
+#ifdef __linux__
/*
* Get the highest CPU id from sysfs.
*
total_bytes_read += bytes_read;
assert(total_bytes_read <= max_bytes);
- } while (max_bytes > total_bytes_read && bytes_read > 0);
+ } while (max_bytes > total_bytes_read && bytes_read != 0);
/*
* Make sure the mask read is a null terminated string.
return -1;
}
-#ifdef __linux__
/*
* On Linux try sysfs first and fallback to sysconf.
*/