1 #ifndef MODINITTOOLS_DEPMOD_H
2 #define MODINITTOOLS_DEPMOD_H
7 /* Functions provided by depmod.c */
8 void add_symbol(const char *name
, struct module
*owner
);
9 struct module
*find_symbol(const char *name
, const char *modname
, int weak
);
10 void add_dep(struct module
*mod
, struct module
*depends_on
);
13 #define streq(a,b) (strcmp((a),(b)) == 0)
17 /* Next module in list of all modules */
21 struct module_ops
*ops
;
26 /* Dependencies: filled in by ops->calculate_deps() */
27 unsigned int num_deps
;
30 /* Set while we are traversing dependencies */
31 struct list_head dep_list
;
33 /* Tables extracted from module by ops->fetch_tables(). */
34 unsigned int pci_size
;
36 unsigned int usb_size
;
38 unsigned int ieee1394_size
;
40 unsigned int ccw_size
;
42 unsigned int pnp_size
;
44 unsigned int pnp_card_size
;
45 unsigned int pnp_card_offset
;
47 unsigned int input_size
;
49 unsigned int input_table_size
;
50 unsigned int serio_size
;
55 /* File contents and length. */
59 char *basename
; /* points into pathname */
63 #define END(x, conv) \
66 if (conv) __convert_endian(&(x), &(__x), sizeof(__x)); \
71 static inline void __convert_endian(const void *src
, void *dest
,
75 for (i
= 0; i
< size
; i
++)
76 ((unsigned char*)dest
)[i
] = ((unsigned char*)src
)[size
- i
-1];
78 #endif /* MODINITTOOLS_DEPMOD_H */