mirror of
https://github.com/Ascend/ascend-docker-runtime.git
synced 2025-10-17 13:40:45 +08:00
Match-id-199d65c96dbe9e4917754ef3c04eeebb79f76af9
This commit is contained in:
@@ -130,7 +130,7 @@ static bool MountFileCmdArgParser(struct CmdArgs *args, const char *arg)
|
||||
char* str = FormatLogMessage("too many files to mount, max number is %u", MAX_MOUNT_NR);
|
||||
Logger(str, LEVEL_ERROR, SCREEN_YES);
|
||||
free(str);
|
||||
return -1;
|
||||
return false;
|
||||
}
|
||||
|
||||
char *dst = &args->files.list[args->files.count++][0];
|
||||
@@ -156,7 +156,7 @@ static bool MountDirCmdArgParser(struct CmdArgs *args, const char *arg)
|
||||
char* str = FormatLogMessage("too many directories to mount, max number is %u", MAX_MOUNT_NR);
|
||||
Logger(str, LEVEL_ERROR, SCREEN_YES);
|
||||
free(str);
|
||||
return -1;
|
||||
return false;
|
||||
}
|
||||
|
||||
char *dst = &args->dirs.list[args->dirs.count++][0];
|
||||
@@ -381,7 +381,6 @@ int Process(int argc, char **argv)
|
||||
Logger("argv pointer is null!", LEVEL_ERROR, SCREEN_YES);
|
||||
return -1;
|
||||
}
|
||||
|
||||
int c;
|
||||
int ret;
|
||||
int optionIndex;
|
||||
|
@@ -132,7 +132,7 @@ static bool MountDeviceProcess(const char* dst, const char* src, const mode_t mo
|
||||
struct stat dstStat;
|
||||
ret = stat(dst, &dstStat);
|
||||
if (ret == 0 && S_ISCHR(dstStat.st_mode)) {
|
||||
return 0; // 特权容器自动挂载HOST所有设备,故此处跳过
|
||||
return true; // 特权容器自动挂载HOST所有设备,故此处跳过
|
||||
} else if (ret == 0) {
|
||||
Logger("dst already exists but not a char device as expected.", LEVEL_ERROR, SCREEN_YES);
|
||||
return false;
|
||||
|
Reference in New Issue
Block a user