master - dev-type: dev_get_primary_dev default error code 0, not -1
Gitweb: http://git.fedorahosted.org/git/?p=lvm2.git;a=commitdiff;h=f0ab6c33a9475502ea8af1cf54addba68f97428f Commit: f0ab6c33a9475502ea8af1cf54addba68f97428f Parent: da79fe4c1db8936667954403e6f690df464fc638 Author: Peter Rajnoha <[email protected]> AuthorDate: Fri Jul 19 15:26:53 2013 +0200 Committer: Peter Rajnoha <[email protected]> CommitterDate: Fri Jul 19 15:26:53 2013 +0200
dev-type: dev_get_primary_dev default error code 0, not -1
--- lib/device/dev-type.c | 5 +++-- 1 files changed, 3 insertions(+), 2 deletions(-)
lib/device/dev-type.c +3 -2
@@ -349,7 +349,7 @@ int dev_get_primary_dev(struct dev_types *dt, struct device *dev, dev_t *result)char buffer[64 ];struct stat info;FILE *fp =NULL ; -int parts, residue, size, ret =-1 ; +int parts, residue, size, ret =0 ;/* * Try to get the primary dev out of the
@@ -384,7 +384,8 @@ int dev_get_primary_dev(struct dev_types *dt, struct device *dev, dev_t *result)if (errno !=ENOENT )log_sys_error ("stat" , path); *result = dev->dev; - ret =1 ; goto out;/* dev is not a partition! */ + ret =1 ; + goto out;/* dev is not a partition! */ }