fd: Use zstrings
Change-Id: I626c269f0a4ab5130e21acbabf0c62cf3c6a3aec
Signed-off-by: William A. Kennington III <wak@google.com>
diff --git a/src/fd/create.cpp b/src/fd/create.cpp
index d9b90f0..e39965f 100644
--- a/src/fd/create.cpp
+++ b/src/fd/create.cpp
@@ -11,11 +11,11 @@
namespace fd
{
-DupableFd open(const char* pathname, OpenFlags flags, mode_t mode)
+DupableFd open(const_zstring pathname, OpenFlags flags, mode_t mode)
{
return DupableFd(
- CHECK_ERRNO(::open(pathname, static_cast<int>(flags), mode),
- std::format("open `{}`", pathname)));
+ CHECK_ERRNO(::open(pathname.c_str(), static_cast<int>(flags), mode),
+ std::format("open `{}`", pathname.c_str())));
}
DupableFd socket(SocketDomain domain, SocketType type, SocketProto protocol)