summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRichard W.M. Jones <rjones@redhat.com>2011-07-22 14:41:08 +0100
committerRichard W.M. Jones <rjones@redhat.com>2011-07-22 14:41:08 +0100
commit5678972dca34f06bfa520bd7e9ee558a1a3164b4 (patch)
tree44b4a13d461059f64a6b09392fb490d66db0509a
parent43cff1a90af236958347223708b76831656ea44b (diff)
downloadfebootstrap-5678972dca34f06bfa520bd7e9ee558a1a3164b4.zip
febootstrap-5678972dca34f06bfa520bd7e9ee558a1a3164b4.tar.gz
febootstrap-5678972dca34f06bfa520bd7e9ee558a1a3164b4.tar.xz
helper: Move all_files down function.
This is just code tidy-up.
-rw-r--r--helper/kernel.c3
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");