- int fd;
-#ifdef HAVE_EXT2FS_EXT2FS_H
- int mount_flags;
- char mountpt[80] = "";
-
- if (ext2fs_check_mount_point(devname, &mount_flags, mountpt,
- sizeof(mountpt))) {
- fprintf(stderr, "%s: ext2fs_check_mount_point failed:%s",
- progname, strerror(errno));
- exit(1);
- }
- if (mount_flags & EXT2_MF_MOUNTED){
- fprintf(stderr, "%s: %s is already mounted\n", progname,
- devname);
- exit(1);
- }
-#endif