File: support.h

package info (click to toggle)
kernel-image-2.4.17-hppa 32.4
  • links: PTS
  • area: main
  • in suites: woody
  • size: 156,356 kB
  • ctags: 442,585
  • sloc: ansic: 2,542,442; asm: 144,771; makefile: 8,468; sh: 3,097; perl: 2,578; yacc: 1,177; tcl: 577; lex: 352; awk: 251; lisp: 218; sed: 72
file content (59 lines) | stat: -rw-r--r-- 1,411 bytes parent folder | download | duplicates (5)
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
54
55
56
57
58
59
/*
 * support.h - Header file for specific support.c
 *
 * Copyright (C) 1997 Rgis Duchesne
 * Copyright (c) 2001 Anton Altaparmakov (AIA)
 */

/* Debug levels */
#define DEBUG_OTHER	1
#define DEBUG_MALLOC	2
#define DEBUG_BSD       4
#define DEBUG_LINUX     8
#define DEBUG_DIR1     16
#define DEBUG_DIR2     32
#define DEBUG_DIR3     64
#define DEBUG_FILE1   128
#define DEBUG_FILE2   256
#define DEBUG_FILE3   512
#define DEBUG_NAME1  1024
#define DEBUG_NAME2  2048

#ifdef DEBUG
void ntfs_debug(int mask, const char *fmt, ...);
#else
#define ntfs_debug(mask, fmt...)	do {} while (0)
#endif

#include <linux/slab.h>
#include <linux/vmalloc.h>

#define ntfs_malloc(size)  kmalloc(size, GFP_KERNEL)

#define ntfs_free(ptr)     kfree(ptr)

#define ntfs_vmalloc(size)	vmalloc_32(size)

#define ntfs_vfree(ptr)		vfree(ptr)

void ntfs_bzero(void *s, int n);

void ntfs_memcpy(void *dest, const void *src, ntfs_size_t n);

void ntfs_memmove(void *dest, const void *src, ntfs_size_t n);

void ntfs_error(const char *fmt,...);

int ntfs_read_mft_record(ntfs_volume *vol, int mftno, char *buf);

int ntfs_getput_clusters(ntfs_volume *pvol, int cluster, ntfs_size_t offs,
			 ntfs_io *buf);

ntfs_time64_t ntfs_now(void);

int ntfs_dupuni2map(ntfs_volume *vol, ntfs_u16 *in, int in_len, char **out,
		    int *out_len);

int ntfs_dupmap2uni(ntfs_volume *vol, char* in, int in_len, ntfs_u16 **out,
		    int *out_len);