2 * Copyright 2009-2011, Ingo Weinhold, ingo_weinhold@gmx.de.
3 * Distributed under the terms of the MIT License.
7 #include <package/hpkg/DataReader.h>
14 namespace BPackageKit
{
19 BAttributeDataReader::BAttributeDataReader(int fd
, const char* attribute
,
30 BAttributeDataReader::ReadData(off_t offset
, void* buffer
, size_t size
)
32 ssize_t bytesRead
= fs_read_attr(fFD
, fAttribute
, fType
, offset
, buffer
,
36 return (size_t)bytesRead
== size
? B_OK
: B_ERROR
;
42 } // namespace BPackageKit