...
| Code Block | ||
|---|---|---|
| ||
struct stat st; dev_t dev = 773; /* device */ ino_t ino = 11321585; /* file serial number */ FILE *fd = fopen(filename, "r"); if ( (fd) && (fstat(fileno(fd), &st) != -1) && (st.st_ino == ino) && (st.st_dev == dev) ) { ... } fclose(fd); |
...