[Top] [All Lists]

Re: xfs_bmap & XML patch

To: monkeyiq <monkeyiq@xxxxxxxxxxxxxxxxxxxxx>
Subject: Re: xfs_bmap & XML patch
From: Nathan Scott <nathans@xxxxxxx>
Date: Tue, 12 Feb 2002 09:51:58 +1100
Cc: linux-xfs@xxxxxxxxxxx
In-reply-to: <200202111322.g1BDM0Z16215@monkeyiq.dnsalias.org>; from monkeyiq@users.sourceforge.net on Mon, Feb 11, 2002 at 11:22:00PM +1000
References: <200202111322.g1BDM0Z16215@monkeyiq.dnsalias.org>
Sender: owner-linux-xfs@xxxxxxxxxxx
User-agent: Mutt/1.2.5i

On Mon, Feb 11, 2002 at 11:22:00PM +1000, monkeyiq wrote:
> Hi,
>   With this little change one can use
> $ ./xfs_bmap -x ~/tmp/holes 
> <?xml version="1.0"?>
> <extentlist>
>     <extent id="0" type="hole" blocks="192" file-offset-start="0" 
> file-offset-end="191"  >
> </extent>
>     <extent id="1" blocks="8" file-offset-start="192" file-offset-end="199"  
> allocation-group="2" allocation-offset-start="236328" 
> allocation-offset-end="236335" >
> </extent>
> </extentlist>

Now that I've seen the code, it seems this could be done with
a 4/5 line perl/awk script which parses `xfs_bmap -vv /tmp/foo`
rather than modifying the existing program at all.  Thoughts?
xfs_bmap output is quite regular, so it shouldn't be too hard..

And when someone wants a <xml version="2.0"> output or some
other trendy output format, only the script would need changes.



<Prev in Thread] Current Thread [Next in Thread>