diff options
author | Sascha Hauer <s.hauer@pengutronix.de> | 2017-03-24 10:30:25 +0100 |
---|---|---|
committer | Sascha Hauer <s.hauer@pengutronix.de> | 2017-03-31 13:57:55 +0200 |
commit | b64fed01b5736e1b296fcf561cb84c9244677564 (patch) | |
tree | 87c2bb5abcd449ad3747dd0e12a755c1ac6bc85b | |
parent | 85312077889b9cd71519afadcf7ef79e360d84a6 (diff) | |
download | dt-utils-b64fed01b5736e1b296fcf561cb84c9244677564.tar.gz dt-utils-b64fed01b5736e1b296fcf561cb84c9244677564.tar.xz |
state: backend_storage: rename more variables
Use "buckets" rather than "copies" in variable names.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
-rw-r--r-- | src/barebox-state/backend_storage.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/barebox-state/backend_storage.c b/src/barebox-state/backend_storage.c index 060127b..2edc755 100644 --- a/src/barebox-state/backend_storage.c +++ b/src/barebox-state/backend_storage.c @@ -48,7 +48,7 @@ * when storing a new state we can just write all buckets in order. */ -static const unsigned int min_copies_written = 1; +static const unsigned int min_buckets_written = 1; /** * state_storage_write - Writes the given data to the storage @@ -61,7 +61,7 @@ static const unsigned int min_copies_written = 1; * operation on all of them. Writes are always in the same sequence. This * ensures, that reading in the same sequence will always return the latest * written valid data first. - * We try to at least write min_copies_written. If this fails we return with an + * We try to at least write min_buckets_written. If this fails we return with an * error. */ int state_storage_write(struct state_backend_storage *storage, @@ -69,7 +69,7 @@ int state_storage_write(struct state_backend_storage *storage, { struct state_backend_storage_bucket *bucket; int ret; - int copies_written = 0; + int buckets_written = 0; if (storage->readonly) return 0; @@ -80,15 +80,15 @@ int state_storage_write(struct state_backend_storage *storage, dev_warn(storage->dev, "Failed to write state backend bucket, %d\n", ret); } else { - ++copies_written; + ++buckets_written; } } - if (copies_written >= min_copies_written) + if (buckets_written >= min_buckets_written) return 0; dev_err(storage->dev, "Failed to write state to at least %d buckets. Successfully written to %d buckets\n", - min_copies_written, copies_written); + min_buckets_written, buckets_written); return -EIO; } |