rosemary: usb: make sure rndis.gs4 exists when linking it

This commit is contained in:
Ash Blake
2021-05-18 17:12:35 +02:00
committed by Matsvei Niaverau
parent 68edd8118c
commit aa51222c2a

View File

@@ -55,6 +55,9 @@ int linkFunction(const char* function, int index) {
sprintf(functionPath, "%s%s", FUNCTIONS_PATH, function);
sprintf(link, "%s%d", FUNCTION_PATH, index);
if (strcmp(function, "rndis.gs4") == 0) {
mkdir(functionPath, 0755);
}
if (symlink(functionPath, link)) {
ALOGE("Cannot create symlink %s -> %s errno:%d", link, functionPath, errno);
return -1;