[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#541493: marked as done (bug in where_is_mounted())



Your message dated Sun, 14 Feb 2010 16:13:57 +0100
with message-id <4B781335.3000208@debian.org>
and subject line Re: Bug#541493: live-initramfs: Bug in where_is_mounted()
has caused the Debian Bug report #541493,
regarding bug in where_is_mounted()
to be marked as done.

This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.

(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact owner@bugs.debian.org
immediately.)


-- 
541493: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=541493
Debian Bug Tracking System
Contact owner@bugs.debian.org with problems
--- Begin Message ---
Package: live-initramfs
Version:

This function has a comment that grep should return the first match found, when in fact it returns all that are found:


where_is_mounted ()
{
        device=${1}

        if grep -q "^${device} " /proc/mounts
        then
                # return the first found
                grep "^${device} " /proc/mounts | cut -f2 -d ' '
        fi
}


Need to change the grep line to use the -m parameter:

                grep -m 1 "^${device} " /proc/mounts | cut -f2 -d ' '


Thanks!

Tony



--- End Message ---
--- Begin Message ---
Version: 1.157.3-1

Anthony L. Awtrey wrote:
>> why?

[...]

> I assumed that the comment in the function meant that the author
> intended to only return the first match found. Changing the code as I
> recommended ensures that is what happens.

thanks for the detailed explanation, it wasn't clear from the initial
bug report what was the intention behind it.

anyhow, i wanted to change it and then just found out that it has been
already changed[0] some time ago, thus closing with appropriate version.
 sorry for the inconveniences.

Regards,
Daniel

[0]
http://live.debian.net/gitweb?p=live-initramfs.git;a=commitdiff;h=6b0c40b9c369204fef5b93ca93b915d703b47e7e;hp=8b75610ec5d83820c8189ad5b8d366d5accfd7a1

-- 
Address:        Daniel Baumann, Burgunderstrasse 3, CH-4562 Biberist
Email:          daniel.baumann@panthera-systems.net
Internet:       http://people.panthera-systems.net/~daniel-baumann/


--- End Message ---

Reply to: