]> xenbits.xensource.com Git - libvirt.git/commit
util: add virDiskNameParse to handle disk and partition idx
authorJoao Martins <joao.m.martins@oracle.com>
Fri, 13 Nov 2015 13:14:44 +0000 (13:14 +0000)
committerJim Fehlig <jfehlig@suse.com>
Wed, 18 Nov 2015 20:48:38 +0000 (13:48 -0700)
commitb52779b30c6a06cea7918617273e43c47e5e29d2
treea5cdbdd1e766dcb4427269ffc7b5a9ef882940dd
parent6472e54a98fdc6067752485fd036a274fe65b98f
util: add virDiskNameParse to handle disk and partition idx

Introduce a new helper function "virDiskNameParse" which extends
virDiskNameToIndex but handling both disk index and partition index.
Also rework virDiskNameToIndex to be based on virDiskNameParse.
A test is also added for this function testing both valid and
invalid disk names.

Signed-off-by: Joao Martins <joao.m.martins@oracle.com>
src/libvirt_private.syms
src/util/virutil.c
src/util/virutil.h
tests/utiltest.c