ndctl: add information about size suffixes to docs
Subsystems (2)
PATCH 1/2 ndctl: add information about size suffixes to docs
Add information about the supported size suffixes to the documentation for ndctl-create-namespace. This prevents users from doing silly things like $((32*1024*1024*1024)) on the command line when running ndctl commands.
--- Documentation/ndctl-create-namespace.txt | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-)
Documentation/ndctl-create-namespace.txt +4 -2
@@ -79,8 +79,10 @@ OPTIONS -s:: --size=:: For NVDIMM devices that support namespace labels, set the - namespace size. Otherwise it defaults to the maximum size - specified by platform firmware. + namespace size in bytes. Otherwise it defaults to the maximum + size specified by platform firmware. This option supports the + suffixes "k" or "K" for KiB, "m" or "M" for MiB, "g" or "G" for + GiB and "t" or "T" for TiB. -e:: --reconfig=::
Signature · 6 lines
2.7.4 _______________________________________________ Linux-nvdimm mailing list [email protected] https://lists.01.org/mailman/listinfo/linux-nvdimm
PATCH 2/2 ndctl: fix return value for disable-namespace
On success the "ndctl disable-namespace" returns the number of namespaces that were disabled to the shell as an exit value. This non-zero value is interpreted by the shell as an error.
Fix this by returning 0 on success, just like all the other ndctl commands.
--- ndctl/builtin-xaction-namespace.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
ndctl/builtin-xaction-namespace.c +1 -1
@@ -790,7 +790,7 @@ int cmd_disable_namespace(int argc, const char **argv, struct ndctl_ctx *ctx) }else {fprintf (stderr,"disabled %d namespace%s\n" , disabled, disabled >1 ?"s" :"" ); -return disabled; +return 0 ; } }
Signature · 6 lines
2.7.4 _______________________________________________ Linux-nvdimm mailing list [email protected] https://lists.01.org/mailman/listinfo/linux-nvdimm
Re: [PATCH 2/2] ndctl: fix return value for disable-namespace
Quoted 25 lines · Ross Zwisler
On success the "ndctl disable-namespace" returns the number of namespaces that were disabled to the shell as an exit value. This non-zero value is interpreted by the shell as an error.
Fix this by returning 0 on success, just like all the other ndctl commands.
Signed-off-by Ross Zwisler <[email protected]>--- ndctl/builtin-xaction-namespace.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)ndctl/builtin-xaction-namespace.c +1
-2@@ -790,7 +790,7 @@ int cmd_disable_namespace(int argc, const char **argv, struct ndctl_ctx *ctx) }else {fprintf (stderr,"disabled %d namespace%s\n" , disabled, disabled >1 ?"s" :"" ); -return disabled; +return 0 ; } } --
Quoted 2 lines
2.7.4
Thanks Ross. Applied.
_______________________________________________
Linux-nvdimm mailing list
[email protected]
https://lists.01.org/mailman/listinfo/linux-nvdimm
Quoted 16 lines · Ross Zwisler
Add information about the supported size suffixes to the documentation for ndctl-create-namespace. This prevents users from doing silly things like $((32*1024*1024*1024)) on the command line when running ndctl commands.
Signed-off-by Ross Zwisler <[email protected]>--- Documentation/ndctl-create-namespace.txt | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-)Documentation/ndctl-create-namespace.txt +0
-0@@ -79,8 +79,10 @@ OPTIONS -s:: --size=::
Documentation/ndctl-create-namespace.txt OPTIONS · line 88
Quoted 10 lines
Documentation/ndctl-create-namespace.txt +4
-2For NVDIMM devices that support namespace labels, set the - namespace size. Otherwise it defaults to the maximum size - specified by platform firmware. + namespace size in bytes. Otherwise it defaults to the maximum + size specified by platform firmware. This option supports the + suffixes "k" or "K" for KiB, "m" or "M" for MiB, "g" or "G" for + GiB and "t" or "T" for TiB. -e:: --reconfig=::
Thanks Ross. Applied.
_______________________________________________
Linux-nvdimm mailing list
[email protected]
https://lists.01.org/mailman/listinfo/linux-nvdimm