int getUSBStoragePath(char *buf_out)//FIND USB PATCH
{
char fbktmgr[255];
char buf_in[255];
char mount_path[LEN_PATH];
FILE *fp_mounts = fopen("/proc/mounts", "r");
char *found_mnt;
while (fgets(buf_in, 255, fp_mounts) != NULL) {
found_mnt = strstr(buf_in, "/mnt/sd");
if (found_mnt) {
sprintf(mount_path, "%s", strtok(found_mnt, " "));
sprintf(fbktmgr, "%s/bktmgr.udf", mount_path);
if (-1 != access(fbktmgr, 0)) // existence only
{
sprintf(buf_out, "%s", mount_path);
fclose(fp_mounts);
return 1;
}
}
}
return 0;
}
本站僅提供存儲服務(wù),所有內(nèi)容均由用戶發(fā)布,如發(fā)現(xiàn)有害或侵權(quán)內(nèi)容,請
點(diǎn)擊舉報(bào)。