File: device.h

package info (click to toggle)
libaal 1.0.7-1
  • links: PTS
  • area: main
  • in suites: bookworm, bullseye, buster
  • size: 1,768 kB
  • sloc: sh: 4,118; ansic: 2,461; makefile: 52
file content (49 lines) | stat: -rw-r--r-- 1,240 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
/* Copyright (C) 2001, 2002, 2003 by Hans Reiser, licensing governed by
   libaal/COPYING.
   
   device.h -- device functions declaration. */

#ifndef AAL_DEVICE_H
#define AAL_DEVICE_H

#include <aal/types.h>

extern aal_device_t *aal_device_open(struct aal_device_ops *ops, 
				     void *person,
				     uint32_t blksize,
				     int flags);

#ifndef ENABLE_MINIMAL
extern errno_t aal_device_sync(aal_device_t *device);

extern bool_t aal_device_readonly(aal_device_t *device);

extern errno_t aal_device_reopen(aal_device_t *device,
				 uint32_t blksize,
				 int flags);

extern errno_t aal_device_discard(aal_device_t *device,
				blk_t block,
				count_t count);

extern errno_t aal_device_write(aal_device_t *device, 
				void *buff, blk_t block,
				count_t count);

extern bool_t aal_device_equals(aal_device_t *device1, 
				aal_device_t *device2);
#endif

extern errno_t aal_device_read(aal_device_t *device, 
			       void *buff, blk_t block,
			       count_t count);

extern void aal_device_close(aal_device_t *device);

extern errno_t aal_device_set_bs(aal_device_t *device, 
				 uint32_t blksize);

extern count_t aal_device_len(aal_device_t *device);
extern uint32_t aal_device_get_bs(aal_device_t *device);

#endif