From b78dc1e8dd739cc6f60bedee9528c8bbebfa1fb0 Mon Sep 17 00:00:00 2001 From: Ingo Weinhold Date: Sat, 22 Mar 2008 20:09:05 +0000 Subject: [PATCH] Generic attribute emulation: Export function __get_attribute_dir_path() which returns the attribute directory for a given file's stat. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24527 a95241bf-73f2-0310-859d-f6bbb57e9c96 --- src/build/libroot/fs_attr_generic.cpp | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/src/build/libroot/fs_attr_generic.cpp b/src/build/libroot/fs_attr_generic.cpp index 00f097ca46..b7c145acb4 100644 --- a/src/build/libroot/fs_attr_generic.cpp +++ b/src/build/libroot/fs_attr_generic.cpp @@ -598,3 +598,15 @@ _kern_remove_attr(int fd, const char *name) return B_OK; } + + +// __get_attribute_dir_path +extern "C" bool __get_attribute_dir_path(const struct stat* st, char* buffer); +bool +__get_attribute_dir_path(const struct stat* st, char* buffer) +{ + NodeRef ref(*st); + string path = get_attribute_dir_path(ref); + strcpy(buffer, path.c_str()); + return true; +}