Bernhard Reutner-Fischer | 55e547e | 2008-05-26 12:01:49 +0000 | [diff] [blame] | 1 | /* vi: set sw=4 ts=4: */ |
| 2 | /* |
| 3 | * depmod - generate modules.dep |
Bernhard Reutner-Fischer | 6c4dade | 2008-09-25 12:13:34 +0000 | [diff] [blame] | 4 | * Copyright (c) 2008 Bernhard Reutner-Fischer |
Denis Vlasenko | ba1315d | 2008-09-13 14:59:38 +0000 | [diff] [blame] | 5 | * Copyrihgt (c) 2008 Timo Teras <timo.teras@iki.fi> |
| 6 | * Copyright (c) 2008 Vladimir Dronnikov |
Bernhard Reutner-Fischer | 55e547e | 2008-05-26 12:01:49 +0000 | [diff] [blame] | 7 | * |
Denys Vlasenko | 0ef64bd | 2010-08-16 20:14:46 +0200 | [diff] [blame] | 8 | * Licensed under GPLv2 or later, see file LICENSE in this source tree. |
Bernhard Reutner-Fischer | 55e547e | 2008-05-26 12:01:49 +0000 | [diff] [blame] | 9 | */ |
| 10 | |
Denys Vlasenko | b9f2d9f | 2011-01-18 13:58:01 +0100 | [diff] [blame] | 11 | //applet:IF_DEPMOD(APPLET(depmod, BB_DIR_SBIN, BB_SUID_DROP)) |
Denys Vlasenko | c15613c | 2010-10-15 11:29:02 +0200 | [diff] [blame] | 12 | |
Denys Vlasenko | 1a5e11c | 2010-10-16 01:56:41 +0200 | [diff] [blame] | 13 | //usage:#if !ENABLE_MODPROBE_SMALL |
| 14 | //usage:#define depmod_trivial_usage NOUSAGE_STR |
| 15 | //usage:#define depmod_full_usage "" |
| 16 | //usage:#endif |
| 17 | |
Denys Vlasenko | 043b1e5 | 2009-09-06 12:47:55 +0200 | [diff] [blame] | 18 | #include "libbb.h" |
Denis Vlasenko | ba1315d | 2008-09-13 14:59:38 +0000 | [diff] [blame] | 19 | #include "modutils.h" |
Denys Vlasenko | 043b1e5 | 2009-09-06 12:47:55 +0200 | [diff] [blame] | 20 | #include <sys/utsname.h> /* uname() */ |
Denis Vlasenko | ba1315d | 2008-09-13 14:59:38 +0000 | [diff] [blame] | 21 | |
Bernhard Reutner-Fischer | cf18010 | 2008-05-26 15:12:01 +0000 | [diff] [blame] | 22 | /* |
| 23 | * Theory of operation: |
| 24 | * - iterate over all modules and record their full path |
| 25 | * - iterate over all modules looking for "depends=" entries |
| 26 | * for each depends, look through our list of full paths and emit if found |
| 27 | */ |
Bernhard Reutner-Fischer | beac1bd | 2008-06-02 13:28:47 +0000 | [diff] [blame] | 28 | |
Denis Vlasenko | ba1315d | 2008-09-13 14:59:38 +0000 | [diff] [blame] | 29 | typedef struct module_info { |
| 30 | struct module_info *next; |
| 31 | char *name, *modname; |
Bernhard Reutner-Fischer | beac1bd | 2008-06-02 13:28:47 +0000 | [diff] [blame] | 32 | llist_t *dependencies; |
Bernhard Reutner-Fischer | c2741e1 | 2008-06-02 18:59:16 +0000 | [diff] [blame] | 33 | llist_t *aliases; |
Denis Vlasenko | ba1315d | 2008-09-13 14:59:38 +0000 | [diff] [blame] | 34 | llist_t *symbols; |
| 35 | struct module_info *dnext, *dprev; |
| 36 | } module_info; |
Bernhard Reutner-Fischer | beac1bd | 2008-06-02 13:28:47 +0000 | [diff] [blame] | 37 | |
Denys Vlasenko | 16bda3b | 2009-05-18 13:08:04 +0200 | [diff] [blame] | 38 | static int FAST_FUNC parse_module(const char *fname, struct stat *sb UNUSED_PARAM, |
| 39 | void *data, int depth UNUSED_PARAM) |
Bernhard Reutner-Fischer | 55e547e | 2008-05-26 12:01:49 +0000 | [diff] [blame] | 40 | { |
Denys Vlasenko | 16bda3b | 2009-05-18 13:08:04 +0200 | [diff] [blame] | 41 | char modname[MODULE_NAME_LEN]; |
Denis Vlasenko | ba1315d | 2008-09-13 14:59:38 +0000 | [diff] [blame] | 42 | module_info **first = (module_info **) data; |
| 43 | char *image, *ptr; |
| 44 | module_info *info; |
Denys Vlasenko | 16bda3b | 2009-05-18 13:08:04 +0200 | [diff] [blame] | 45 | /* Arbitrary. Was sb->st_size, but that breaks .gz etc */ |
| 46 | size_t len = (64*1024*1024 - 4096); |
Bernhard Reutner-Fischer | 55e547e | 2008-05-26 12:01:49 +0000 | [diff] [blame] | 47 | |
Denis Vlasenko | ba1315d | 2008-09-13 14:59:38 +0000 | [diff] [blame] | 48 | if (strrstr(fname, ".ko") == NULL) |
| 49 | return TRUE; |
Bernhard Reutner-Fischer | 634b022 | 2008-05-28 14:20:20 +0000 | [diff] [blame] | 50 | |
Denis Vlasenko | fc66892 | 2008-11-06 02:32:31 +0000 | [diff] [blame] | 51 | image = xmalloc_open_zipped_read_close(fname, &len); |
Denys Vlasenko | 16bda3b | 2009-05-18 13:08:04 +0200 | [diff] [blame] | 52 | info = xzalloc(sizeof(*info)); |
Bernhard Reutner-Fischer | c2741e1 | 2008-06-02 18:59:16 +0000 | [diff] [blame] | 53 | |
Denis Vlasenko | ba1315d | 2008-09-13 14:59:38 +0000 | [diff] [blame] | 54 | info->next = *first; |
| 55 | *first = info; |
| 56 | |
| 57 | info->dnext = info->dprev = info; |
Denys Vlasenko | 4cab7f3 | 2010-07-18 17:41:17 +0200 | [diff] [blame] | 58 | info->name = xstrdup(fname + 2); /* skip "./" */ |
Denys Vlasenko | 16bda3b | 2009-05-18 13:08:04 +0200 | [diff] [blame] | 59 | info->modname = xstrdup(filename2modname(fname, modname)); |
Denis Vlasenko | ba1315d | 2008-09-13 14:59:38 +0000 | [diff] [blame] | 60 | for (ptr = image; ptr < image + len - 10; ptr++) { |
| 61 | if (strncmp(ptr, "depends=", 8) == 0) { |
| 62 | char *u; |
| 63 | |
| 64 | ptr += 8; |
| 65 | for (u = ptr; *u; u++) |
| 66 | if (*u == '-') |
| 67 | *u = '_'; |
| 68 | ptr += string_to_llist(ptr, &info->dependencies, ","); |
Denys Vlasenko | 16bda3b | 2009-05-18 13:08:04 +0200 | [diff] [blame] | 69 | } else if (ENABLE_FEATURE_MODUTILS_ALIAS |
| 70 | && strncmp(ptr, "alias=", 6) == 0 |
| 71 | ) { |
Denis Vlasenko | ba1315d | 2008-09-13 14:59:38 +0000 | [diff] [blame] | 72 | llist_add_to(&info->aliases, xstrdup(ptr + 6)); |
| 73 | ptr += strlen(ptr); |
Denys Vlasenko | 16bda3b | 2009-05-18 13:08:04 +0200 | [diff] [blame] | 74 | } else if (ENABLE_FEATURE_MODUTILS_SYMBOLS |
| 75 | && strncmp(ptr, "__ksymtab_", 10) == 0 |
| 76 | ) { |
Denis Vlasenko | ba1315d | 2008-09-13 14:59:38 +0000 | [diff] [blame] | 77 | ptr += 10; |
Denys Vlasenko | 6b9f163 | 2010-01-28 02:24:24 +0100 | [diff] [blame] | 78 | if (strncmp(ptr, "gpl", 3) == 0 |
| 79 | || strcmp(ptr, "strings") == 0 |
| 80 | ) { |
Denis Vlasenko | ba1315d | 2008-09-13 14:59:38 +0000 | [diff] [blame] | 81 | continue; |
Denys Vlasenko | 6b9f163 | 2010-01-28 02:24:24 +0100 | [diff] [blame] | 82 | } |
Denis Vlasenko | ba1315d | 2008-09-13 14:59:38 +0000 | [diff] [blame] | 83 | llist_add_to(&info->symbols, xstrdup(ptr)); |
| 84 | ptr += strlen(ptr); |
| 85 | } |
Bernhard Reutner-Fischer | 55e547e | 2008-05-26 12:01:49 +0000 | [diff] [blame] | 86 | } |
Denis Vlasenko | ba1315d | 2008-09-13 14:59:38 +0000 | [diff] [blame] | 87 | free(image); |
| 88 | |
Bernhard Reutner-Fischer | 55e547e | 2008-05-26 12:01:49 +0000 | [diff] [blame] | 89 | return TRUE; |
| 90 | } |
| 91 | |
Denis Vlasenko | ba1315d | 2008-09-13 14:59:38 +0000 | [diff] [blame] | 92 | static module_info *find_module(module_info *modules, const char *modname) |
| 93 | { |
| 94 | module_info *m; |
| 95 | |
| 96 | for (m = modules; m != NULL; m = m->next) |
| 97 | if (strcmp(m->modname, modname) == 0) |
| 98 | return m; |
| 99 | return NULL; |
| 100 | } |
| 101 | |
| 102 | static void order_dep_list(module_info *modules, module_info *start, |
| 103 | llist_t *add) |
| 104 | { |
| 105 | module_info *m; |
| 106 | llist_t *n; |
| 107 | |
| 108 | for (n = add; n != NULL; n = n->link) { |
| 109 | m = find_module(modules, n->data); |
| 110 | if (m == NULL) |
| 111 | continue; |
| 112 | |
| 113 | /* unlink current entry */ |
| 114 | m->dnext->dprev = m->dprev; |
| 115 | m->dprev->dnext = m->dnext; |
| 116 | |
| 117 | /* and add it to tail */ |
| 118 | m->dnext = start; |
| 119 | m->dprev = start->dprev; |
| 120 | start->dprev->dnext = m; |
| 121 | start->dprev = m; |
| 122 | |
| 123 | /* recurse */ |
| 124 | order_dep_list(modules, start, m->dependencies); |
| 125 | } |
| 126 | } |
| 127 | |
Denis Vlasenko | 3526115 | 2009-01-12 22:12:22 +0000 | [diff] [blame] | 128 | static void xfreopen_write(const char *file, FILE *f) |
| 129 | { |
| 130 | if (freopen(file, "w", f) == NULL) |
| 131 | bb_perror_msg_and_die("can't open '%s'", file); |
| 132 | } |
| 133 | |
Denys Vlasenko | 4cab7f3 | 2010-07-18 17:41:17 +0200 | [diff] [blame] | 134 | /* Usage: |
| 135 | * [-aAenv] [-C FILE or DIR] [-b BASE] [-F System.map] [VERSION] [MODFILES]... |
| 136 | * -a --all |
| 137 | * Probe all modules. Default if no MODFILES. |
| 138 | * -A --quick |
| 139 | * Check modules.dep's mtime against module files' mtimes. |
| 140 | * -b --basedir BASE |
| 141 | * Use $BASE/lib/modules/VERSION |
| 142 | * -C --config FILE or DIR |
| 143 | * Path to /etc/depmod.conf or /etc/depmod.d/ |
| 144 | * -e --errsyms |
| 145 | * When combined with the -F option, this reports any symbols which |
| 146 | * which are not supplied by other modules or kernel. |
| 147 | * -F --filesyms System.map |
| 148 | * -n --dry-run |
| 149 | * Print modules.dep etc to standard output |
| 150 | * -v --verbose |
| 151 | * Print to stdout all the symbols each module depends on |
| 152 | * and the module's file name which provides that symbol. |
| 153 | * -r No-op |
Pascal Bellard | cadf901 | 2010-10-18 00:51:16 +0200 | [diff] [blame] | 154 | * -u No-op |
| 155 | * -q No-op |
Denys Vlasenko | 4cab7f3 | 2010-07-18 17:41:17 +0200 | [diff] [blame] | 156 | * |
| 157 | * So far we only support: [-rn] [-b BASE] [VERSION] [MODFILES]... |
| 158 | * -aAeF are accepted but ignored. -vC are not accepted. |
| 159 | */ |
| 160 | enum { |
| 161 | //OPT_a = (1 << 0), /* All modules, ignore mods in argv */ |
| 162 | //OPT_A = (1 << 1), /* Only emit .ko that are newer than modules.dep file */ |
| 163 | OPT_b = (1 << 2), /* base directory when modules are in staging area */ |
| 164 | //OPT_e = (1 << 3), /* with -F, print unresolved symbols */ |
| 165 | //OPT_F = (1 << 4), /* System.map that contains the symbols */ |
| 166 | OPT_n = (1 << 5), /* dry-run, print to stdout only */ |
Pascal Bellard | cadf901 | 2010-10-18 00:51:16 +0200 | [diff] [blame] | 167 | OPT_r = (1 << 6), /* Compat dummy. Linux Makefile uses it */ |
| 168 | OPT_u = (1 << 7), /* -u,--unresolved-error: ignored */ |
| 169 | OPT_q = (1 << 8), /* -q,--quiet: ignored */ |
| 170 | OPT_C = (1 << 9), /* -C,--config etc_modules_conf: ignored */ |
Denys Vlasenko | 4cab7f3 | 2010-07-18 17:41:17 +0200 | [diff] [blame] | 171 | }; |
| 172 | |
Bernhard Reutner-Fischer | 55e547e | 2008-05-26 12:01:49 +0000 | [diff] [blame] | 173 | int depmod_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE; |
Denis Vlasenko | a60f84e | 2008-07-05 09:18:54 +0000 | [diff] [blame] | 174 | int depmod_main(int argc UNUSED_PARAM, char **argv) |
Bernhard Reutner-Fischer | 55e547e | 2008-05-26 12:01:49 +0000 | [diff] [blame] | 175 | { |
Denys Vlasenko | 4cab7f3 | 2010-07-18 17:41:17 +0200 | [diff] [blame] | 176 | module_info *modules, *m, *dep; |
Denis Vlasenko | 3526115 | 2009-01-12 22:12:22 +0000 | [diff] [blame] | 177 | const char *moddir_base = "/"; |
| 178 | char *moddir, *version; |
| 179 | struct utsname uts; |
Denis Vlasenko | ba1315d | 2008-09-13 14:59:38 +0000 | [diff] [blame] | 180 | int tmp; |
Bernhard Reutner-Fischer | 55e547e | 2008-05-26 12:01:49 +0000 | [diff] [blame] | 181 | |
Pascal Bellard | cadf901 | 2010-10-18 00:51:16 +0200 | [diff] [blame] | 182 | getopt32(argv, "aAb:eF:nruqC:", &moddir_base, NULL, NULL); |
Bernhard Reutner-Fischer | 6bb55cf | 2008-05-26 17:04:01 +0000 | [diff] [blame] | 183 | argv += optind; |
Bernhard Reutner-Fischer | c21d9c7 | 2008-05-28 10:35:51 +0000 | [diff] [blame] | 184 | |
Denis Vlasenko | ba1315d | 2008-09-13 14:59:38 +0000 | [diff] [blame] | 185 | /* goto modules location */ |
Denis Vlasenko | 3526115 | 2009-01-12 22:12:22 +0000 | [diff] [blame] | 186 | xchdir(moddir_base); |
Denis Vlasenko | ba1315d | 2008-09-13 14:59:38 +0000 | [diff] [blame] | 187 | |
| 188 | /* If a version is provided, then that kernel version's module directory |
Bernhard Reutner-Fischer | beac1bd | 2008-06-02 13:28:47 +0000 | [diff] [blame] | 189 | * is used, rather than the current kernel version (as returned by |
| 190 | * "uname -r"). */ |
Denys Vlasenko | 4cab7f3 | 2010-07-18 17:41:17 +0200 | [diff] [blame] | 191 | if (*argv && sscanf(*argv, "%u.%u.%u", &tmp, &tmp, &tmp) == 3) { |
Denis Vlasenko | 3526115 | 2009-01-12 22:12:22 +0000 | [diff] [blame] | 192 | version = *argv++; |
Bernhard Reutner-Fischer | 1ea2568 | 2008-05-26 21:33:05 +0000 | [diff] [blame] | 193 | } else { |
Denis Vlasenko | ba1315d | 2008-09-13 14:59:38 +0000 | [diff] [blame] | 194 | uname(&uts); |
Denis Vlasenko | 3526115 | 2009-01-12 22:12:22 +0000 | [diff] [blame] | 195 | version = uts.release; |
Bernhard Reutner-Fischer | 6bb55cf | 2008-05-26 17:04:01 +0000 | [diff] [blame] | 196 | } |
Denis Vlasenko | 3526115 | 2009-01-12 22:12:22 +0000 | [diff] [blame] | 197 | moddir = concat_path_file(&CONFIG_DEFAULT_MODULES_DIR[1], version); |
Denis Vlasenko | 3526115 | 2009-01-12 22:12:22 +0000 | [diff] [blame] | 198 | xchdir(moddir); |
Denis Vlasenko | ba1315d | 2008-09-13 14:59:38 +0000 | [diff] [blame] | 199 | if (ENABLE_FEATURE_CLEAN_UP) |
Denis Vlasenko | 3526115 | 2009-01-12 22:12:22 +0000 | [diff] [blame] | 200 | free(moddir); |
Bernhard Reutner-Fischer | 6bb55cf | 2008-05-26 17:04:01 +0000 | [diff] [blame] | 201 | |
Denys Vlasenko | 4cab7f3 | 2010-07-18 17:41:17 +0200 | [diff] [blame] | 202 | /* Scan modules */ |
| 203 | modules = NULL; |
| 204 | if (*argv) { |
| 205 | do { |
| 206 | parse_module(*argv, /*sb (unused):*/ NULL, &modules, 0); |
| 207 | } while (*++argv); |
| 208 | } else { |
| 209 | recursive_action(".", ACTION_RECURSE, |
| 210 | parse_module, NULL, &modules, 0); |
| 211 | } |
| 212 | |
Denis Vlasenko | ba1315d | 2008-09-13 14:59:38 +0000 | [diff] [blame] | 213 | /* Generate dependency and alias files */ |
Denys Vlasenko | 4cab7f3 | 2010-07-18 17:41:17 +0200 | [diff] [blame] | 214 | if (!(option_mask32 & OPT_n)) |
Denis Vlasenko | 3526115 | 2009-01-12 22:12:22 +0000 | [diff] [blame] | 215 | xfreopen_write(CONFIG_DEFAULT_DEPMOD_FILE, stdout); |
Denis Vlasenko | ba1315d | 2008-09-13 14:59:38 +0000 | [diff] [blame] | 216 | for (m = modules; m != NULL; m = m->next) { |
| 217 | printf("%s:", m->name); |
| 218 | |
| 219 | order_dep_list(modules, m, m->dependencies); |
| 220 | while (m->dnext != m) { |
| 221 | dep = m->dnext; |
| 222 | printf(" %s", dep->name); |
| 223 | |
| 224 | /* unlink current entry */ |
| 225 | dep->dnext->dprev = dep->dprev; |
| 226 | dep->dprev->dnext = dep->dnext; |
| 227 | dep->dnext = dep->dprev = dep; |
Bernhard Reutner-Fischer | 55e547e | 2008-05-26 12:01:49 +0000 | [diff] [blame] | 228 | } |
Denis Vlasenko | 3526115 | 2009-01-12 22:12:22 +0000 | [diff] [blame] | 229 | bb_putchar('\n'); |
Bernhard Reutner-Fischer | c2741e1 | 2008-06-02 18:59:16 +0000 | [diff] [blame] | 230 | } |
| 231 | |
Denis Vlasenko | ba1315d | 2008-09-13 14:59:38 +0000 | [diff] [blame] | 232 | #if ENABLE_FEATURE_MODUTILS_ALIAS |
Denys Vlasenko | 4cab7f3 | 2010-07-18 17:41:17 +0200 | [diff] [blame] | 233 | if (!(option_mask32 & OPT_n)) |
Denis Vlasenko | 3526115 | 2009-01-12 22:12:22 +0000 | [diff] [blame] | 234 | xfreopen_write("modules.alias", stdout); |
Denis Vlasenko | ba1315d | 2008-09-13 14:59:38 +0000 | [diff] [blame] | 235 | for (m = modules; m != NULL; m = m->next) { |
Denys Vlasenko | 16bda3b | 2009-05-18 13:08:04 +0200 | [diff] [blame] | 236 | const char *fname = bb_basename(m->name); |
| 237 | int fnlen = strchrnul(fname, '.') - fname; |
Denis Vlasenko | ba1315d | 2008-09-13 14:59:38 +0000 | [diff] [blame] | 238 | while (m->aliases) { |
Denys Vlasenko | 16bda3b | 2009-05-18 13:08:04 +0200 | [diff] [blame] | 239 | /* Last word can well be m->modname instead, |
| 240 | * but depmod from module-init-tools 3.4 |
| 241 | * uses module basename, i.e., no s/-/_/g. |
| 242 | * (pathname and .ko.* are still stripped) |
| 243 | * Mimicking that... */ |
| 244 | printf("alias %s %.*s\n", |
Denis Vlasenko | ba1315d | 2008-09-13 14:59:38 +0000 | [diff] [blame] | 245 | (char*)llist_pop(&m->aliases), |
Denys Vlasenko | 16bda3b | 2009-05-18 13:08:04 +0200 | [diff] [blame] | 246 | fnlen, fname); |
Bernhard Reutner-Fischer | beac1bd | 2008-06-02 13:28:47 +0000 | [diff] [blame] | 247 | } |
Denis Vlasenko | ba1315d | 2008-09-13 14:59:38 +0000 | [diff] [blame] | 248 | } |
| 249 | #endif |
| 250 | #if ENABLE_FEATURE_MODUTILS_SYMBOLS |
Denys Vlasenko | 4cab7f3 | 2010-07-18 17:41:17 +0200 | [diff] [blame] | 251 | if (!(option_mask32 & OPT_n)) |
Denis Vlasenko | 3526115 | 2009-01-12 22:12:22 +0000 | [diff] [blame] | 252 | xfreopen_write("modules.symbols", stdout); |
Denis Vlasenko | ba1315d | 2008-09-13 14:59:38 +0000 | [diff] [blame] | 253 | for (m = modules; m != NULL; m = m->next) { |
Denys Vlasenko | 16bda3b | 2009-05-18 13:08:04 +0200 | [diff] [blame] | 254 | const char *fname = bb_basename(m->name); |
| 255 | int fnlen = strchrnul(fname, '.') - fname; |
Denis Vlasenko | ba1315d | 2008-09-13 14:59:38 +0000 | [diff] [blame] | 256 | while (m->symbols) { |
Denys Vlasenko | 16bda3b | 2009-05-18 13:08:04 +0200 | [diff] [blame] | 257 | printf("alias symbol:%s %.*s\n", |
Denis Vlasenko | ba1315d | 2008-09-13 14:59:38 +0000 | [diff] [blame] | 258 | (char*)llist_pop(&m->symbols), |
Denys Vlasenko | 16bda3b | 2009-05-18 13:08:04 +0200 | [diff] [blame] | 259 | fnlen, fname); |
Denis Vlasenko | ba1315d | 2008-09-13 14:59:38 +0000 | [diff] [blame] | 260 | } |
Bernhard Reutner-Fischer | beac1bd | 2008-06-02 13:28:47 +0000 | [diff] [blame] | 261 | } |
Bernhard Reutner-Fischer | c2741e1 | 2008-06-02 18:59:16 +0000 | [diff] [blame] | 262 | #endif |
Bernhard Reutner-Fischer | beac1bd | 2008-06-02 13:28:47 +0000 | [diff] [blame] | 263 | |
Bernhard Reutner-Fischer | dc5d7fe | 2008-05-26 13:30:41 +0000 | [diff] [blame] | 264 | if (ENABLE_FEATURE_CLEAN_UP) { |
Denis Vlasenko | ba1315d | 2008-09-13 14:59:38 +0000 | [diff] [blame] | 265 | while (modules) { |
| 266 | module_info *old = modules; |
| 267 | modules = modules->next; |
Bernhard Reutner-Fischer | beac1bd | 2008-06-02 13:28:47 +0000 | [diff] [blame] | 268 | free(old->name); |
Denis Vlasenko | ba1315d | 2008-09-13 14:59:38 +0000 | [diff] [blame] | 269 | free(old->modname); |
Bernhard Reutner-Fischer | beac1bd | 2008-06-02 13:28:47 +0000 | [diff] [blame] | 270 | free(old); |
| 271 | } |
Bernhard Reutner-Fischer | dc5d7fe | 2008-05-26 13:30:41 +0000 | [diff] [blame] | 272 | } |
Denis Vlasenko | ba1315d | 2008-09-13 14:59:38 +0000 | [diff] [blame] | 273 | |
| 274 | return EXIT_SUCCESS; |
Bernhard Reutner-Fischer | 55e547e | 2008-05-26 12:01:49 +0000 | [diff] [blame] | 275 | } |