2 * Copyright (C) 2001-2002 Hewlett-Packard Co.
3 * Contributed by Stephane Eranian <eranian@hpl.hp.com>
4 * Copyright (C) 2006-2009 Intel Corporation
5 * Contributed by Fenghua Yu <fenghua.yu@intel.com>
6 * Contributed by Bibo Mao <bibo.mao@intel.com>
7 * Contributed by Chandramouli Narayanan <mouli@linux.intel.com>
9 * This file is part of the ELILO, the EFI Linux boot loader.
11 * ELILO is free software; you can redistribute it and/or modify
12 * it under the terms of the GNU General Public License as published by
13 * the Free Software Foundation; either version 2, or (at your option)
16 * ELILO is distributed in the hope that it will be useful,
17 * but WITHOUT ANY WARRANTY; without even the implied warranty of
18 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
19 * GNU General Public License for more details.
21 * You should have received a copy of the GNU General Public License
22 * along with ELILO; see the file COPYING. If not, write to the Free
23 * Software Foundation, 59 Temple Place - Suite 330, Boston, MA
26 * Please check out the elilo.txt for complete documentation on how
27 * to use this program.
38 gzip_probe_format(CHAR16 *kname)
46 status = fops_open(kname, &fd);
47 if (EFI_ERROR(status)) return -1;
50 status = fops_read(fd, buf, &size);
52 if (EFI_ERROR(status) || size != sizeof(buf)) goto error;
54 ret = gzip_probe(buf, sizeof(buf));
62 gzip_load_kernel(CHAR16 *kname, kdesc_t *kd)
68 status = fops_open(kname, &fd);
69 if (EFI_ERROR(status)) return ELILO_LOAD_ERROR;
71 ret = gunzip_kernel(fd, kd);
75 return ret; /* could be success, error, or abort */
78 loader_ops_t gzip_loader={