[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH v6 14/33] pc-dimm: drop the prefix of pc-dimm
From: |
Eric Blake |
Subject: |
Re: [Qemu-devel] [PATCH v6 14/33] pc-dimm: drop the prefix of pc-dimm |
Date: |
Fri, 30 Oct 2015 11:06:16 -0600 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.3.0 |
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 <address@hidden>
> ---
Reviewed-by: Eric Blake <address@hidden>
> 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
signature.asc
Description: OpenPGP digital signature
- Re: [Qemu-devel] [PATCH v6 08/33] exec: allow memory to be allocated from any kind of path, (continued)
- [Qemu-devel] [PATCH v6 09/33] exec: allow file_ram_alloc to work on file, Xiao Guangrong, 2015/10/30
- [Qemu-devel] [PATCH v6 13/33] pc-dimm: make pc_existing_dimms_capacity static and rename it, Xiao Guangrong, 2015/10/30
- [Qemu-devel] [PATCH v6 15/33] stubs: rename qmp_pc_dimm_device_list.c, Xiao Guangrong, 2015/10/30
- [Qemu-devel] [PATCH v6 14/33] pc-dimm: drop the prefix of pc-dimm, Xiao Guangrong, 2015/10/30
- [Qemu-devel] [PATCH v6 18/33] dimm: get mapped memory region from DIMMDeviceClass->get_memory_region, Xiao Guangrong, 2015/10/30
- [Qemu-devel] [PATCH v6 16/33] pc-dimm: rename pc-dimm.c and pc-dimm.h, Xiao Guangrong, 2015/10/30
- [Qemu-devel] [PATCH v6 19/33] dimm: keep the state of the whole backend memory, Xiao Guangrong, 2015/10/30
- [Qemu-devel] [PATCH v6 17/33] dimm: abstract dimm device from pc-dimm, Xiao Guangrong, 2015/10/30