Lines Matching refs:state

715 static int CreateStash(State* state, int maxblocks, const char* blockdev, std::string& base) {  in CreateStash()  argument
732 ErrorAbort(state, kStashCreationFailure, "stat \"%s\" failed: %s\n", in CreateStash()
740 ErrorAbort(state, kStashCreationFailure, "mkdir \"%s\" failed: %s\n", in CreateStash()
746 ErrorAbort(state, kStashCreationFailure, "not enough space for stash\n"); in CreateStash()
766 ErrorAbort(state, kStashCreationFailure, "not enough space for stash (%d more needed)\n", in CreateStash()
1383 static Value* PerformBlockImageUpdate(const char* name, State* state, int /* argc */, Expr* argv[], in PerformBlockImageUpdate() argument
1390 if (state->is_retry) { in PerformBlockImageUpdate()
1399 if (ReadValueArgs(state, argv, 4, &blockdev_filename, &transfer_list_value, in PerformBlockImageUpdate()
1411 ErrorAbort(state, kArgsParsingFailure, "blockdev_filename argument to %s must be string", in PerformBlockImageUpdate()
1416 ErrorAbort(state, kArgsParsingFailure, "transfer_list argument to %s must be blob", name); in PerformBlockImageUpdate()
1420 ErrorAbort(state, kArgsParsingFailure, "new_data_fn argument to %s must be string", name); in PerformBlockImageUpdate()
1424 ErrorAbort(state, kArgsParsingFailure, "patch_data_fn argument to %s must be string", in PerformBlockImageUpdate()
1429 UpdaterInfo* ui = reinterpret_cast<UpdaterInfo*>(state->cookie); in PerformBlockImageUpdate()
1485 ErrorAbort(state, kArgsParsingFailure, "too few lines in the transfer list [%zd]\n", in PerformBlockImageUpdate()
1501 ErrorAbort(state, kArgsParsingFailure, "unexpected block count [%s]\n", lines[1].c_str()); in PerformBlockImageUpdate()
1512 ErrorAbort(state, kArgsParsingFailure, "too few lines in the transfer list [%zu]\n", in PerformBlockImageUpdate()
1523 ErrorAbort(state, kArgsParsingFailure, "unexpected maximum stash blocks [%s]\n", in PerformBlockImageUpdate()
1528 int res = CreateStash(state, stash_max_blocks, blockdev_filename->data, params.stashbase); in PerformBlockImageUpdate()
1624 if (failure_type != kNoCause && state->cause_code == kNoCause) { in PerformBlockImageUpdate()
1625 state->cause_code = failure_type; in PerformBlockImageUpdate()
1687 Value* BlockImageVerifyFn(const char* name, State* state, int argc, Expr* argv[]) { in BlockImageVerifyFn() argument
1701 return PerformBlockImageUpdate(name, state, argc, argv, commands, in BlockImageVerifyFn()
1705 Value* BlockImageUpdateFn(const char* name, State* state, int argc, Expr* argv[]) { in BlockImageUpdateFn() argument
1717 return PerformBlockImageUpdate(name, state, argc, argv, commands, in BlockImageUpdateFn()
1721 Value* RangeSha1Fn(const char* name, State* state, int /* argc */, Expr* argv[]) { in RangeSha1Fn() argument
1725 if (ReadValueArgs(state, argv, 2, &blockdev_filename, &ranges) < 0) { in RangeSha1Fn()
1733 ErrorAbort(state, kArgsParsingFailure, "blockdev_filename argument to %s must be string", in RangeSha1Fn()
1738 ErrorAbort(state, kArgsParsingFailure, "ranges argument to %s must be string", name); in RangeSha1Fn()
1745 ErrorAbort(state, kFileOpenFailure, "open \"%s\" failed: %s", blockdev_filename->data, in RangeSha1Fn()
1759 ErrorAbort(state, kLseekFailure, "failed to seek %s: %s", blockdev_filename->data, in RangeSha1Fn()
1766 ErrorAbort(state, kFreadFailure, "failed to read %s: %s", blockdev_filename->data, in RangeSha1Fn()
1785 Value* CheckFirstBlockFn(const char* name, State* state, int argc, Expr* argv[]) { in CheckFirstBlockFn() argument
1788 if (ReadValueArgs(state, argv, 1, &arg_filename) < 0) { in CheckFirstBlockFn()
1794 ErrorAbort(state, kArgsParsingFailure, "filename argument to %s must be string", name); in CheckFirstBlockFn()
1801 ErrorAbort(state, kFileOpenFailure, "open \"%s\" failed: %s", arg_filename->data, in CheckFirstBlockFn()
1810 ErrorAbort(state, kFreadFailure, "failed to read %s: %s", arg_filename->data, in CheckFirstBlockFn()
1826 uiPrintf(state, "Device was remounted R/W %d times\n", mount_count); in CheckFirstBlockFn()
1827 uiPrintf(state, "Last remount happened on %s", ctime(&mount_time)); in CheckFirstBlockFn()
1834 Value* BlockImageRecoverFn(const char* name, State* state, int argc, Expr* argv[]) { in BlockImageRecoverFn() argument
1838 if (ReadValueArgs(state, argv, 2, &arg_filename, &arg_ranges) < 0) { in BlockImageRecoverFn()
1846 ErrorAbort(state, kArgsParsingFailure, "filename argument to %s must be string", name); in BlockImageRecoverFn()
1850 ErrorAbort(state, kArgsParsingFailure, "ranges argument to %s must be string", name); in BlockImageRecoverFn()
1861 ErrorAbort(state, kLibfecFailure, "fec_open \"%s\" failed: %s", filename->data, in BlockImageRecoverFn()
1867 ErrorAbort(state, kLibfecFailure, "unable to use metadata to correct errors"); in BlockImageRecoverFn()
1874 ErrorAbort(state, kLibfecFailure, "failed to read FEC status"); in BlockImageRecoverFn()
1891 ErrorAbort(state, kLibfecFailure, "failed to recover %s (block %zu): %s", in BlockImageRecoverFn()