Lines Matching refs:state
877 static int CreateStash(State* state, size_t maxblocks, const std::string& base) { in CreateStash() argument
882 ErrorAbort(state, kStashCreationFailure, "stat \"%s\" failed: %s", dirname.c_str(), in CreateStash()
893 ErrorAbort(state, kStashCreationFailure, "mkdir \"%s\" failed: %s", dirname.c_str(), in CreateStash()
899 ErrorAbort(state, kStashCreationFailure, "chown \"%s\" failed: %s", dirname.c_str(), in CreateStash()
905 ErrorAbort(state, kStashCreationFailure, "not enough space for stash (%zu needed)", in CreateStash()
937 ErrorAbort(state, kStashCreationFailure, "not enough space for stash (%zu more needed)", in CreateStash()
1621 static Value* PerformBlockImageUpdate(const char* name, State* state, in PerformBlockImageUpdate() argument
1629 if (state->is_retry) { in PerformBlockImageUpdate()
1634 ErrorAbort(state, kArgsParsingFailure, "block_image_update expects 4 arguments, got %zu", in PerformBlockImageUpdate()
1640 if (!ReadValueArgs(state, argv, &args)) { in PerformBlockImageUpdate()
1655 ErrorAbort(state, kArgsParsingFailure, "blockdev_filename argument to %s must be string", name); in PerformBlockImageUpdate()
1659 ErrorAbort(state, kArgsParsingFailure, "transfer_list argument to %s must be blob", name); in PerformBlockImageUpdate()
1663 ErrorAbort(state, kArgsParsingFailure, "new_data_fn argument to %s must be string", name); in PerformBlockImageUpdate()
1667 ErrorAbort(state, kArgsParsingFailure, "patch_data_fn argument to %s must be string", name); in PerformBlockImageUpdate()
1671 UpdaterInfo* ui = static_cast<UpdaterInfo*>(state->cookie); in PerformBlockImageUpdate()
1735 ErrorAbort(state, kArgsParsingFailure, "too few lines in the transfer list [%zu]", in PerformBlockImageUpdate()
1751 ErrorAbort(state, kArgsParsingFailure, "unexpected block count [%s]", lines[1].c_str()); in PerformBlockImageUpdate()
1765 ErrorAbort(state, kArgsParsingFailure, "unexpected maximum stash blocks [%s]", in PerformBlockImageUpdate()
1770 int res = CreateStash(state, stash_max_blocks, params.stashbase); in PerformBlockImageUpdate()
1964 if (failure_type != kNoCause && state->cause_code == kNoCause) { in PerformBlockImageUpdate()
1965 state->cause_code = failure_type; in PerformBlockImageUpdate()
2015 Value* BlockImageVerifyFn(const char* name, State* state, in BlockImageVerifyFn() argument
2035 return PerformBlockImageUpdate(name, state, argv, command_map, true); in BlockImageVerifyFn()
2038 Value* BlockImageUpdateFn(const char* name, State* state, in BlockImageUpdateFn() argument
2056 return PerformBlockImageUpdate(name, state, argv, command_map, false); in BlockImageUpdateFn()
2059 Value* RangeSha1Fn(const char* name, State* state, const std::vector<std::unique_ptr<Expr>>& argv) { in RangeSha1Fn() argument
2061 ErrorAbort(state, kArgsParsingFailure, "range_sha1 expects 2 arguments, got %zu", argv.size()); in RangeSha1Fn()
2066 if (!ReadValueArgs(state, argv, &args)) { in RangeSha1Fn()
2074 ErrorAbort(state, kArgsParsingFailure, "blockdev_filename argument to %s must be string", name); in RangeSha1Fn()
2078 ErrorAbort(state, kArgsParsingFailure, "ranges argument to %s must be string", name); in RangeSha1Fn()
2085 ErrorAbort(state, cause_code, "open \"%s\" failed: %s", blockdev_filename->data.c_str(), in RangeSha1Fn()
2099 ErrorAbort(state, kLseekFailure, "failed to seek %s: %s", blockdev_filename->data.c_str(), in RangeSha1Fn()
2107 ErrorAbort(state, cause_code, "failed to read %s: %s", blockdev_filename->data.c_str(), in RangeSha1Fn()
2126 Value* CheckFirstBlockFn(const char* name, State* state, in CheckFirstBlockFn() argument
2129 ErrorAbort(state, kArgsParsingFailure, "check_first_block expects 1 argument, got %zu", in CheckFirstBlockFn()
2135 if (!ReadValueArgs(state, argv, &args)) { in CheckFirstBlockFn()
2142 ErrorAbort(state, kArgsParsingFailure, "filename argument to %s must be string", name); in CheckFirstBlockFn()
2149 ErrorAbort(state, cause_code, "open \"%s\" failed: %s", arg_filename->data.c_str(), in CheckFirstBlockFn()
2159 ErrorAbort(state, cause_code, "failed to read %s: %s", arg_filename->data.c_str(), in CheckFirstBlockFn()
2175 uiPrintf(state, "Device was remounted R/W %" PRIu16 " times", mount_count); in CheckFirstBlockFn()
2176 uiPrintf(state, "Last remount happened on %s", ctime(&mount_time)); in CheckFirstBlockFn()
2182 Value* BlockImageRecoverFn(const char* name, State* state, in BlockImageRecoverFn() argument
2185 ErrorAbort(state, kArgsParsingFailure, "block_image_recover expects 2 arguments, got %zu", in BlockImageRecoverFn()
2191 if (!ReadValueArgs(state, argv, &args)) { in BlockImageRecoverFn()
2199 ErrorAbort(state, kArgsParsingFailure, "filename argument to %s must be string", name); in BlockImageRecoverFn()
2203 ErrorAbort(state, kArgsParsingFailure, "ranges argument to %s must be string", name); in BlockImageRecoverFn()
2208 ErrorAbort(state, kArgsParsingFailure, "failed to parse ranges: %s", ranges->data.c_str()); in BlockImageRecoverFn()
2219 ErrorAbort(state, kLibfecFailure, "fec_open \"%s\" failed: %s", filename->data.c_str(), in BlockImageRecoverFn()
2225 ErrorAbort(state, kLibfecFailure, "unable to use metadata to correct errors"); in BlockImageRecoverFn()
2231 ErrorAbort(state, kLibfecFailure, "failed to read FEC status"); in BlockImageRecoverFn()
2244 ErrorAbort(state, kLibfecFailure, "failed to recover %s (block %zu): %s", in BlockImageRecoverFn()