From: Lennart Poettering Date: Tue, 19 Jul 2016 18:45:10 +0000 (+0200) Subject: bootctl: use F_TYPE_EQUAL() to compare statfs' .f_type field X-Git-Tag: v232~368^2~5 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=5fa6c13c7bd6df488c0585608688a5feb8a03d5d;p=thirdparty%2Fsystemd.git bootctl: use F_TYPE_EQUAL() to compare statfs' .f_type field After all, the field is kinda borked. --- diff --git a/src/boot/bootctl.c b/src/boot/bootctl.c index 5c3e7a04a08..9a24ecd6b29 100644 --- a/src/boot/bootctl.c +++ b/src/boot/bootctl.c @@ -26,6 +26,7 @@ #include #include #include +#include #include #include #include @@ -50,6 +51,7 @@ #include "util.h" #include "verbs.h" #include "virt.h" +#include "stat-util.h" static char *arg_path = NULL; static bool arg_touch_variables = true; @@ -83,7 +85,7 @@ static int verify_esp( return log_error_errno(errno, "Failed to check file system type of \"%s\": %m", p); } - if (sfs.f_type != 0x4d44) { + if (!F_TYPE_EQUAL(sfs.f_type, MSDOS_SUPER_MAGIC)) { if (searching) return -EADDRNOTAVAIL;