Comment 1 for bug 2034705

Revision history for this message
Heinrich Schuchardt (xypron) wrote :

The problem is due to the kernel not supporting the deprecated statfs() call on the efivarfs file system.

To demonstrate this I have created the following program (statfs.c):

#include <sys/vfs.h>
#include <stdio.h>

int main(int argc, char *argv[])
{
        struct statfs s;
        int ret;

        if (argc < 2) {
                printf("usage: %s <dirpath>\n", argv[0]);
                return 1;
        }

        ret = statfs(argv[1], &s);
        if (ret == -1) {
                perror("statfs");
                return 1;
        } else {
                printf("%s type: 0x%llx\n", argv[1],
                       (unsigned long long)s.f_type);
        }
        return 0;
}

When I run it I get the following output:

$ ./statfs /sys/firmware/efi
/sys/firmware/efi type: 0x62656572
$ ./statfs /sys/firmware/efi/efivars/
statfs: Invalid argument
$ mount | grep efivarfs
efivarfs on /sys/firmware/efi/efivars type efivarfs (ro,nosuid,nodev,noexec,relatime)

Though efivarfs is mounted on /sys/firmware/efi/efivars the statfs call fails.