]> www.infradead.org Git - users/hch/nvmetcli.git/commit
nvmetcli: create json file's dir first if it doesn't exist
authorYi Zhang <yizhan@redhat.com>
Wed, 12 Apr 2017 11:34:28 +0000 (19:34 +0800)
committerChristoph Hellwig <hch@lst.de>
Tue, 18 Apr 2017 08:02:53 +0000 (10:02 +0200)
commit85bf98b871994f30d11a019edbe640da87e05090
tree4994ad1aef6d351c695ea94a3a9b196d598ebddd
parent9ab2ac6c921068bd9075a5827a4ddb174a744a70
nvmetcli: create json file's dir first if it doesn't exist

The saveconfig operation will be failed as the /etc/nvmet dir
doesn't exist by default, so create it first before save operation.

$ ./nvmetcli
/> saveconfig
[Errno 2] No such file or directory: '/etc/nvmet/config.json.temp'

Signed-off-by: Yi Zhang <yizhan@redhat.com>
Signed-off-by: Christoph Hellwig <hch@lst.de>
nvmet/nvme.py