mirror of
https://github.com/fail0verflow/switch-coreboot.git
synced 2025-05-04 01:39:18 -04:00
LinuxBIOS code. Signed-off-by: Uwe Hermann <uwe@hermann-uwe.de> Acked-by: Stefan Reinauer <stepan@coresystems.de> git-svn-id: svn://coreboot.org/repository/LinuxBIOSv3@45 f3766cd6-281f-0410-b1cd-43a5c92072e9
56 lines
1.4 KiB
C
56 lines
1.4 KiB
C
/*
|
|
* lar - LinuxBIOS archiver
|
|
*
|
|
* Copright (C) 2006 coresystems GmbH
|
|
* Written by Stefan Reinauer <stepan@coresystems.de> for coresystems GmbH
|
|
*
|
|
* 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., 51 Franklin St, Fifth Floor, Boston, MA, 02110-1301 USA
|
|
*/
|
|
|
|
#include <stdio.h>
|
|
#include <stdlib.h>
|
|
#include <string.h>
|
|
#include <unistd.h>
|
|
#include <fcntl.h>
|
|
#include <errno.h>
|
|
#include <sys/types.h>
|
|
#include <sys/stat.h>
|
|
#include <sys/mman.h>
|
|
|
|
#include "lib.h"
|
|
#include "lar.h"
|
|
#include "create.h"
|
|
#include "extract.h"
|
|
#include "list.h"
|
|
|
|
int main(int argc, char *argv[])
|
|
{
|
|
if (argc<2) {
|
|
printf("Usage: lar [cxl] archive.lar <files>\n");
|
|
exit(0);
|
|
}
|
|
|
|
if (strcmp(argv[1], "x")==0)
|
|
extract_lar(argc, argv);
|
|
else if (strcmp(argv[1], "c")==0)
|
|
create_lar(argc,argv);
|
|
else if (strcmp(argv[1], "l")==0)
|
|
list_lar(argc,argv);
|
|
else {
|
|
printf("mode must be c or x\n");
|
|
exit(1);
|
|
}
|
|
|
|
return 0;
|
|
}
|