...

Text file src/github.com/opencontainers/runc/tests/integration/testdata/dev_access_test.c

Documentation: github.com/opencontainers/runc/tests/integration/testdata

     1#include <stdio.h>
     2#include <unistd.h>
     3
     4int main(int argc, char *argv[])
     5{
     6	const char *dev_name = "/dev/kmsg";
     7
     8	if (argc > 1)
     9		dev_name = argv[1];
    10
    11	if (access(dev_name, F_OK) < 0) {
    12		perror(dev_name);
    13		return 1;
    14	}
    15
    16	return 0;
    17}

View as plain text