mirror of
https://git.kernel.org/pub/scm/network/wireless/iwd.git
synced 2024-12-31 23:42:52 +01:00
storage: util: remove unused APIs
Both util_timespec_compare and storage_network_get_mtime are now unused.
This commit is contained in:
parent
4f14e4bb42
commit
894cde987d
@ -286,32 +286,6 @@ int storage_network_touch(enum security type, const char *ssid)
|
|||||||
return -errno;
|
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,
|
void storage_network_sync(enum security type, const char *ssid,
|
||||||
struct l_settings *settings)
|
struct l_settings *settings)
|
||||||
{
|
{
|
||||||
|
@ -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);
|
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_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,
|
void storage_network_sync(enum security type, const char *ssid,
|
||||||
struct l_settings *settings);
|
struct l_settings *settings);
|
||||||
int storage_network_remove(enum security type, const char *ssid);
|
int storage_network_remove(enum security type, const char *ssid);
|
||||||
|
19
src/util.c
19
src/util.c
@ -209,22 +209,3 @@ const char *util_get_username(const char *identity)
|
|||||||
|
|
||||||
return 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;
|
|
||||||
}
|
|
||||||
|
@ -65,7 +65,4 @@ static inline bool util_mem_is_zero(const uint8_t *field, size_t size)
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
int util_timespec_compare(const struct timespec *tsa,
|
|
||||||
const struct timespec *tsb);
|
|
||||||
|
|
||||||
#endif /* __UTIL_H */
|
#endif /* __UTIL_H */
|
||||||
|
Loading…
Reference in New Issue
Block a user