parent
d190b90e42
commit
098984744e
@ -0,0 +1,21 @@ |
|||||||
|
#include <stdio.h> |
||||||
|
#include <sys/types.h> |
||||||
|
#include <sys/stat.h> |
||||||
|
#include <sys/sysmacros.h> |
||||||
|
#include <unistd.h> |
||||||
|
|
||||||
|
int main (void) |
||||||
|
{ |
||||||
|
struct stat st; |
||||||
|
printf("sda:\n"); |
||||||
|
stat("/dev/nvme1n1", &st); |
||||||
|
printf("st_dev: %d\t%d\n", major(st.st_dev), minor(st.st_dev)); |
||||||
|
printf("st_rdev: %d\t%d\n", major(st.st_rdev), minor(st.st_rdev)); |
||||||
|
|
||||||
|
printf("sda1:\n"); |
||||||
|
stat("/dev/nvme1n1p2", &st); |
||||||
|
printf("st_dev: %d\t%d\n", major(st.st_dev), minor(st.st_dev)); |
||||||
|
printf("st_rdev: %d\t%d\n", major(st.st_rdev), minor(st.st_rdev)); |
||||||
|
|
||||||
|
return 0; |
||||||
|
} |
Loading…
Reference in new issue