aboutsummaryrefslogtreecommitdiffstats
path: root/linux/SELinuxMeter.c
diff options
context:
space:
mode:
authorDaniel Lange <DLange@git.local>2021-09-21 08:35:20 +0200
committerDaniel Lange <DLange@git.local>2021-09-21 08:35:20 +0200
commita2b6942d15d220bb0518003d4f818a922d88e9f9 (patch)
tree7f60a44dec34af24da75b8d5b68c88eca94b9f6a /linux/SELinuxMeter.c
parent37d8824862a2f6b9375022e1c45ba4548162650f (diff)
parent69f439eff387a6ecb52734e400b297a3c85f2285 (diff)
downloaddebian_htop-a2b6942d15d220bb0518003d4f818a922d88e9f9.tar.gz
debian_htop-a2b6942d15d220bb0518003d4f818a922d88e9f9.tar.bz2
debian_htop-a2b6942d15d220bb0518003d4f818a922d88e9f9.zip
Update upstream source from tag 'upstream/3.1.0'
Update to upstream version '3.1.0' with Debian dir d4ecdd99a38d7105de46689cebcb051bf0046a76
Diffstat (limited to 'linux/SELinuxMeter.c')
-rw-r--r--linux/SELinuxMeter.c11
1 files changed, 5 insertions, 6 deletions
diff --git a/linux/SELinuxMeter.c b/linux/SELinuxMeter.c
index 892f1e8..e3b076d 100644
--- a/linux/SELinuxMeter.c
+++ b/linux/SELinuxMeter.c
@@ -5,18 +5,17 @@ Released under the GNU GPLv2, see the COPYING file
in the source distribution for its full text.
*/
-#include "SELinuxMeter.h"
+#include "linux/SELinuxMeter.h"
#include "CRT.h"
#include <stdbool.h>
+#include <stdint.h>
#include <stdio.h>
#include <unistd.h>
-#include <linux/magic.h>
#include <sys/statfs.h>
#include <sys/statvfs.h>
-#include "Macros.h"
#include "Object.h"
#include "XUtils.h"
@@ -35,7 +34,7 @@ static bool hasSELinuxMount(void) {
return false;
}
- if ((uint32_t)sfbuf.f_type != (uint32_t)SELINUX_MAGIC) {
+ if ((uint32_t)sfbuf.f_type != /* SELINUX_MAGIC */ 0xf97cff8cU) {
return false;
}
@@ -70,11 +69,11 @@ static bool isSelinuxEnforcing(void) {
return !!enforce;
}
-static void SELinuxMeter_updateValues(ATTR_UNUSED Meter* this, char* buffer, size_t len) {
+static void SELinuxMeter_updateValues(Meter* this) {
enabled = isSelinuxEnabled();
enforcing = isSelinuxEnforcing();
- xSnprintf(buffer, len, "%s%s", enabled ? "enabled" : "disabled", enabled ? (enforcing ? "; mode: enforcing" : "; mode: permissive") : "");
+ xSnprintf(this->txtBuffer, sizeof(this->txtBuffer), "%s%s", enabled ? "enabled" : "disabled", enabled ? (enforcing ? "; mode: enforcing" : "; mode: permissive") : "");
}
const MeterClass SELinuxMeter_class = {

© 2014-2024 Faster IT GmbH | imprint | privacy policy