diff --git a/doc/usage.rst b/doc/usage.rst index 5bf3ecb..e825164 100644 --- a/doc/usage.rst +++ b/doc/usage.rst @@ -107,7 +107,7 @@ correctly written by ``f3write``, and figure out in which file the sector should be and in which position in that file the sector should be. Thus, if a sector is well formed, or with a few bits flipped, but read in an unexpected position, ``f3read`` counts it as overwritten. -Slightly changed sectors, are sectors at right position with a fews bits +Slightly changed sectors, are sectors at right position with a few bits flipped. Notice that ``f3write`` doesn't overwrite sectors by itself, it's done diff --git a/f3probe.c b/f3probe.c index 21babb1..ef653ab 100644 --- a/f3probe.c +++ b/f3probe.c @@ -230,7 +230,7 @@ static const struct unit_test_item ftype_to_params[] = { /* Extreme case for memory usage (limbo drive). */ {(1ULL<<20)+512,1ULL << 40, 40, 9, -1, false}, - /* Geomerty of a real limbo drive with 256MB of strict cache. */ + /* Geometry of a real limbo drive with 256MB of strict cache. */ {7600799744ULL, 67108864000ULL, 36, 9, 19, true}, /* The drive before with a non-strict cache. */ diff --git a/f3read.c b/f3read.c index 7537b2e..b060662 100644 --- a/f3read.c +++ b/f3read.c @@ -404,7 +404,7 @@ static void iterate_files(const char *path, const long *files, if (has_enough_measurements(&fw)) { pr_avg_speed(get_avg_speed(&fw)); } else { - /* If the drive is too fast for the measuments above, + /* If the drive is too fast for the measurements above, * try a coarse approximation of the reading speed. */ int64_t total_time_ms = delay_ms(&t1, &t2); @@ -426,7 +426,7 @@ int main(int argc, char **argv) .start_at = 0, .end_at = LONG_MAX - 1, .max_read_rate = 0, - /* If stdout isn't a terminal, supress progress. */ + /* If stdout isn't a terminal, suppress progress. */ .show_progress = isatty(STDOUT_FILENO), }; diff --git a/f3write.c b/f3write.c index 20e30dc..8942dc5 100644 --- a/f3write.c +++ b/f3write.c @@ -320,7 +320,7 @@ static int fill_fs(const char *path, long start_at, long end_at, if (has_enough_measurements(&fw)) { pr_avg_speed(get_avg_speed(&fw)); } else { - /* If the drive is too fast for the measuments above, + /* If the drive is too fast for the measurements above, * try a coarse approximation of the writing speed. */ int64_t total_time_ms = delay_ms(&t1, &t2); @@ -360,7 +360,7 @@ int main(int argc, char **argv) .start_at = 0, .end_at = LONG_MAX - 1, .max_write_rate = 0, - /* If stdout isn't a terminal, supress progress. */ + /* If stdout isn't a terminal, suppress progress. */ .show_progress = isatty(STDOUT_FILENO), }; diff --git a/libdevs.c b/libdevs.c index fa20d0b..6e39d25 100644 --- a/libdevs.c +++ b/libdevs.c @@ -580,13 +580,13 @@ static int wait_for_reset(struct udev *udev, const char *id_serial, action = udev_device_get_action(dev); new_size_byte = get_udev_dev_size_byte(dev); if (!strcmp(action, "add")) { - /* Deal with the case in wich the user pulls + /* Deal with the case in which the user pulls * the USB device. * * DO NOTHING. */ } else if (!strcmp(action, "change")) { - /* Deal with the case in wich the user pulls + /* Deal with the case in which the user pulls * the memory card from the card reader. */ @@ -712,7 +712,7 @@ static int bdev_manual_usb_reset(struct device *dev) bdev->fd = bdev_open(bdev->filename); if (bdev->fd < 0) { rc = - errno; - warn("Can't REopen device `%s'", bdev->filename); + warn("Can't reopen device `%s'", bdev->filename); goto usb_dev; } @@ -808,7 +808,7 @@ static int bdev_usb_reset(struct device *dev) bdev->fd = bdev_open(bdev->filename); if (bdev->fd < 0) { int rc = - errno; - warn("Can't REopen device `%s'", bdev->filename); + warn("Can't reopen device `%s'", bdev->filename); return rc; } return 0; diff --git a/libdevs.h b/libdevs.h index 1f83ddf..1a3f9e4 100644 --- a/libdevs.h +++ b/libdevs.h @@ -60,7 +60,7 @@ const char *dev_get_filename(struct device *dev); * batch writes or reads. * * It must be a power of 2 greater than, or equal to 2^20. - * The current vaule is 1MB. + * The current value is 1MB. */ #define BIG_BLOCK_SIZE_BYTE (1 << 20) diff --git a/libflow.c b/libflow.c index 5b2aad4..9ddc81a 100644 --- a/libflow.c +++ b/libflow.c @@ -193,7 +193,7 @@ static inline int is_rate_above(const struct flow *fw, static inline int is_rate_below(const struct flow *fw, uint64_t delay, double inst_speed) { - /* We use logical and here to enforce both limist. */ + /* We use logical and here to enforce both limits. */ return delay <= fw->delay_ms && inst_speed < fw->max_process_rate; } diff --git a/libflow.h b/libflow.h index 8dee7d9..bce2f28 100644 --- a/libflow.h +++ b/libflow.h @@ -16,7 +16,7 @@ struct flow { int progress; /* Block size in bytes. */ int block_size; - /* Delay intended between measurements in miliseconds. */ + /* Delay intended between measurements in milliseconds. */ unsigned int delay_ms; /* Increment to apply to @blocks_per_delay. */ int64_t step; diff --git a/libprobe.c b/libprobe.c index a3553d1..a57fe66 100644 --- a/libprobe.c +++ b/libprobe.c @@ -159,7 +159,7 @@ static int write_bisect_blocks(struct device *dev, assert(n_blocks >= 1); - /* Find coeficients of function a*idx + b where idx <= max_idx. */ + /* Find coefficients of function a*idx + b where idx <= max_idx. */ assert(left_pos < right_pos); assert(right_pos - left_pos >= 2); *pb = left_pos + 1; diff --git a/libutils.c b/libutils.c index 8c2ba70..6ea3cfd 100644 --- a/libutils.c +++ b/libutils.c @@ -209,7 +209,7 @@ void fill_buffer_with_block(void *buf, int block_order, uint64_t offset, /* The offset is known by drives, * so one doesn't have to encrypt it. - * Plese don't add @salt here! + * Please don't add @salt here! */ int64_array[0] = offset;