Merge pull request #170 from a1346054/master

Minor cleanup
This commit is contained in:
Michel Machado 2021-08-25 10:14:24 -04:00 committed by GitHub
commit 8f96a03112
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
13 changed files with 63 additions and 64 deletions

View File

@ -1,7 +1,7 @@
GNU GENERAL PUBLIC LICENSE
Version 3, 29 June 2007
Copyright (C) 2007 Free Software Foundation, Inc. <http://fsf.org/>
Copyright (C) 2007 Free Software Foundation, Inc. <https://fsf.org/>
Everyone is permitted to copy and distribute verbatim copies
of this license document, but changing it is not allowed.
@ -645,7 +645,7 @@ the "copyright" line and a pointer to where the full notice is found.
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
along with this program. If not, see <https://www.gnu.org/licenses/>.
Also add information on how to contact you by electronic and paper mail.
@ -664,11 +664,11 @@ might be different; for a GUI interface, you would use an "about box".
You should also get your employer (if you work as a programmer) or school,
if any, to sign a "copyright disclaimer" for the program, if necessary.
For more information on this, and how to apply and follow the GNU GPL, see
<http://www.gnu.org/licenses/>.
<https://www.gnu.org/licenses/>.
The GNU General Public License does not permit incorporating your program
into proprietary programs. If your program is a subroutine library, you
may consider it more useful to permit linking proprietary applications with
the library. If this is what you want to do, use the GNU Lesser General
Public License instead of this License. But first, please read
<http://www.gnu.org/philosophy/why-not-lgpl.html>.
<https://www.gnu.org/licenses/why-not-lgpl.html>.

View File

@ -22,4 +22,3 @@ Indices and tables
* :ref:`genindex`
* :ref:`modindex`
* :ref:`search`

View File

@ -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

View File

@ -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. */

View File

@ -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),
};

View File

@ -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),
};

View File

@ -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;

View File

@ -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)

View File

@ -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;
}

View File

@ -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;

View File

@ -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;

View File

@ -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;