Added fs_read_attr().
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@34085 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
parent
6dccfe1317
commit
713cc7fc84
@ -7518,6 +7518,22 @@ fs_next_device(int32* _cookie)
|
||||
}
|
||||
|
||||
|
||||
ssize_t
|
||||
fs_read_attr(int fd, const char *attribute, uint32 type, off_t pos,
|
||||
void *buffer, size_t readBytes)
|
||||
{
|
||||
int attrFD = attr_open(fd, NULL, attribute, O_RDONLY, true);
|
||||
if (attrFD < 0)
|
||||
return attrFD;
|
||||
|
||||
ssize_t bytesRead = _kern_read(attrFD, pos, buffer, readBytes);
|
||||
|
||||
_kern_close(attrFD);
|
||||
|
||||
return bytesRead;
|
||||
}
|
||||
|
||||
|
||||
static status_t
|
||||
get_cwd(char* buffer, size_t size, bool kernel)
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user