
On 2012年07月10日 21:04, Eric Blake wrote:
On 07/10/2012 05:33 AM, Osier Yang wrote:
Instead of changing the existed virFileMakePath to accept mode argument and modifying a pile of its uses, this patch introduces virFileMakePathWithMode, and use it instead of mkdir() to create the readline history dir. --- src/libvirt_private.syms | 1 + src/util/util.c | 15 +++++++++++---- src/util/util.h | 2 ++ tools/virsh.c | 3 ++- 4 files changed, 16 insertions(+), 5 deletions(-)
Does this always do the right thing? Remember, 'mkdir -p a/b/c' has the ability to create parent directories 'a' and 'a/b' with a different mode than the final directory 'a/b/c'; it is often the case that you want the parent directories to have more permissions than the final child.
Oh, right. But looks like we don't have the requirement to set different mode for each parents yet. I pushed the patch, thanks for the reviewing! Regards, Osier