1. 30 9月, 2009 4 次提交
    • M
      Add virStorageFileGetMetadata() helper · 295fd6e8
      Mark McLoughlin 提交于
      * src/util/storage_file.c: add virStorageFileGetMetadata() so that
        the caller does not need to open the file
      295fd6e8
    • M
      Move virStorageGetMetadataFromFD() to libvirt_util · a010fb58
      Mark McLoughlin 提交于
      Finally, we get to the point of all this.
      
      Move virStorageGetMetadataFromFD() to virStorageFileGetMetadataFromFD()
      and move to src/util/storage_file.[ch]
      
      There's no functional changes in this patch, just code movement
      
      * src/storage/storage_backend_fs.c: move code from here ...
      
      * src/util/storage_file.[ch]: ... to here
      
      * src/libvirt_private.syms: export virStorageFileGetMetadataFromFD()
      a010fb58
    • M
      Introduce virStorageFileMetadata structure · 5fede0a9
      Mark McLoughlin 提交于
      Introduce a metadata structure and make virStorageGetMetadataFromFD()
      fill it in.
      
      * src/util/storage_file.h: add virStorageFileMetadata
      
      * src/backend/storage_backend_fs.c: virStorageGetMetadataFromFD() now
        fills in the virStorageFileMetadata structure
      5fede0a9
    • M
      Move file format enum to libvirt_util · 00fd3ff4
      Mark McLoughlin 提交于
      Rename virStorageVolFormatFileSystem to virStorageFileFormat and
      move to src/util/storage_file.[ch]
      
      * src/Makefile.am: add src/util/storage_file.[ch]
      
      * src/conf/storage_conf.[ch]: move enum from here ...
      
      * src/util/storage_file.[ch]: .. to here
      
      * src/libvirt_private.syms: update To/FromString exports
      
      * src/storage/storage_backend.c, src/storage/storage_backend_fs.c,
        src/vbox/vbox_tmpl.c: update for above changes
      00fd3ff4
  2. 29 9月, 2009 2 次提交
    • D
      Fix some XPath relative node resets · 237f3bf8
      Daniel Veillard 提交于
      * src/util/xml.c: The virXPath... function take extra care to preserve
        the XPath context node (ctxt->node) but in the case of virXPathString
        and virXPathBoolean they forgot to do this on the error path. This
        patch fixes this and move all ctxt->node = relnode instuctions just
        after the xmlXPathEval() to make sure this doesn't happen if this code
        is modified.
      237f3bf8
    • M
      util.h needs libvirt.h for virConnectPtr · 25e2857c
      Mark McLoughlin 提交于
      Seems standard to include internal.h in order to pull in libvirt.h
      
      * src/util/util.h: include internal.h
      25e2857c
  3. 23 9月, 2009 1 次提交
    • C
      Introduce virStrncpy. · 03d777f3
      Chris Lalancette 提交于
      Add the virStrncpy function, which takes a dst string, source string,
      the number of bytes to copy and the number of bytes available in the
      dest string.  If the source string is too large to fit into the
      destination string, including the \0 byte, then no data is copied and
      the function returns NULL.  Otherwise, this function copies n bytes
      from source into dst, including the \0, and returns a pointer to the
      dst string.  This function is intended to replace all unsafe uses
      of strncpy in the code base, since strncpy does *not* guarantee that
      the buffer terminates with a \0.
      Signed-off-by: NChris Lalancette <clalance@redhat.com>
      03d777f3
  4. 22 9月, 2009 2 次提交
  5. 21 9月, 2009 1 次提交
    • D
      Move all shared utility files to src/util/ · 1355e055
      Daniel P. Berrange 提交于
      * src/bridge.c, src/bridge.h, src/buf.c, src/buf.h, src/cgroup.c,
        src/cgroup.h, src/conf.c, src/conf.h, src/event.c, src/event.h,
        src/hash.c, src/hash.h, src/hostusb.c, src/hostusb.h,
        src/iptables.c, src/iptables.h, src/logging.c, src/logging.h,
        src/memory.c, src/memory.h, src/pci.c, src/pci.h, src/qparams.c,
        src/qparams.h, src/stats_linux.c, src/stats_linux.h,
        src/threads-pthread.c, src/threads-pthread.h, src/threads-win32.c,
        src/threads-win32.h, src/threads.c, src/threads.h, src/util.c,
        src/util.h, src/uuid.c, src/uuid.h, src/virterror.c,
        src/virterror_internal.h, src/xml.c, src/xml.h: Move all files
        into src/util/
      * daemon/Makefile.am: Add -Isrc/util/ to build flags
      * src/Makefile.am: Add -Isrc/util/ to build flags and update for
        moved files
      * src/libvirt_private.syms: Export cgroup APIs since they're now
        in util rather than linking directly to drivers
      * src/xen/xs_internal.c: Disable bogus virEventRemoveHandle call
        when built under PROXY
      * proxy/Makefile.am: Update for changed file locations. Remove
        bogus build of event.c
      * tools/Makefile.am, tests/Makefile.am: Add -Isrc/util/ to build flags
      1355e055