Re: [PATCH] virsh: Ensure the parents of the readline history path exists

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

 



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

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list



[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]