Re: [Qemu-devel] [PATCH v6 14/33] pc-dimm: drop the prefix of pc-dimm

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

 



On 10/29/2015 11:56 PM, Xiao Guangrong wrote:
> This patch is generated by this script:
> 
> find ./ -name "*.[ch]" -o -name "*.json" -o -name "trace-events" -type f \
> | xargs sed -i "s/PC_DIMM/DIMM/g"
> 
> find ./ -name "*.[ch]" -o -name "*.json" -o -name "trace-events" -type f \
> | xargs sed -i "s/PCDIMM/DIMM/g"
> 
> find ./ -name "*.[ch]" -o -name "*.json" -o -name "trace-events" -type f \
> | xargs sed -i "s/pc_dimm/dimm/g"

The '-type f' binds only to the '-name trace-events' clause, and not the
'name "*.[ch]"' or '-name "*.json"', but since we don't have any
directories by those names, it didn't matter.  You probably could have
eliminated the -type f with no consequences, rather than adding "(" and
")".  In fact, you could have used git rather than find to do it:

git grep -il 'pc_\?dimm' | xargs ...

which finds only one additional instance of pc_dimm in
stubs/Makefile.objs - so maybe you should:

git mv stubs/qmp_{pc_,}dimm_device_list.c

either in this patch or as a followup.

Could compress these three sed lines into one, if desired:
find ... | xargs sed -i 's/pc_\?\(dimm\)/\1/ig'

But doesn't really matter.  I'm fine if you leave your commit message
as-is, and will let you decide what to do about the stub file name.

> 
> find ./ -name "trace-events" -type f | xargs sed -i "s/pc-dimm/dimm/g"
> 
> It prepares the work which abstracts dimm device type for both pc-dimm and
> nvdimm
> 
> Signed-off-by: Xiao Guangrong <guangrong.xiao@xxxxxxxxxxxxxxx>
> ---

Reviewed-by: Eric Blake <eblake@xxxxxxxxxx>

>  qapi-schema.json                |   8 +--

Touches public interface files, but does not affect ABI, so it is safe.

-- 
Eric Blake   eblake redhat com    +1-919-301-3266
Libvirt virtualization library http://libvirt.org

Attachment: signature.asc
Description: OpenPGP digital signature


[Index of Archives]     [KVM ARM]     [KVM ia64]     [KVM ppc]     [Virtualization Tools]     [Spice Development]     [Libvirt]     [Libvirt Users]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite Questions]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux