diff options
author | Martin Matuska <martin@matuska.org> | 2017-02-26 23:43:56 +0100 |
---|---|---|
committer | Martin Matuska <martin@matuska.org> | 2017-02-26 23:44:45 +0100 |
commit | 43a42eeffb032c218e146f0dbae385c98d1054d1 (patch) | |
tree | e4c12e590661c3ca698b770efd9e1c05067ae8a0 /test_utils | |
parent | 15f0b59543e063f3c404e88052e8c1c702ca7f16 (diff) | |
download | libarchive-43a42eeffb032c218e146f0dbae385c98d1054d1.tar.gz |
test_main: compact canNodump() source code a bit
Diffstat (limited to 'test_utils')
-rw-r--r-- | test_utils/test_main.c | 20 |
1 files changed, 2 insertions, 18 deletions
diff --git a/test_utils/test_main.c b/test_utils/test_main.c index a50ed23f..8ae6c444 100644 --- a/test_utils/test_main.c +++ b/test_utils/test_main.c @@ -2326,11 +2326,10 @@ canXz(void) /* * 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; @@ -2341,16 +2340,10 @@ canNodump(void) 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; @@ -2401,19 +2394,10 @@ canNodump(void) 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 |