Skip to content

Commit 5148607

Browse files
stevechang0459igaw
authored andcommitted
doc: fix typos and grammar issues in README.md
Signed-off-by: Steve Chang <[email protected]>
1 parent cbfa872 commit 5148607

1 file changed

Lines changed: 38 additions & 36 deletions

File tree

README.md

Lines changed: 38 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -23,18 +23,21 @@ libnvme:
2323
nvme-cli uses meson as its build system. There is more than one way to configure and
2424
build the project in order to mitigate meson dependency on the build environment.
2525

26-
If you build on a relative modern system, either use meson directly or the
26+
If you build on a relatively modern system, either use meson directly or the
2727
Makefile wrapper.
2828

29-
Older distros might ship a too old version of meson, in this case it's possible
29+
Older distros might ship a too old version of meson. In this case, it's possible
3030
to build the project using [samurai](https://github.com/michaelforney/samurai)
3131
and [muon](https://github.com/annacrombie/muon). Both build tools have only a
32-
minimal dependency on the build environment. Too easy this step there is a build
32+
minimal dependency on the build environment. To ease this step, there is a build
3333
script which helps to setup a build environment.
3434

3535
### nvme-cli dependencies (3.x and later):
3636

37-
Starting with nvme-cli 3.x, the libnvme library is fully integrated into the nvme-cli source tree. There is no longer any dependency on an external libnvme repository or package. All required libnvme and libnvme-mi code is included and built as part of nvme-cli.
37+
Starting with nvme-cli 3.x, the libnvme library is fully integrated into the
38+
nvme-cli source tree. There is no longer any dependency on an external libnvme
39+
repository or package. All required libnvme and libnvme-mi code is included and
40+
built as part of nvme-cli.
3841

3942
| Library | Dependency | Notes |
4043
|---------|------------|-------|
@@ -46,8 +49,6 @@ Starting with nvme-cli 3.x, the libnvme library is fully integrated into the nvm
4649

4750
#### Configuring
4851

49-
#### Configuring
50-
5152
No special configuration is required for libnvme, as it is now part of the
5253
nvme-cli source tree. Simply run:
5354

@@ -78,16 +79,16 @@ default configuration (meson, gcc and defaults)
7879

7980
It's possible to change the compiler to clang
8081

81-
`scripts/builds.sh -c clang`
82+
`scripts/build.sh -c clang`
8283

83-
or enabling all the fallbacks
84+
or enable all the fallbacks
8485

8586
`scripts/build.sh fallback`
8687

8788
### Minimal static build with muon
8889

8990
`scripts/build.sh -m muon` will download and build `samurai` and `muon` instead
90-
using `meson` to build the project. This reduces the dependency on the build
91+
of using `meson` to build the project. This reduces the dependency on the build
9192
environment to:
9293
- gcc
9394
- make
@@ -109,11 +110,11 @@ RPM build support via Makefile that uses meson
109110

110111
$ make rpm
111112

112-
Static binary(no dependency) build support via Makefile that uses meson
113+
Static binary (no dependency) build support via Makefile that uses meson
113114

114115
$ make static
115116

116-
If not sure how to use, find the top-level documentation with:
117+
If you are not sure how to use it, find the top-level documentation with:
117118

118119
$ man nvme
119120

@@ -142,17 +143,18 @@ To build without any vendor plugins:
142143

143144
## Distro Support
144145

145-
Many popular distributions (Alpine, Arch, Debian, Fedora, FreeBSD, Gentoo,
146-
Ubuntu, Nix(OS), openSUSE, ...) and the usual package name is nvme-cli.
146+
It is available on many popular distributions (Alpine, Arch, Debian, Fedora,
147+
FreeBSD, Gentoo, Ubuntu, Nix(OS), openSUSE, ...) and the usual package name is
148+
nvme-cli.
147149

148150
#### OpenEmbedded/Yocto
149151

150152
An [nvme-cli recipe](https://layers.openembedded.org/layerindex/recipe/88631/)
151-
is available as part of the `meta-openembeded` layer collection.
153+
is available as part of the `meta-openembedded` layer collection.
152154

153155
#### Buildroot
154156

155-
`nvme-cli` is available as [buildroot](https://buildroot.org) package. The
157+
`nvme-cli` is available as a [buildroot](https://buildroot.org) package. The
156158
package is named `nvme`.
157159

158160
## Developers
@@ -168,11 +170,12 @@ events are created by Linux kernel's 'ftrace' component.
168170

169171
The first thing to do is define a new command entry in the command
170172
list. This is declared in nvme-builtin.h. Simply append a new "ENTRY" into
171-
the list. The ENTRY normally takes three arguments: the "name" of the
173+
the list. The ENTRY normally takes three arguments: the "name" of the
172174
subcommand (this is what the user will type at the command line to invoke
173175
your command), a short help description of what your command does, and the
174176
name of the function callback that you're going to write. Additionally,
175-
You can declare an alias name of subcommand with fourth argument, if needed.
177+
you can declare an alias name of the subcommand with a fourth argument, if
178+
needed.
176179

177180
After the ENTRY is defined, you need to implement the callback. It takes
178181
four arguments: argc, argv, the command structure associated with the
@@ -188,11 +191,11 @@ after the sub-command. So if the command line is "nvme foo --option=bar",
188191
the argc is 1 and argv starts at "--option".
189192
190193
You can then define argument parsing for your sub-command's specific
191-
options then do some command specific action in your callback.
194+
options then do some command-specific action in your callback.
192195
193196
### Add a new plugin
194197
195-
The nvme-cli provides macros to make define a new plug-in simpler. You
198+
The nvme-cli provides macros to make defining a new plug-in simpler. You
196199
can certainly do all this by hand if you want, but it should be easier
197200
to get going using the macros. To start, first create a header file
198201
to define your plugin. This is where you will give your plugin a name,
@@ -226,7 +229,7 @@ PLUGIN(NAME("foo", "Foo plugin"),
226229

227230
In order to have the compiler generate the plugin through the xmacro
228231
expansion, you need to include this header in your source file, with
229-
pre-defining macro directive to create the commands.
232+
a pre-defining macro directive to create the commands.
230233

231234
To get started from the above example, we just need to define "CREATE_CMD"
232235
and include the header:
@@ -333,33 +336,32 @@ drifts silently.
333336
## Dependency
334337

335338
libnvme depends on the /sys/class/nvme-subsystem interface which was
336-
introduced in the Linux kernel release v4.15. Hence nvme-cli 2.x is
337-
only working on kernels >= v4.15. For older kernels nvme-cli 1.x is
338-
recommended to be used.
339+
introduced in the Linux kernel release v4.15. Hence nvme-cli 2.x only works on
340+
kernels >= v4.15. For older kernels nvme-cli 1.x is recommended to be used.
339341

340342
## How to contribute
341343

342344
There are two ways to send code changes to the project. The first one
343345
is by sending the changes to [email protected]. The
344-
second one is by posting a pull request on github. In both cases
346+
second one is by posting a pull request on Github. In both cases
345347
please follow the Linux contributions guidelines as documented in
346348

347349
https://docs.kernel.org/process/submitting-patches.html#
348350

349351
That means the changes should be a clean series (no merges should be
350-
present in a github PR for example) and every commit should build.
352+
present in a Github PR for example) and every commit should build.
351353

352354
See also https://opensource.com/article/19/7/create-pull-request-github
353355

354-
### How to cleanup your series before creating PR
356+
### How to clean up your series before creating a PR
355357

356-
This example here assumes, the changes are in a branch called
358+
This example here assumes the changes are in a branch called
357359
fix-something, which branched away from master in the past. In the
358360
meantime the upstream project has changed, hence the fix-something
359361
branch is not based on the current HEAD. Before posting the PR, the
360362
branch should be rebased on the current HEAD and retest everything.
361363

362-
For example rebasing can be done by following steps
364+
For example, rebasing can be done by the following steps
363365

364366
```shell
365367
# Update master branch
@@ -380,7 +382,7 @@ $ git rebase master
380382
[fixup all merge conflicts]
381383
[retest]
382384

383-
# Push your changes to github and trigger a PR
385+
# Push your changes to Github and trigger a PR
384386
$ git push -u origin fix-something
385387
```
386388

@@ -391,7 +393,7 @@ the file `/etc/nvme/discovery.conf` using the old style, or in the file
391393
`/etc/nvme/config.json` using the new style.
392394

393395
On the other hand, volatile configurations, such as those obtained from
394-
third-party tools like `nvme-stats` or `blktests'` can be stored in the
396+
third-party tools like `nvme-stats` or `blktests`, can be stored in the
395397
`/run/nvme` directory. When using the `nvme-cli` tool, all these configurations
396398
are combined into a single configuration that is used as input.
397399

@@ -403,7 +405,7 @@ file in `/run/nvme` to inform `nvme-cli` that it should not perform any actions
403405
triggered from the udev context. This behavior can be controlled using the
404406
`--context` argument.
405407

406-
For example a `blktests` volatile configuration could look like:
408+
For example, a `blktests` volatile configuration could look like:
407409

408410
```json
409411
[
@@ -427,16 +429,16 @@ For example a `blktests` volatile configuration could look like:
427429
]
428430
```
429431

430-
Note when updating the volatile configuration during runtime, it should done in
431-
a an atomic way. For example create a temporary file without the `.json` file
432-
extension in `/run/nvme` and write the contents to this file. When finished use
432+
Note when updating the volatile configuration during runtime, it should be done
433+
in an atomic way. For example, create a temporary file without the `.json` file
434+
extension in `/run/nvme` and write the contents to this file. When finished, use
433435
`rename` to add the `'.json'` file name extension. This ensures nvme-cli only
434436
sees the complete file.
435437

436438
## Testing
437439

438-
For testing purposes a x86_64 static build from the current HEAD and is
439-
available here:
440+
For testing purposes, an x86_64 static build from the current HEAD is available
441+
here:
440442

441443
https://monom.org/linux-nvme/upload/nvme-cli-latest-x86_64
442444

0 commit comments

Comments
 (0)