Lines Matching refs:res
405 int res; in GetStashFileName() local
427 res = snprintf(fn, len, STASH_DIRECTORY_BASE "/%s/%s%s", base, id, postfix); in GetStashFileName()
429 if (res < 0 || res >= len) { in GetStashFileName()
430 fprintf(stderr, "failed to format file name (return value %d)\n", res); in GetStashFileName()
449 int res; in EnumerateStash() local
478 res = snprintf(fn, len, "%s/%s", dirname, item->d_name); in EnumerateStash()
480 if (res < 0 || res >= len) { in EnumerateStash()
481 fprintf(stderr, "failed to format file name (return value %d)\n", res); in EnumerateStash()
562 int res; in LoadStash() local
579 res = stat(fn, &st); in LoadStash()
581 if (res == -1) { in LoadStash()
637 int res; in WriteStash() local
657 res = stat(cn, &st); in WriteStash()
659 if (res == 0) { in WriteStash()
739 int res; in CreateStash() local
766 res = stat(dirname, &st); in CreateStash()
768 if (res == -1 && errno != ENOENT) { in CreateStash()
771 } else if (res != 0) { in CreateStash()
773 res = mkdir(dirname, STASH_DIRECTORY_MODE); in CreateStash()
775 if (res != 0) { in CreateStash()
818 int res = -1; in SaveStash() local
915 int res; in LoadSrcTgtVersion2() local
935 res = ReadBlocks(src, *buffer, fd); in LoadSrcTgtVersion2()
943 if (res == -1) { in LoadSrcTgtVersion2()
965 res = LoadStash(stashbase, colon, 0, NULL, &stash, &stashalloc, 1); in LoadSrcTgtVersion2()
967 if (res == -1) { in LoadSrcTgtVersion2()
1535 int res; in PerformBlockImageUpdate() local
1677 res = CreateStash(state, stash_max_blocks, blockdev_filename->data, in PerformBlockImageUpdate()
1680 if (res == -1) { in PerformBlockImageUpdate()
1684 params.createdstash = res; in PerformBlockImageUpdate()