This patch merge time_wrappers.h into smb_common.h.
Signed-off-by: Namjae Jeon <namjae.jeon@samsung.com>
Signed-off-by: Steve French <stfrench@microsoft.com>
#include "glob.h"
#include "smberr.h"
#include "nterr.h"
-#include "time_wrappers.h"
+#include "smb_common.h"
/*
* Convert the NT UTC (based 1601-01-01, in hundred nanosecond units)
return ts;
}
+
+/* Convert the Unix UTC into NT UTC. */
+inline u64 ksmbd_UnixTimeToNT(struct timespec64 t)
+{
+ /* Convert to 100ns intervals and then add the NTFS time offset. */
+ return (u64)t.tv_sec * 10000000 + t.tv_nsec / 100 + NTFS_TIME_OFFSET;
+}
+
+inline long long ksmbd_systime(void)
+{
+ struct timespec64 ts;
+
+ ktime_get_real_ts64(&ts);
+ return ksmbd_UnixTimeToNT(ts);
+}
#include "vfs_cache.h"
#include "misc.h"
-#include "time_wrappers.h"
#include "server.h"
#include "smb_common.h"
#include "smbstatus.h"
{
be32_add_cpu((__be32 *)buf, count);
}
+
+#define NTFS_TIME_OFFSET ((u64)(369 * 365 + 89) * 24 * 3600 * 10000000)
+
+struct timespec64 ksmbd_NTtimeToUnix(__le64 ntutc);
+u64 ksmbd_UnixTimeToNT(struct timespec64 t);
+long long ksmbd_systime(void);
#endif /* __SMB_COMMON_H__ */
+++ /dev/null
-/* SPDX-License-Identifier: GPL-2.0-or-later */
-/*
- * Copyright (C) 2019 Samsung Electronics Co., Ltd.
- */
-
-#ifndef __KSMBD_TIME_WRAPPERS_H
-#define __KSMBD_TIME_WRAPPERS_H
-
-/*
- * A bunch of ugly hacks to workaoround all the API differences
- * between different kernel versions.
- */
-
-#define NTFS_TIME_OFFSET ((u64)(369 * 365 + 89) * 24 * 3600 * 10000000)
-
-/* Convert the Unix UTC into NT UTC. */
-static inline u64 ksmbd_UnixTimeToNT(struct timespec64 t)
-{
- /* Convert to 100ns intervals and then add the NTFS time offset. */
- return (u64)t.tv_sec * 10000000 + t.tv_nsec / 100 + NTFS_TIME_OFFSET;
-}
-
-struct timespec64 ksmbd_NTtimeToUnix(__le64 ntutc);
-
-#define KSMBD_TIME_TO_TM time64_to_tm
-
-static inline long long ksmbd_systime(void)
-{
- struct timespec64 ts;
-
- ktime_get_real_ts64(&ts);
- return ksmbd_UnixTimeToNT(ts);
-}
-#endif /* __KSMBD_TIME_WRAPPERS_H */
#include "ndr.h"
#include "auth.h"
-#include "time_wrappers.h"
#include "smb_common.h"
#include "mgmt/share_config.h"
#include "mgmt/tree_connect.h"