diff options
author | Richard W.M. Jones <rjones@redhat.com> | 2011-07-22 14:41:08 +0100 |
---|---|---|
committer | Richard W.M. Jones <rjones@redhat.com> | 2011-07-22 14:41:08 +0100 |
commit | 5678972dca34f06bfa520bd7e9ee558a1a3164b4 (patch) | |
tree | 44b4a13d461059f64a6b09392fb490d66db0509a | |
parent | 43cff1a90af236958347223708b76831656ea44b (diff) | |
download | febootstrap-5678972dca34f06bfa520bd7e9ee558a1a3164b4.tar.gz febootstrap-5678972dca34f06bfa520bd7e9ee558a1a3164b4.tar.xz febootstrap-5678972dca34f06bfa520bd7e9ee558a1a3164b4.zip |
helper: Move all_files down function.
This is just code tidy-up.
-rw-r--r-- | helper/kernel.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/helper/kernel.c b/helper/kernel.c index adee8c2..45d7034 100644 --- a/helper/kernel.c +++ b/helper/kernel.c @@ -97,8 +97,6 @@ static char *create_kernel_archlinux (const char *hostcpu, const char *kernel); const char * create_kernel (const char *hostcpu, const char *kernel) { - char **all_files = read_dir (KERNELDIR); - /* In ArchLinux, kernel is always named /boot/vmlinuz26. */ if (access ("/boot/vmlinuz26", F_OK) == 0) return create_kernel_archlinux (hostcpu, kernel); @@ -111,6 +109,7 @@ create_kernel (const char *hostcpu, const char *kernel) else patt = xasprintf ("vmlinuz-*.%s*", hostcpu); + char **all_files = read_dir (KERNELDIR); char **candidates; candidates = filter_fnmatch (all_files, patt, FNM_NOESCAPE); candidates = filter_notmatching_substring (candidates, "xen"); |