Re: [PATCH 2/7] filter: fix assumed whitespace in _filefrag_filter regex

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



On Mon, Jan 21, 2019 at 11:33:11AM -0500, jeffm@xxxxxxxx wrote:
> From: Jeff Mahoney <jeffm@xxxxxxxx>
> 
> The regex assumes there will be whitespace after the .. in the ranges
> and, with larger offsets, there may not be any.

Does more than this, right?

> Signed-off-by: Jeff Mahoney <jeffm@xxxxxxxx>
> ---
>  common/filter | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/common/filter b/common/filter
> index ed082d24..b4443a34 100644
> --- a/common/filter
> +++ b/common/filter
> @@ -532,7 +532,7 @@ _filter_filefrag()
>  		next
>  	}
>  	($ext, $logical, $physical, $length) =
> -		(/^\s*(\d+):\s+(\d+)..\s+\d+:\s+(\d+)..\s+\d+:\s+(\d+):/)
> +		(/^\s*(\d+):\s+(\d+)\.\.\s*\d+:\s+(\d+)\.\.\s*\d+:\s+(\d+):/)

This is escaping "..", too, isn't it? 

Cheers,

Dave.
-- 
Dave Chinner
david@xxxxxxxxxxxxx



[Index of Archives]     [Linux Filesystems Development]     [Linux NFS]     [Linux NILFS]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux