GEOM: Fix regression after 7f16b501e25.
find_geom() in some classes trim leading "/dev/" from geom names. Lack of that in geom_gettree_geom() broke some existing scripts. PR: 262554 MFC after: 2 months
This commit is contained in:
parent
f6f357efb1
commit
bd0f3d34fa
@ -37,6 +37,7 @@
|
||||
#include <string.h>
|
||||
#include <unistd.h>
|
||||
#include <errno.h>
|
||||
#include <paths.h>
|
||||
#include <fcntl.h>
|
||||
#include <ctype.h>
|
||||
#include <sys/stat.h>
|
||||
@ -481,6 +482,8 @@ geom_gettree_geom(struct gmesh *gmp, const char *c, const char *g, int parents)
|
||||
char *p;
|
||||
int error;
|
||||
|
||||
if (g != NULL && strncmp(g, _PATH_DEV, sizeof(_PATH_DEV) - 1) == 0)
|
||||
g += sizeof(_PATH_DEV) - 1;
|
||||
p = geom_getxml_geom(c, g, parents);
|
||||
if (p == NULL)
|
||||
return (errno);
|
||||
|
Loading…
x
Reference in New Issue
Block a user