POK(kernelpart)
cpio.h
Go to the documentation of this file.
1 /*
2  * POK header
3  *
4  * The following file is a part of the POK project. Any modification should
5  * made according to the POK licence. You CANNOT use this file or a part of
6  * this file is this part of a file for your own project
7  *
8  * For more information on the POK licence, please see our LICENCE FILE
9  *
10  * Please follow the coding guidelines described in doc/CODING_GUIDELINES
11  *
12  * Copyright (c) 2007-2009 POK team
13  *
14  * Created by julien on Thu Jan 15 23:34:13 2009
15  */
16 
17 
18 #ifndef __POK_KERNEL_CPIO_H__
19 #define __POK_KERNEL_CPIO_H__
20 
22 {
31 };
32 
34 {
35  unsigned short c_magic;
36  unsigned short c_dev;
37  unsigned short c_ino;
38  unsigned short c_mode;
39  unsigned short c_uid;
40  unsigned short c_gid;
41  unsigned short c_nlink;
42  unsigned short c_rdev;
43  unsigned short c_mtime[2];
44  unsigned short c_namesize;
45  unsigned short c_filesize[2];
46 };
47 
48 struct cpio_file
49 {
50  int cpio_fmt;
51  void *cpio_addr;
52  void *curr_header;
54  unsigned int curr_filesz;
56  unsigned int curr_filename_len;
57  int (*next_header)(struct cpio_file *cpio);
58 };
59 
60 int cpio_open (struct cpio_file *cpio, void *file);
61 char *cpio_get_filename(struct cpio_file *cpio);
62 int cpio_next_file(struct cpio_file *cpio);
63 void *cpio_get_fileaddr(struct cpio_file *cpio);
64 
65 #endif /* __POK_KERNEL_CPIO_H__ */
66