diff options
author | Michal Marek <mmarek@suse.cz> | 2009-03-02 15:33:03 +0100 |
---|---|---|
committer | Kay Sievers <kay.sievers@vrfy.org> | 2009-03-02 15:33:03 +0100 |
commit | 69ab0e5818376f6120004add174a933413fca41a (patch) | |
tree | 2f63d4c79005aaa3afd14fee60fc31aec0e6dd48 | |
parent | 50f21358cf9937906f42be1352ba2b588375a344 (diff) | |
download | module-init-tools-kay.tar.gz |
depmod: "updates" fixeskay
-rw-r--r-- | depmod.c | 19 |
1 files changed, 13 insertions, 6 deletions
@@ -592,8 +592,6 @@ static int is_higher_priority(const char *newpath, const char *oldpath, else if (strncmp(tmp->search_path, oldpath, tmp->len) == 0) prio_old = i; } - if (prio_builtin < 0) - prio_builtin = i; if (prio_new < 0) prio_new = prio_builtin; if (prio_old < 0) @@ -1434,10 +1432,19 @@ int main(int argc, char *argv[]) /* For backward compatibility add "updates" to the head of the search * list here. But only if there was no "search" option specified. */ - - if (!search) - search = add_search("updates", strlen("updates"), search); - + if (!search) { + char *dirname; + size_t len; + + len = strlen(basedir) + + strlen(MODULE_DIR) + + strlen(version) + + strlen("/updates"); + dirname = NOFAIL(malloc(len + 1)); + sprintf(dirname, "%s%s%s/updates", basedir, + MODULE_DIR, version); + search = add_search(dirname, len, search); + } if (!all) { /* Do command line args. */ for (opt = optind; opt < argc; opt++) { |