1
0
mirror of git://projects.qi-hardware.com/xburst-tools.git synced 2024-11-25 21:25:54 +02:00

fixed some compiler warnings, smaller copyright headers

This commit is contained in:
shiyele 2009-06-25 04:33:46 +00:00
parent 56482a184a
commit c84634d0cf
10 changed files with 41 additions and 168 deletions

View File

@ -1,23 +1,11 @@
/*
* "Ingenic flash tool" - flash the Ingenic CPU via USB
*
* (C) Copyright 2009
* Author: Marek Lindner <lindner_marek@yahoo.de>
* Author: Xiangfu Liu <xiangfu.z@gmail.com>
* Authors: Marek Lindner <lindner_marek@yahoo.de>
* Xiangfu Liu <xiangfu.z@gmail.com>
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* version 3 as published by the Free Software Foundation.
*
* 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 Street, Fifth Floor,
* Boston, MA 02110-1301, USA
* as published by the Free Software Foundation; either version
* 3 of the License, or (at your option) any later version.
*/
#include <stdio.h>

View File

@ -1,22 +1,10 @@
/*
* "Ingenic flash tool" - flash the Ingenic CPU via USB
*
* (C) Copyright 2009
* Author: Xiangfu Liu <xiangfu.z@gmail.com>
* Authors: Xiangfu Liu <xiangfu.z@gmail.com>
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* version 3 as published by the Free Software Foundation.
*
* 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 Street, Fifth Floor,
* Boston, MA 02110-1301, USA
* as published by the Free Software Foundation; either version
* 3 of the License, or (at your option) any later version.
*/
#ifndef __CMD_H__
@ -29,6 +17,7 @@
#define MAX_COMMAND_LENGTH 100
int boot(char *stage1_path, char *stage2_path);
int init_nand_in();
int nand_prog(void);
int nand_query(void);
int nand_erase(struct nand_in *nand_in);

View File

@ -1,22 +1,10 @@
/*
* "Ingenic flash tool" - flash the Ingenic CPU via USB
*
* (C) Copyright 2009
* Author: Xiangfu Liu <xiangfu.z@gmail.com>
* Authors: Xiangfu Liu <xiangfu.z@gmail.com>
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* version 3 as published by the Free Software Foundation.
*
* 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 Street, Fifth Floor,
* Boston, MA 02110-1301, USA
* as published by the Free Software Foundation; either version
* 3 of the License, or (at your option) any later version.
*/
#include <stdio.h>
@ -98,23 +86,9 @@ static int handle_version(void)
return 1;
}
static int handle_fconfig(void)
{
if (com_argc < 3) {
printf("\n Usage:"
" fconfig (1) (2) "
"\n 1:configration file name"
"\n 2:deivce index number");
return -1;
}
/* usb_infenic_config(atoi(com_argv[2]),com_argv[1]); */
return 1;
}
/* need transfer two para :blk_num ,start_blk */
int handle_nerase(void)
{
int i;
if (com_argc < 5) {
printf("\n Usage:");
printf(" nerase (1) (2) (3) (4) ");

View File

@ -1,23 +1,12 @@
/*
* "Ingenic flash tool" - flash the Ingenic CPU via USB
*
* (C) Copyright 2009
* Author: Xiangfu Liu <xiangfu.z@gmail.com>
* Authors: Xiangfu Liu <xiangfu.z@gmail.com>
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* version 3 as published by the Free Software Foundation.
*
* 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 Street, Fifth Floor,
* Boston, MA 02110-1301, USA
* as published by the Free Software Foundation; either version
* 3 of the License, or (at your option) any later version.
*/
#ifndef __COMMAND_LINE_H__
#define __COMMAND_LINE_H__

View File

@ -1,27 +1,16 @@
/*
* put all the configure operate to this file
*
* (C) Copyright 2009
* Author: Marek Lindner <lindner_marek@yahoo.de>
* Authors: Marek Lindner <lindner_marek@yahoo.de>
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* version 3 as published by the Free Software Foundation.
*
* 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 Street, Fifth Floor,
* Boston, MA 02110-1301, USA
* as published by the Free Software Foundation; either version
* 3 of the License, or (at your option) any later version.
*/
#include <errno.h>
#include <confuse.h>
#include <unistd.h>
#include <string.h>
#include "ingenic_cfg.h"
#include "usb_boot_defines.h"
@ -142,7 +131,7 @@ int check_dump_cfg(struct hand *hand)
int parse_configure(struct hand *hand, char * file_path)
{
if (access(file_path, F_OK)) {
fprintf(stderr, "Error - can't read file: %s\n",
fprintf(stderr, "Error - can't read file %s: %s\n",
file_path, strerror(errno));
return -1;
}
@ -188,7 +177,7 @@ int parse_configure(struct hand *hand, char * file_path)
cfg_t *cfg;
cfg = cfg_init(opts, 0);
if (cfg_parse(cfg, file_path) == CFG_PARSE_ERROR) {
fprintf(stderr, "Error - can't read file: %s\n",
fprintf(stderr, "Error - can't read file %s: %s\n",
file_path, strerror(errno));
return -1;
}

View File

@ -1,22 +1,10 @@
/*
* put all the configure operate to this file
*
* (C) Copyright 2009
* Author: Marek Lindner <lindner_marek@yahoo.de>
* Authors: Xiangfu Liu <xiangfu.z@gmail.com>
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* version 3 as published by the Free Software Foundation.
*
* 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 Street, Fifth Floor,
* Boston, MA 02110-1301, USA
* as published by the Free Software Foundation; either version
* 3 of the License, or (at your option) any later version.
*/
#ifndef __INGENIC_CFG_H__

View File

@ -1,23 +1,11 @@
/*
* "Ingenic flash tool" - flash the Ingenic CPU via USB
*
* (C) Copyright 2009
* Author: Marek Lindner <lindner_marek@yahoo.de>
* Author: Xiangfu liu <xiangfu.z@gmail.com>
* Authors: Marek Lindner <lindner_marek@yahoo.de>
* Xiangfu Liu <xiangfu.z@gmail.com>
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* version 3 as published by the Free Software Foundation.
*
* 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 Street, Fifth Floor,
* Boston, MA 02110-1301, USA
* as published by the Free Software Foundation; either version
* 3 of the License, or (at your option) any later version.
*/
#include "ingenic_usb.h"

View File

@ -1,23 +1,13 @@
/*
* "Ingenic flash tool" - flash the Ingenic CPU via USB
*
* (C) Copyright 2009
* Author: Marek Lindner <lindner_marek@yahoo.de>
* Authors: Xiangfu Liu <xiangfu.z@gmail.com>
* Marek Lindner <lindner_marek@yahoo.de>
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* version 3 as published by the Free Software Foundation.
*
* 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 Street, Fifth Floor,
* Boston, MA 02110-1301, USA
* as published by the Free Software Foundation; either version
* 3 of the License, or (at your option) any later version.
*/
#ifndef __INGENIC_USB_H__
#define __INGENIC_USB_H__

View File

@ -1,27 +1,17 @@
/*
* "Ingenic flash tool" - flash the Ingenic CPU via USB
*
* (C) Copyright 2009
* Author: Xiangfu Liu <xiangfu.z@gmail.com>
* Authors: Xiangfu Liu <xiangfu.z@gmail.com>
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* version 3 as published by the Free Software Foundation.
*
* 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 Street, Fifth Floor,
* Boston, MA 02110-1301, USA
* as published by the Free Software Foundation; either version
* 3 of the License, or (at your option) any later version.
*/
#include <stdio.h>
#include <stdlib.h>
#include <getopt.h>
#include <unistd.h>
#include <string.h>
#include "inflash_version.h"
#include "command_line.h"
#include "ingenic_usb.h"

View File

@ -1,22 +1,10 @@
/*
* "Ingenic flash tool" - flash the Ingenic CPU via USB
*
* (C) Copyright 2009
* Author: Marek Lindner <lindner_marek@yahoo.de>
* Authors: Marek Lindner <lindner_marek@yahoo.de>
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* version 3 as published by the Free Software Foundation.
*
* 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 Street, Fifth Floor,
* Boston, MA 02110-1301, USA
* as published by the Free Software Foundation; either version
* 3 of the License, or (at your option) any later version.
*/
#ifndef __USB_BOOT_DEFINES_H__