qemu-devel
[Top][All Lists]
Advanced

[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: Xiao Guangrong
Subject: Re: [Qemu-devel] [PATCH v6 14/33] pc-dimm: drop the prefix of pc-dimm
Date: Sat, 31 Oct 2015 16:23:00 +0800
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.3.0



On 10/31/2015 01:06 AM, Eric Blake wrote:
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.


Really good lesson for me!


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.


Thanks for your sharing and review, Eric!



reply via email to

[Prev in Thread] Current Thread [Next in Thread]