am 73a223d0: am 1bedb73f: sdcard: Have the -f option fix user/group...
am 73a223d0: am 1bedb73f: sdcard: Have the -f option fix user/group permissions as well as file name case
* commit '73a223d0':
sdcard: Have the -f option fix user/group permissions as well as file name case
ERROR("usage: sdcard [-l -f] <path> <uid> <gid>\n\n\t-l force file names to lower case when creating new files\n\t-f fix up any existing file names at are not lower case\n");
ERROR("usage: sdcard [-l -f] <path> <uid> <gid>\n\n\t-l force file names to lower case when creating new files\n\t-f fix up file system before starting (repairs bad file name case and group ownership)\n");
return-1;
}
@@ -926,10 +932,8 @@ int main(int argc, char **argv)
charopts[256];
intfd;
intres;
unsigneduid=-1;
unsignedgid=-1;
constchar*path=NULL;
intcheck_files=0;
intfix_files=0;
inti;
for(i=1;i<argc;i++){
@@ -937,10 +941,8 @@ int main(int argc, char **argv)
if(arg[0]=='-'){
if(!strcmp(arg,"-l")){
force_lower_case=1;
ERROR("force_lower_case\n");
}elseif(!strcmp(arg,"-f")){
check_files=1;
ERROR("check_files\n");
fix_files=1;
}else{
returnusage();
}
@@ -985,6 +987,9 @@ int main(int argc, char **argv)
return-1;
}
if(fix_files)
recursive_fix_files(path);
if(setgid(gid)<0){
ERROR("cannot setgid!\n");
return-1;
@@ -994,9 +999,6 @@ int main(int argc, char **argv)