File: devices.h

package info (click to toggle)
jfsutils 1.0.14-1
  • links: PTS
  • area: main
  • in suites: woody
  • size: 3,132 kB
  • ctags: 4,667
  • sloc: ansic: 41,422; sh: 335; makefile: 126
file content (53 lines) | stat: -rw-r--r-- 1,821 bytes parent folder | download
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
50
51
52
53
/*
 *   Copyright (c) International Business Machines  Corp., 2000
 *
 *   This program is free software;  you can redistribute it and/or modify
 *   it under the terms of the GNU General Public License as published by
 *   the Free Software Foundation; either version 2 of the License, or 
 *   (at your option) any later version.
 * 
 *   This program is distributed in the hope that it will be useful,
 *   but WITHOUT ANY WARRANTY;  without even the implied warranty of
 *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See
 *   the GNU General Public License for more details.
 *
 *   You should have received a copy of the GNU General Public License
 *   along with this program;  if not, write to the Free Software 
 *   Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
 */
#ifndef H_DEVICES
#define H_DEVICES

#define GET	 0
#define PUT	 1
#define VRFY 2

/* Macros used for determining open mode */
#define READONLY	0
#define RDWR_EXCL	1

/* Handle used to access the device. */              
#define HFILE  int
#define PHFILE int * 

/* Error codes */
#define NO_ERROR                  0
#define ERROR_INVALID_FUNCTION	  1
#define ERROR_FILE_NOT_FOUND	  2
#define ERROR_INVALID_HANDLE	  6
#define ERROR_NOT_ENOUGH_MEMORY   8 
#define ERROR_INVALID_ACCESS	 12
#define ERROR_SEEK		         25
#define ERROR_WRITE_FAULT	     29
#define ERROR_READ_FAULT	     30
#define ERROR_GEN_FAILURE	     31
#define ERROR_INVALID_PARAMETER	 87
#define ERROR_DISK_FULL         112

                               
int32_t ujfs_get_dev_size( HFILE device, int64_t * size );
int32_t ujfs_open_device( char * Device, PHFILE FileHandle, int32_t * SectorSize, int32_t mode );
int32_t ujfs_close( HFILE );
int32_t ujfs_rw_diskblocks( HFILE, int64_t, int32_t, void *, int32_t );

#endif /* H_DEVICES */