eiwd

no dbus iwd with iwctl functionality
git clone https://git.daat.foo/repos/eiwd.git
Log | Files | Refs | Submodules | README | LICENSE

commit 894cde987de406c1c3aae4f9d3ac8845d1df43da
parent 4f14e4bb42d8d72fd9806faa1550e6ac6dd7f306
Author: James Prestwood <prestwoj@gmail.com>
Date:   Wed, 21 Aug 2019 12:06:12 -0700

storage: util: remove unused APIs

Both util_timespec_compare and storage_network_get_mtime
are now unused.

Diffstat:
Msrc/storage.c | 26--------------------------
Msrc/storage.h | 2--
Msrc/util.c | 19-------------------
Msrc/util.h | 3---
4 files changed, 0 insertions(+), 50 deletions(-)

diff --git a/src/storage.c b/src/storage.c @@ -286,32 +286,6 @@ int storage_network_touch(enum security type, const char *ssid) return -errno; } -int storage_network_get_mtime(enum security type, const char *ssid, - struct timespec *mtim) -{ - char *path; - int ret; - struct stat sb; - - if (ssid == NULL) - return -EINVAL; - - path = storage_get_network_file_path(type, ssid); - ret = stat(path, &sb); - l_free(path); - - if (ret < 0) - return -errno; - - if (!S_ISREG(sb.st_mode)) - return -EINVAL; - - if (mtim) - memcpy(mtim, &sb.st_mtim, sizeof(struct timespec)); - - return 0; -} - void storage_network_sync(enum security type, const char *ssid, struct l_settings *settings) { diff --git a/src/storage.h b/src/storage.h @@ -39,8 +39,6 @@ char *storage_get_network_file_path(enum security type, const char *ssid); struct l_settings *storage_network_open(enum security type, const char *ssid); int storage_network_touch(enum security type, const char *ssid); -int storage_network_get_mtime(enum security type, const char *ssid, - struct timespec *mtim); void storage_network_sync(enum security type, const char *ssid, struct l_settings *settings); int storage_network_remove(enum security type, const char *ssid); diff --git a/src/util.c b/src/util.c @@ -209,22 +209,3 @@ const char *util_get_username(const char *identity) return identity; } - -int util_timespec_compare(const struct timespec *tsa, - const struct timespec *tsb) -{ - - if (tsa->tv_sec > tsb->tv_sec) - return -1; - - if (tsa->tv_sec < tsb->tv_sec) - return 1; - - if (tsa->tv_nsec > tsb->tv_nsec) - return -1; - - if (tsa->tv_nsec < tsb->tv_nsec) - return -1; - - return 0; -} diff --git a/src/util.h b/src/util.h @@ -65,7 +65,4 @@ static inline bool util_mem_is_zero(const uint8_t *field, size_t size) return true; } -int util_timespec_compare(const struct timespec *tsa, - const struct timespec *tsb); - #endif /* __UTIL_H */