mirror of
git://projects.qi-hardware.com/xburst-tools.git
synced 2024-11-01 08:06:16 +02:00
remove check root permissions
Signed-off-by: Xiangfu Liu <xiangfu@sharism.cc>
This commit is contained in:
parent
51ec298a21
commit
eb283a6f70
@ -37,7 +37,7 @@ extern char * stage2;
|
||||
|
||||
static void help(void)
|
||||
{
|
||||
printf("Usage: usbboot [options] ...(must run as root)\n"
|
||||
printf("Usage: usbboot [options] ...\n"
|
||||
" -h --help\t\t\tPrint this help message\n"
|
||||
" -v --version\t\t\tPrint the version number\n"
|
||||
" -c --command\t\t\tDirect run the commands, split by ';'\n"
|
||||
@ -113,11 +113,6 @@ int main(int argc, char **argv)
|
||||
}
|
||||
}
|
||||
|
||||
if ((getuid()) || (getgid())) {
|
||||
fprintf(stderr, "Error - you must be root to run '%s'\n", argv[0]);
|
||||
return EXIT_FAILURE;
|
||||
}
|
||||
|
||||
if (usb_ingenic_init(&ingenic_dev) < 1)
|
||||
return EXIT_FAILURE;
|
||||
|
||||
|
@ -70,11 +70,6 @@ int main(int argc, char** argv)
|
||||
return EXIT_SUCCESS;
|
||||
}
|
||||
|
||||
if ((getuid()) || (getgid())) {
|
||||
fprintf(stderr, "Error - you must be root to run '%s'\n", argv[0]);
|
||||
return EXIT_FAILURE;
|
||||
}
|
||||
|
||||
if (!strcmp(argv[1], "-u") || !strcmp(argv[1], "--upload")) {
|
||||
if (argc != 4) {
|
||||
show_help();
|
||||
@ -435,7 +430,7 @@ void show_help()
|
||||
"(c) 2009 Wolfgang Spraul\n"
|
||||
"Report bugs to <wolfgang@sharism.cc>, <xiangfu@sharism.cc>.\n"
|
||||
"\n"
|
||||
"xbboot [vendor_request] ... (must run as root)\n"
|
||||
"xbboot [vendor_request] ...\n"
|
||||
" -h --help print this help message\n"
|
||||
" -v --version print the version number\n"
|
||||
" [-u | --upload] <address> <path> upload file at <path> to <address> then jump to <address>\n"
|
||||
|
Loading…
Reference in New Issue
Block a user