History | View | Annotate | Download (25.4 kB)
lvmstrap: also test sysfs holders
If a device has entries in its holder directory(/sys/block/$name/holders), it means that some kernel system "uses" that device, and hence should not be considered available.
This patch adds a new 'in-use' check based on this sysfs test, and...
lvmstrap: add support for non-partitioned md disks
This patch, originally written by Marc Schmitt <mschmitt@google.com>,adds support for MD devices (used in a non-partitioned mode). Iabstracted all the original startswith('md') checks into separatefunctions, and also moved the supported disk types to a list....
Update docstrings in tools/ and enable epydoc
This patch updates the docstrings in tools/ (mostly in lvmstrap, whichis very very old code-base) and then enabled the tools in this directoryfor 'make apidoc' too.
Signed-off-by: Iustin Pop <iustin@google.com>...
Remove more unused variables
This removes unused variables in the rest of the code (outside lib/).
Signed-off-by: Iustin Pop <iustin@google.com>Reviewed-by: Olivier Tharan <olive@google.com>
Add targeted pylint disables
This patch should have only:
- pylint disables- docstring changes- whitespace changes
Unify the multiple 'verbose' options
Currently multiple files define a 'verbose' option. This patch moves allthese definitions to a single VERBOSE_OPT option which is exported fromcli.py.
Signed-off-by: Iustin Pop <iustin@google.com>Reviewed-by: Michael Hanselmann <hansmi@google.com>
Merge branch 'next' into branch-2.1
lvmstrap: Change diskinfo to use GenerateTable
This way the produced table is formatted nicely.
Signed-off-by: Stephen Shirley <diamond@google.com>Signed-off-by: Guido Trotter <ultrotter@google.com>Reviewed-by: Michael Hanselmann <hansmi@google.com>
Fix some typos
Signed-off-by: Michael Hanselmann <hansmi@google.com>Reviewed-by: Iustin Pop <iustin@google.com>
Use ReadFile.splitlines() rather than readlines
A few places in the code open a file "manually" rather than using ourwrapper function, because they need an array with the lines. Combiningthe result of utils.ReadFile with splitlines() we get rid of theexceptions....
lvmstrap: allow removable devices too
For testing or just in case a device is exported by a bad driver withthe 'removable' flag set, this patch adds a flag to lvmstrap that allowsit to use these devices too.
Reviewed-by: ultrotter
Codestyle fixes: adding a few empty lines
Various code style fixes for strings.
- When line wrapping is needed, move spaces to the next line.- Remove embedded line breaks from error messages.
Reviewed-by: schreiberal
Replace tabs with spaces.
Reviewed-by: iustinp
Initial commit.