X-Git-Url: http://git.ozlabs.org/?p=petitboot;a=blobdiff_plain;f=discover%2Fnative-parser.c;h=08309d1b317ea243121f24aab078368d8c57e83e;hp=24713b19542da150de6b101c2adab1b036245f2b;hb=37bff93c8b0a71432613f41f2319dc073ca64619;hpb=32e6a41f33e5576716b351bd473a27939fe94fa1 diff --git a/discover/native-parser.c b/discover/native-parser.c index 24713b1..08309d1 100644 --- a/discover/native-parser.c +++ b/discover/native-parser.c @@ -1,3 +1,17 @@ +/* + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; version 2 of the License. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ #include "parser.h" #include "params.h" @@ -7,14 +21,14 @@ #include #include -const char *conf_filename = "/boot/petitboot.conf"; +static const char *conf_filename = "/boot/petitboot.conf"; static struct boot_option *cur_opt; static struct device *dev; static const char *devpath; -int device_added; +static int device_added; -int check_and_add_device(struct device *dev) +static int check_and_add_device(struct device *dev) { if (!dev->icon_file) dev->icon_file = strdup(generic_icon_file(guess_device_type())); @@ -86,7 +100,7 @@ static int parameter(char *param_name, char *param_value) } -int parse(const char *device) +static int native_parse(const char *device) { char *filepath; int rc; @@ -114,11 +128,4 @@ int parse(const char *device) return 1; } -struct parser native_parser = { - .name = "native petitboot parser", - .priority = 100, - .parse = parse -}; - - - +define_parser(native, native_parse);