[Libguestfs] RFC: copy-attributes command

Pino Toscano ptoscano at redhat.com
Tue Jan 7 15:06:43 UTC 2014


Hi,

attached there is a prototype of patch for adding a new copy-attributes 
command. Such command would allow copy the attributes of a "file" to 
another, so for example in guestfish:
  copy-attributes foo bar permissions:true xattributes:false
would only copy the permissions of foo to bar, not copying its extended 
attributes too.

Just few notes:
- my first daemon command, so possibly I could be missing something
- copy_xattrs is in xattr.c to avoid spreading the usage of xattr API in
  many places
- copy_xattrs does a bit of code repetition with other stuff in xattr.c,
  but I'm not sure how to avoid it without making the xattr listing code
  (getxattrs) a bit more complex that what it is already

Comments?

-- 
Pino Toscano
-------------- next part --------------
A non-text attachment was scrubbed...
Name: copy-attributes.diff
Type: text/x-patch
Size: 8139 bytes
Desc: not available
URL: <http://listman.redhat.com/archives/libguestfs/attachments/20140107/70e60b00/attachment.bin>


More information about the Libguestfs mailing list