4 * Get version number for an inode on an ext2 file system.
11 #ifdef HAVE_SYS_IOCTL_H
12 #include <sys/ioctl.h>
24 #include <sys/fs/ext2fs.h>
27 main(int argc, char **argv)
33 fprintf(stderr, "usage: getiversion file ...\n");
37 for (i = 1; i < argc; i++) {
38 if ((fd = open(argv[i], O_RDONLY)) < 0
39 || ioctl(fd, EXT2_IOC_GETVERSION, &vers) < 0) {
43 printf("%-20s %d\n", argv[i], vers);