From 20cd1f86f8a124f1cc0c5e85bfec5adfff43ef23 Mon Sep 17 00:00:00 2001 From: Andrea Mazzoleni Date: Mon, 23 May 2016 22:37:18 +0200 Subject: [PATCH] Fix typos in comments No functional change. --- cmdline/device.c | 2 +- cmdline/elem.h | 4 ++-- cmdline/portable.h | 2 +- cmdline/state.c | 2 +- cmdline/support.c | 6 +++--- cmdline/sync.c | 10 +++++----- cmdline/unix.c | 2 +- cmdline/util.c | 2 +- 8 files changed, 15 insertions(+), 15 deletions(-) diff --git a/cmdline/device.c b/cmdline/device.c index 8408d1a8..af276e32 100644 --- a/cmdline/device.c +++ b/cmdline/device.c @@ -486,7 +486,7 @@ static double smart_afr(uint64_t* smart) if (smart[188] != SMART_UNASSIGNED) { /* with Seagate disks, there are three different 16 bits value reported */ - /* the lowest one is the most significative */ + /* the lowest one is the most significant */ double r = smart_afr_value(SMART_188_R, SMART_188_STEP, smart[188] & mask16); if (afr < r) afr = r; diff --git a/cmdline/elem.h b/cmdline/elem.h index 767cadc9..98ce947c 100644 --- a/cmdline/elem.h +++ b/cmdline/elem.h @@ -361,7 +361,7 @@ struct snapraid_disk { * Mutex for protecting the filesystem structure. * * Specifically, this protects ::fs_parity, ::fs_file, and ::fs_last, - * meaning that it protectes only extents. + * meaning that it protects only extents. * * Files, links and dirs are not protected as they are not expected to * change during multithread processing. @@ -605,7 +605,7 @@ static inline int hash_is_zero(const unsigned char* hash) } /** - * Check if the specified hash is uniquievocally repesenting the data. + * Check if the specified hash is unequivocally representing the data. * * If working with reduced hash lengths, this function always return 0. */ diff --git a/cmdline/portable.h b/cmdline/portable.h index de758089..f2cc0011 100644 --- a/cmdline/portable.h +++ b/cmdline/portable.h @@ -396,7 +396,7 @@ int exit_sync_needed; #define EXIT_SYNC_NEEDED exit_sync_needed /** - * Fill memory with psudeo-random values. + * Fill memory with pseudo-random values. */ int randomize(void* ptr, size_t size); diff --git a/cmdline/state.c b/cmdline/state.c index b091cffb..9e40cea9 100644 --- a/cmdline/state.c +++ b/cmdline/state.c @@ -1990,7 +1990,7 @@ static void state_read_content(struct snapraid_state* state, const char* path, S } /* if the block contains a hash of past data */ - /* and we are clearing such undeterminated hashes */ + /* and we are clearing such indeterminate hashes */ if (state->clear_past_hash && block_has_past_hash(block) ) { diff --git a/cmdline/support.c b/cmdline/support.c index 6e176a0e..cb04ba4c 100644 --- a/cmdline/support.c +++ b/cmdline/support.c @@ -590,7 +590,7 @@ unsigned split(char** split_map, unsigned split_max, char* str, const char* deli { unsigned mac = 0; - /* skip initial delimiers */ + /* skip initial delimiters */ str += strspn(str, delimiters); while (*str != 0 || mac == split_max) { @@ -808,7 +808,7 @@ int mkancestor(const char* file) * the EEXIST error because the call will fail with ERROR_WRITE_PROTECTED. * * Also in Windows it's better to use lstat() than stat() because it - * doen't need to open the dir with CreateFile(). + * doesn't need to open the dir with CreateFile(). */ if (lstat(dir, &st) == 0) { /* it already exists */ @@ -984,7 +984,7 @@ int advise_write(struct advise_struct* advise, int f, data_off_t offset, data_of * Linus "Unexpected splice "always copy" behavior observed" * http://thread.gmane.org/gmane.linux.kernel/987247/focus=988176 * --- - * The behavior for dirty page writeback is _not_ welldefined, and + * The behavior for dirty page writeback is _not_ well defined, and * if you do POSIX_FADV_DONTNEED, I would suggest you do it as part of that * writeback logic, ie you do it only on ranges that you have just waited on. * diff --git a/cmdline/sync.c b/cmdline/sync.c index 95f7147f..79a52318 100644 --- a/cmdline/sync.c +++ b/cmdline/sync.c @@ -343,7 +343,7 @@ end: state_progress_end(state, countpos, countmax, countsize); /* note that at this point no io_error is possible */ - /* becasue at the first one we bail out */ + /* because at the first one we bail out */ assert(io_error == 0); if (error || io_error || silent_error) { @@ -495,8 +495,8 @@ static void sync_data_reader(struct snapraid_worker* worker, struct snapraid_tas /* get the block */ task->block = fs_par2block_find(disk, blockcur); - /* if the block has no file, meanining that it's EMPTY or DELETED, */ - /* it doesn't partecipate in the new parity computation */ + /* if the block has no file, meaning that it's EMPTY or DELETED, */ + /* it doesn't participate in the new parity computation */ if (!block_has_file(task->block)) { /* use an empty block */ memset(buffer, 0, state->block_size); @@ -983,7 +983,7 @@ static int state_sync_process(struct snapraid_state* state, struct snapraid_pari /* have "parity_needs_to_be_updated" already at 1 */ assert(block_state_get(block) == BLOCK_STATE_CHG); - /* if the hash represents the data uniquievocally */ + /* if the hash represents the data unequivocally */ if (hash_is_unique(block->hash)) { /* check if the hash is changed */ if (memcmp(hash, block->hash, BLOCK_HASH_SIZE) != 0) { @@ -1193,7 +1193,7 @@ static int state_sync_process(struct snapraid_state* state, struct snapraid_pari if (parity_needs_to_be_updated && !silent_error_on_this_block ) { - /* if rehash is neeed */ + /* if rehash is needed */ if (rehash) { /* store all the new hash already computed */ for (j = 0; j < diskmax; ++j) { diff --git a/cmdline/unix.c b/cmdline/unix.c index 3fb2739d..2447ae7e 100644 --- a/cmdline/unix.c +++ b/cmdline/unix.c @@ -193,7 +193,7 @@ static int devdereference(uint64_t device, uint64_t* new_device) char path[PATH_MAX]; struct stat st; - /* use the proc interface to get the device containinig the filesystem */ + /* use the proc interface to get the device containing the filesystem */ if (devresolve_proc(device, path, sizeof(path)) != 0) { /* LCOV_EXCL_START */ return -1; diff --git a/cmdline/util.c b/cmdline/util.c index fda57f84..ba8f32e8 100644 --- a/cmdline/util.c +++ b/cmdline/util.c @@ -103,7 +103,7 @@ void* malloc_nofail_test(size_t size) /** * Fast memory test. * - * It's similat at raid_mtest_vector() but faster because + * It's similar at raid_mtest_vector() but faster because * we have a lot of buffers to verify. */ static int fast_mtest_vector(int n, size_t size, void** vv)