Staging: p9auth: fix dependency/build error
[linux-2.6/linux-acpi-2.6/ibm-acpi-2.6.git] / drivers / staging / p9auth / p9auth.h
blob285d1d8c9176b421ae22af032127db8d76e2b381
1 #ifndef CAP_MAJOR
2 #define CAP_MAJOR 0
3 #endif
5 #ifndef CAP_NR_DEVS
6 #define CAP_NR_DEVS 2 /* caphash and capuse */
7 #endif
9 #ifndef CAP_NODE_SIZE
10 #define CAP_NODE_SIZE 20
11 #endif
13 #define MAX_DIGEST_SIZE 20
15 struct cap_node {
16 char data[CAP_NODE_SIZE];
17 struct list_head list;
20 struct cap_dev {
21 struct cap_node *head;
22 int node_size;
23 unsigned long size;
24 struct semaphore sem;
25 struct cdev cdev;
28 extern int cap_major;
29 extern int cap_nr_devs;
30 extern int cap_node_size;
32 int cap_trim(struct cap_dev *);
33 ssize_t cap_write(struct file *, const char __user *, size_t, loff_t *);
34 char *cap_hash(char *plain_text, unsigned int plain_text_size, char *key, unsigned int key_size);
35 void hex_dump(unsigned char * buf, unsigned int len);