1
0
mirror of git://sourceware.org/git/lvm2.git synced 2024-12-21 13:34:40 +03:00

dev-type: dev_get_primary_dev default error code 0, not -1

This commit is contained in:
Peter Rajnoha 2013-07-19 15:26:53 +02:00
parent da79fe4c1d
commit f0ab6c33a9

View File

@ -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! */
}