[Libguestfs] RFC: copy-attributes command

Pino Toscano
2014-01-07T15:06:43Z

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