mirror of
https://github.com/freebsd/freebsd-src
synced 2024-09-06 17:18:32 +00:00
LinuxKPI: Add kstrtoll to linux/kstrtox.h
kstrtoll converts a string to a long long. Sponsored by: Serenity Cyber Security, LLC MFC after: 1 week Reviewed by: bz, emaste Differential Revision: https://reviews.freebsd.org/D45455
This commit is contained in:
parent
a97f3a9ec9
commit
d207a2dee3
|
@ -7,6 +7,7 @@
|
|||
* Copyright (c) 2018 Johannes Lundberg <johalun0@gmail.com>
|
||||
* Copyright (c) 2020-2022 The FreeBSD Foundation
|
||||
* Copyright (c) 2021 Vladimir Kondratyev <wulf@FreeBSD.org>
|
||||
* Copyright (c) 2023 Serenity Cyber Security, LLC
|
||||
*
|
||||
* Portions of this software were developed by Bjoern A. Zeeb and
|
||||
* Emmanuel Vadot under sponsorship from the FreeBSD Foundation.
|
||||
|
@ -193,6 +194,12 @@ kstrtos64(const char *cp, unsigned int base, s64 *res)
|
|||
return (0);
|
||||
}
|
||||
|
||||
static inline int
|
||||
kstrtoll(const char *cp, unsigned int base, long long *res)
|
||||
{
|
||||
return (kstrtos64(cp, base, (s64 *)res));
|
||||
}
|
||||
|
||||
static inline int
|
||||
kstrtou64(const char *cp, unsigned int base, u64 *res)
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue