mirror of
https://github.com/Evolution-X-Devices/device_xiaomi_rosemary
synced 2026-01-27 13:35:09 +00:00
rosemary: usb: make sure rndis.gs4 exists when linking it
This commit is contained in:
committed by
Matsvei Niaverau
parent
68edd8118c
commit
aa51222c2a
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user