From: Richard W.M. Jones Date: Fri, 22 Jul 2011 13:41:08 +0000 (+0100) Subject: helper: Move all_files down function. X-Git-Tag: 3.8~3 X-Git-Url: http://git.annexia.org/?a=commitdiff_plain;h=5678972dca34f06bfa520bd7e9ee558a1a3164b4;p=febootstrap.git helper: Move all_files down function. This is just code tidy-up. --- 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");