mirror of
https://github.com/clearlinux/graphene.git
synced 2026-08-22 05:56:23 +00:00
26 lines
534 B
C
26 lines
534 B
C
#include <stdio.h>
|
|
#include <stdlib.h>
|
|
#include <sys/stat.h>
|
|
#include <sys/types.h>
|
|
|
|
int main(int argc, char** argv) {
|
|
struct stat root, proc_root;
|
|
|
|
if (stat("/", &root) == -1) {
|
|
perror("stat");
|
|
exit(1);
|
|
}
|
|
|
|
if (stat("/proc/1/root", &proc_root) == -1) {
|
|
perror("stat");
|
|
exit(1);
|
|
}
|
|
|
|
if (root.st_dev == proc_root.st_dev && root.st_ino == proc_root.st_ino) {
|
|
printf("proc path test success\n");
|
|
} else {
|
|
printf("proc path test failure\n");
|
|
}
|
|
return 0;
|
|
}
|