[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: xfs_bmap & XML patch
hi,
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.
thanks.
--
Nathan