Lines Matching refs:state

882 static int CreateStash(State* state, size_t maxblocks, const std::string& base) {  in CreateStash()  argument
887 ErrorAbort(state, kStashCreationFailure, "stat \"%s\" failed: %s", dirname.c_str(), in CreateStash()
898 ErrorAbort(state, kStashCreationFailure, "mkdir \"%s\" failed: %s", dirname.c_str(), in CreateStash()
904 ErrorAbort(state, kStashCreationFailure, "chown \"%s\" failed: %s", dirname.c_str(), in CreateStash()
910 ErrorAbort(state, kStashCreationFailure, "not enough space for stash (%zu needed)", in CreateStash()
942 ErrorAbort(state, kStashCreationFailure, "not enough space for stash (%zu more needed)", in CreateStash()
1626 static Value* PerformBlockImageUpdate(const char* name, State* state, in PerformBlockImageUpdate() argument
1634 if (state->is_retry) { in PerformBlockImageUpdate()
1639 ErrorAbort(state, kArgsParsingFailure, "block_image_update expects 4 arguments, got %zu", in PerformBlockImageUpdate()
1645 if (!ReadValueArgs(state, argv, &args)) { in PerformBlockImageUpdate()
1660 ErrorAbort(state, kArgsParsingFailure, "blockdev_filename argument to %s must be string", name); in PerformBlockImageUpdate()
1664 ErrorAbort(state, kArgsParsingFailure, "transfer_list argument to %s must be blob", name); in PerformBlockImageUpdate()
1668 ErrorAbort(state, kArgsParsingFailure, "new_data_fn argument to %s must be string", name); in PerformBlockImageUpdate()
1672 ErrorAbort(state, kArgsParsingFailure, "patch_data_fn argument to %s must be string", name); in PerformBlockImageUpdate()
1676 auto updater = state->updater; in PerformBlockImageUpdate()
1740 ErrorAbort(state, kArgsParsingFailure, "too few lines in the transfer list [%zu]", in PerformBlockImageUpdate()
1756 ErrorAbort(state, kArgsParsingFailure, "unexpected block count [%s]", lines[1].c_str()); in PerformBlockImageUpdate()
1770 ErrorAbort(state, kArgsParsingFailure, "unexpected maximum stash blocks [%s]", in PerformBlockImageUpdate()
1775 int res = CreateStash(state, stash_max_blocks, params.stashbase); in PerformBlockImageUpdate()
1973 if (failure_type != kNoCause && state->cause_code == kNoCause) { in PerformBlockImageUpdate()
1974 state->cause_code = failure_type; in PerformBlockImageUpdate()
2024 Value* BlockImageVerifyFn(const char* name, State* state, in BlockImageVerifyFn() argument
2044 return PerformBlockImageUpdate(name, state, argv, command_map, true); in BlockImageVerifyFn()
2047 Value* BlockImageUpdateFn(const char* name, State* state, in BlockImageUpdateFn() argument
2065 return PerformBlockImageUpdate(name, state, argv, command_map, false); in BlockImageUpdateFn()
2068 Value* RangeSha1Fn(const char* name, State* state, const std::vector<std::unique_ptr<Expr>>& argv) { in RangeSha1Fn() argument
2070 ErrorAbort(state, kArgsParsingFailure, "range_sha1 expects 2 arguments, got %zu", argv.size()); in RangeSha1Fn()
2075 if (!ReadValueArgs(state, argv, &args)) { in RangeSha1Fn()
2083 ErrorAbort(state, kArgsParsingFailure, "blockdev_filename argument to %s must be string", name); in RangeSha1Fn()
2087 ErrorAbort(state, kArgsParsingFailure, "ranges argument to %s must be string", name); in RangeSha1Fn()
2091 auto block_device_path = state->updater->FindBlockDeviceName(blockdev_filename->data); in RangeSha1Fn()
2101 ErrorAbort(state, cause_code, "open \"%s\" failed: %s", block_device_path.c_str(), in RangeSha1Fn()
2115 ErrorAbort(state, kLseekFailure, "failed to seek %s: %s", block_device_path.c_str(), in RangeSha1Fn()
2123 ErrorAbort(state, cause_code, "failed to read %s: %s", block_device_path.c_str(), in RangeSha1Fn()
2142 Value* CheckFirstBlockFn(const char* name, State* state, in CheckFirstBlockFn() argument
2145 ErrorAbort(state, kArgsParsingFailure, "check_first_block expects 1 argument, got %zu", in CheckFirstBlockFn()
2151 if (!ReadValueArgs(state, argv, &args)) { in CheckFirstBlockFn()
2158 ErrorAbort(state, kArgsParsingFailure, "filename argument to %s must be string", name); in CheckFirstBlockFn()
2162 auto block_device_path = state->updater->FindBlockDeviceName(arg_filename->data); in CheckFirstBlockFn()
2172 ErrorAbort(state, cause_code, "open \"%s\" failed: %s", block_device_path.c_str(), in CheckFirstBlockFn()
2182 ErrorAbort(state, cause_code, "failed to read %s: %s", block_device_path.c_str(), in CheckFirstBlockFn()
2198 state->updater->UiPrint( in CheckFirstBlockFn()
2200 state->updater->UiPrint( in CheckFirstBlockFn()
2207 Value* BlockImageRecoverFn(const char* name, State* state, in BlockImageRecoverFn() argument
2210 ErrorAbort(state, kArgsParsingFailure, "block_image_recover expects 2 arguments, got %zu", in BlockImageRecoverFn()
2216 if (!ReadValueArgs(state, argv, &args)) { in BlockImageRecoverFn()
2224 ErrorAbort(state, kArgsParsingFailure, "filename argument to %s must be string", name); in BlockImageRecoverFn()
2228 ErrorAbort(state, kArgsParsingFailure, "ranges argument to %s must be string", name); in BlockImageRecoverFn()
2233 ErrorAbort(state, kArgsParsingFailure, "failed to parse ranges: %s", ranges->data.c_str()); in BlockImageRecoverFn()
2237 auto block_device_path = state->updater->FindBlockDeviceName(filename->data); in BlockImageRecoverFn()
2251 ErrorAbort(state, kLibfecFailure, "fec_open \"%s\" failed: %s", block_device_path.c_str(), in BlockImageRecoverFn()
2257 ErrorAbort(state, kLibfecFailure, "unable to use metadata to correct errors"); in BlockImageRecoverFn()
2263 ErrorAbort(state, kLibfecFailure, "failed to read FEC status"); in BlockImageRecoverFn()
2276 ErrorAbort(state, kLibfecFailure, "failed to recover %s (block %zu): %s", in BlockImageRecoverFn()