func (p *VirStoragePool) Create(flags uint32) error { result := C.virStoragePoolCreate(p.ptr, C.uint(flags)) if result == -1 { return errors.New(GetLastError()) } return nil }
func (p *VirStoragePool) Create() error { result := C.virStoragePoolCreate(p.ptr, 0) if result < 0 { return errors.New(GetLastError()) } return nil }
// Create starts an inactive storage pool. func (pool StoragePool) Create() error { pool.log.Println("creating storage pool...") cRet := C.virStoragePoolCreate(pool.virStoragePool, 0) ret := int32(cRet) if ret == -1 { err := LastError() pool.log.Printf("an error occurred: %v\n", err) return err } pool.log.Println("pool created") return nil }