3
0
mirror of https://git.kernel.org/pub/scm/network/wireless/iwd.git synced 2024-12-22 13:02:44 +01:00

storage: util: remove unused APIs

Both util_timespec_compare and storage_network_get_mtime
are now unused.
This commit is contained in:
James Prestwood 2019-08-21 12:06:12 -07:00 committed by Denis Kenzior
parent 4f14e4bb42
commit 894cde987d
4 changed files with 0 additions and 50 deletions

View File

@ -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)
{

View File

@ -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);

View File

@ -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;
}

View File

@ -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 */