Lines Matching refs:handle
160 int32 handle = hiview_open(path, O_RDWR | O_CREAT, 0);
161 if (handle < 0) {
164 return handle;
167 int32 HIVIEW_FileClose(int32 handle)
169 if (handle < 0) {
172 return hiview_close(handle);
175 int32 HIVIEW_FileRead(int32 handle, uint8 *buf, uint32 len)
177 if (handle < 0) {
180 return hiview_read(handle, (char *)buf, len);
183 int32 HIVIEW_FileWrite(int32 handle, const uint8 *buf, uint32 len)
185 if (handle < 0) {
188 return hiview_write(handle, (const char *)buf, len);
191 int32 HIVIEW_FileSeek(int32 handle, int32 offset, int32 whence)
193 if (handle < 0) {
196 return hiview_lseek(handle, (off_t)offset, whence);
199 int32 HIVIEW_FileSize(int32 handle)
201 if (handle < 0) {
204 return hiview_lseek(handle, 0, SEEK_END);
207 int32 HIVIEW_FileSync(int32 handle)
209 if (handle < 0) {
212 return hiview_fsync(handle);