On Tue, 2017-09-05 at 11:54 +0800, Guan Junxiong wrote: > Cc: Martin Wilck <mwilck@xxxxxxxx> > Signed-off-by: Junxiong Guan <guanjunxiong@xxxxxxxxxx> > --- > libmultipath/uevent.c | 6 +++--- > 1 file changed, 3 insertions(+), 3 deletions(-) > > diff --git a/libmultipath/uevent.c b/libmultipath/uevent.c > index eb44da56..a98633e7 100644 > --- a/libmultipath/uevent.c > +++ b/libmultipath/uevent.c > @@ -885,7 +885,7 @@ int uevent_get_disk_ro(struct uevent *uev) > int i, ro = -1; > > for (i = 0; uev->envp[i] != NULL; i++) { > - if (!strncmp(uev->envp[i], "DISK_RO", 6) && > strlen(uev->envp[i]) > 7) { > + if (!strncmp(uev->envp[i], "DISK_RO", 7) && > strlen(uev->envp[i]) > 8) { > p = uev->envp[i] + 8; > ro = strtoul(p, &q, 10); > if (p == q) { > @@ -904,8 +904,8 @@ char *uevent_get_dm_name(struct uevent *uev) > int i; > > for (i = 0; uev->envp[i] != NULL; i++) { > - if (!strncmp(uev->envp[i], "DM_NAME", 6) && > - strlen(uev->envp[i]) > 7) { > + if (!strncmp(uev->envp[i], "DM_NAME", 7) && > + strlen(uev->envp[i]) > 8) { > p = MALLOC(strlen(uev->envp[i] + 8) + 1); > strcpy(p, uev->envp[i] + 8); > break; Reviewed-by: Martin Wilck <mwilck@xxxxxxxx> -- Dr. Martin Wilck <mwilck@xxxxxxxx>, Tel. +49 (0)911 74053 2107 SUSE Linux GmbH, GF: Felix Imendörffer, Jane Smithard, Graham Norton HRB 21284 (AG Nürnberg) -- dm-devel mailing list dm-devel@xxxxxxxxxx https://www.redhat.com/mailman/listinfo/dm-devel