mirror of
https://github.com/Ascend/ascend-docker-runtime.git
synced 2025-10-18 20:24:34 +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);
|
char* str = FormatLogMessage("too many files to mount, max number is %u", MAX_MOUNT_NR);
|
||||||
Logger(str, LEVEL_ERROR, SCREEN_YES);
|
Logger(str, LEVEL_ERROR, SCREEN_YES);
|
||||||
free(str);
|
free(str);
|
||||||
return -1;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
char *dst = &args->files.list[args->files.count++][0];
|
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);
|
char* str = FormatLogMessage("too many directories to mount, max number is %u", MAX_MOUNT_NR);
|
||||||
Logger(str, LEVEL_ERROR, SCREEN_YES);
|
Logger(str, LEVEL_ERROR, SCREEN_YES);
|
||||||
free(str);
|
free(str);
|
||||||
return -1;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
char *dst = &args->dirs.list[args->dirs.count++][0];
|
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);
|
Logger("argv pointer is null!", LEVEL_ERROR, SCREEN_YES);
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
int c;
|
int c;
|
||||||
int ret;
|
int ret;
|
||||||
int optionIndex;
|
int optionIndex;
|
||||||
|
@@ -132,7 +132,7 @@ static bool MountDeviceProcess(const char* dst, const char* src, const mode_t mo
|
|||||||
struct stat dstStat;
|
struct stat dstStat;
|
||||||
ret = stat(dst, &dstStat);
|
ret = stat(dst, &dstStat);
|
||||||
if (ret == 0 && S_ISCHR(dstStat.st_mode)) {
|
if (ret == 0 && S_ISCHR(dstStat.st_mode)) {
|
||||||
return 0; // 特权容器自动挂载HOST所有设备,故此处跳过
|
return true; // 特权容器自动挂载HOST所有设备,故此处跳过
|
||||||
} else if (ret == 0) {
|
} else if (ret == 0) {
|
||||||
Logger("dst already exists but not a char device as expected.", LEVEL_ERROR, SCREEN_YES);
|
Logger("dst already exists but not a char device as expected.", LEVEL_ERROR, SCREEN_YES);
|
||||||
return false;
|
return false;
|
||||||
|
Reference in New Issue
Block a user