diff options
author | midipix <writeonce@midipix.org> | 2024-05-26 14:41:33 +0000 |
---|---|---|
committer | midipix <writeonce@midipix.org> | 2024-05-26 14:41:33 +0000 |
commit | 6c8a81097fd305d428891377433d7d88ba1119fd (patch) | |
tree | 91f2b4fa467e1a7851e2a1fd3f8ccc1f2d50fe1b /src/helper/tpax_stat_compare.c | |
parent | 94230e73b767a4acc02a98d4a2520631517f1a2a (diff) | |
download | tpax-6c8a81097fd305d428891377433d7d88ba1119fd.tar.bz2 tpax-6c8a81097fd305d428891377433d7d88ba1119fd.tar.xz |
library api's: _util_ (utility helper interfaces) namespace overhaul.
Diffstat (limited to 'src/helper/tpax_stat_compare.c')
-rw-r--r-- | src/helper/tpax_stat_compare.c | 41 |
1 files changed, 0 insertions, 41 deletions
diff --git a/src/helper/tpax_stat_compare.c b/src/helper/tpax_stat_compare.c deleted file mode 100644 index 398e45c..0000000 --- a/src/helper/tpax_stat_compare.c +++ /dev/null @@ -1,41 +0,0 @@ -/**************************************************************/ -/* tpax: a topological pax implementation */ -/* Copyright (C) 2020--2024 SysDeer Technologies, LLC */ -/* Released under GPLv2 and GPLv3; see COPYING.TPAX. */ -/**************************************************************/ - -#include <stdint.h> -#include <stdlib.h> -#include <string.h> -#include <errno.h> -#include <sys/stat.h> - -#include <tpax/tpax.h> -#include "tpax_driver_impl.h" - -#define TPAX_STAT_COMPARE(member) \ - if (src -> member - dst -> member) \ - return (src -> member > dst -> member) \ - ? (1) : (-1) - -int tpax_stat_compare( - const struct stat * src, - const struct stat * dst) -{ - TPAX_STAT_COMPARE(st_dev); - TPAX_STAT_COMPARE(st_ino); - - TPAX_STAT_COMPARE(st_mode); - TPAX_STAT_COMPARE(st_uid); - TPAX_STAT_COMPARE(st_gid); - - TPAX_STAT_COMPARE(st_rdev); - TPAX_STAT_COMPARE(st_size); - TPAX_STAT_COMPARE(st_blksize); - TPAX_STAT_COMPARE(st_blocks); - - TPAX_STAT_COMPARE(st_mtim.tv_sec); - TPAX_STAT_COMPARE(st_mtim.tv_nsec); - - return 0; -} |