/*
* Can this filesystem handle nodump flags.
*/
-#if defined(HAVE_STRUCT_STAT_ST_FLAGS) && defined(UF_NODUMP)
-
int
canNodump(void)
{
+#if defined(HAVE_STRUCT_STAT_ST_FLAGS) && defined(UF_NODUMP)
const char *path = "cannodumptest";
struct stat sb;
return (0);
if (sb.st_flags & UF_NODUMP)
return (1);
- return (0);
-}
-
#elif (defined(FS_IOC_GETFLAGS) && defined(HAVE_WORKING_FS_IOC_GETFLAGS) \
&& defined(FS_NODUMP_FL)) || \
(defined(EXT2_IOC_GETFLAGS) && defined(HAVE_WORKING_EXT2_IOC_GETFLAGS) \
&& defined(EXT2_NODUMP_FL))
-int
-canNodump(void)
-{
const char *path = "cannodumptest";
int fd, r, flags;
if (flags & EXT2_NODUMP_FL)
#endif
return (1);
+#endif
return (0);
}
-#else
-
-int
-canNodump()
-{
- return (0);
-}
-
-#endif
-
/*
* Sleep as needed; useful for verifying disk timestamp changes by
* ensuring that the wall-clock time has actually changed before we