🐞 fix(TSG-8143): 区分hos_open_fd的错误值以及fd的值,不再共用一个返回值

This commit is contained in:
pengxuanzheng
2021-10-22 18:02:23 +08:00
parent 88a8dccbd0
commit 400c33e92e
8 changed files with 55 additions and 32 deletions

View File

@@ -131,7 +131,7 @@ int main(int argc, char *argv[])
mode = BUFF_MODE | APPEND_MODE;
printf("hos_write buff start ...\n");
snprintf(object, 1023, "%s_write_APPEND", file_name);
fd = hos_open_fd(bucket, object, callback, NULL, 0);
int err = hos_open_fd(bucket, object, callback, NULL, 0, &fd);
if (hos_write(fd, buf, buffer.st_size) != HOS_CLIENT_OK)
{
printf("error: hos_write failed 1st!\n");