[PATCH] Resolve /dev/md/ symlinks when checking swap status.

Vratislav Podzimek vpodzime at redhat.com
Tue Apr 21 06:24:44 UTC 2015


On Mon, 2015-04-20 at 16:18 -0700, Brian C. Lane wrote:
> On Mon, Apr 20, 2015 at 01:03:24PM -0500, David Lehman wrote:
> > Related: #1212073
> > ---
> >  src/plugins/swap.c | 2 +-
> >  1 file changed, 1 insertion(+), 1 deletion(-)
> > 
> > diff --git a/src/plugins/swap.c b/src/plugins/swap.c
> > index ba97fbd..49d47e7 100644
> > --- a/src/plugins/swap.c
> > +++ b/src/plugins/swap.c
> > @@ -223,7 +223,7 @@ gboolean bd_swap_swapstatus (gchar *device, GError **error) {
> >  
> >      /* get the real device node for device-mapper devices since the ones
> >         with meaningful names are just symlinks */
> > -    if (g_str_has_prefix (device, "/dev/mapper")) {
> > +    if (g_str_has_prefix (device, "/dev/mapper") || g_str_has_prefix (device, "/dev/md/")) {
> 
> Maybe also make that "/dev/mapper/"? It should probably also include the
> / just to be sure.
That's a good point, we should add this "/". You should be all set to be
able to push this. Thanks!

-- 
Vratislav Podzimek

Anaconda Rider | Red Hat, Inc. | Brno - Czech Republic



More information about the anaconda-patches mailing list