if (store == BACKING_STORE_ERROR)
goto cleanup;
- meta->backingStoreIsFile = false;
if (backing != NULL) {
if (VIR_STRDUP(meta->backingStore, backing) < 0) {
VIR_FREE(backing);
goto cleanup;
}
if (virStorageIsFile(backing)) {
- meta->backingStoreIsFile = true;
meta->backingStoreRaw = meta->backingStore;
meta->backingStore = NULL;
if (virFindBackingFile(directory, backing,
/* the backing file is (currently) unavailable, treat this
* file as standalone:
* backingStoreRaw is kept to mark broken image chains */
- meta->backingStoreIsFile = false;
backingFormat = VIR_STORAGE_FILE_NONE;
VIR_WARN("Backing file '%s' of image '%s' is missing.",
meta->backingStoreRaw, path);
} else if (STREQ_NULLABLE(name, owner->backingStoreRaw) ||
STREQ(name, owner->backingStore)) {
break;
- } else if (owner->backingStoreIsFile) {
+ } else if (virStorageIsFile(owner->backingStore)) {
char *absName = NULL;
if (virFindBackingFile(owner->directory, name,
NULL, &absName) < 0)
const char *expBackingDirRel;
const char *expBackingDirAbs;
enum virStorageFileFormat expBackingFormat;
- bool expIsFile;
unsigned long long expCapacity;
bool expEncrypted;
const char *pathRel;
expRelDir = isAbs ? data->files[i]->relDirAbs
: data->files[i]->relDirRel;
if (virAsprintf(&expect,
- "store:%s\nraw:%s\ndirectory:%s\nother:%d %d %lld %d\n"
+ "store:%s\nraw:%s\ndirectory:%s\nother:%d %lld %d\n"
"path:%s\ncanon:%s\nrelDir:%s\ntype:%d %d\n",
NULLSTR(data->files[i]->expBackingStore),
NULLSTR(data->files[i]->expBackingStoreRaw),
NULLSTR(expBackingDirectory),
data->files[i]->expBackingFormat,
- data->files[i]->expIsFile,
data->files[i]->expCapacity,
data->files[i]->expEncrypted,
NULLSTR(expPath),
data->files[i]->type,
data->files[i]->format) < 0 ||
virAsprintf(&actual,
- "store:%s\nraw:%s\ndirectory:%s\nother:%d %d %lld %d\n"
+ "store:%s\nraw:%s\ndirectory:%s\nother:%d %lld %d\n"
"path:%s\ncanon:%s\nrelDir:%s\ntype:%d %d\n",
NULLSTR(elt->backingStore),
NULLSTR(elt->backingStoreRaw),
NULLSTR(elt->directory),
- elt->backingStoreFormat, elt->backingStoreIsFile,
+ elt->backingStoreFormat,
elt->capacity, !!elt->encryption,
NULLSTR(elt->path),
NULLSTR(elt->canonPath),
.expBackingDirRel = ".",
.expBackingDirAbs = datadir,
.expBackingFormat = VIR_STORAGE_FILE_RAW,
- .expIsFile = true,
.expCapacity = 1024,
.pathRel = "qcow2",
.pathAbs = canonqcow2,
.expBackingDirRel = datadir,
.expBackingDirAbs = datadir,
.expBackingFormat = VIR_STORAGE_FILE_QCOW2,
- .expIsFile = true,
.expCapacity = 1024,
.pathRel = "wrap",
.pathAbs = abswrap,
.expBackingDirRel = datadir,
.expBackingDirAbs = datadir,
.expBackingFormat = VIR_STORAGE_FILE_RAW,
- .expIsFile = true,
.expCapacity = 1024,
.pathRel = "wrap",
.pathAbs = abswrap,
qcow2.expBackingStore = NULL;
qcow2.expBackingStoreRaw = datadir "/bogus";
qcow2.expBackingFormat = VIR_STORAGE_FILE_NONE;
- qcow2.expIsFile = false;
qcow2.pathRel = "qcow2";
qcow2.relDirRel = ".";
.expBackingDirRel = datadir,
.expBackingDirAbs = datadir,
.expBackingFormat = VIR_STORAGE_FILE_RAW,
- .expIsFile = true,
.expCapacity = 1024,
.pathRel = "qed",
.pathAbs = absqed,
.expBackingDirRel = "sub/../sub/..",
.expBackingDirAbs = datadir "/sub/../sub/..",
.expBackingFormat = VIR_STORAGE_FILE_RAW,
- .expIsFile = true,
.expCapacity = 1024,
.pathRel = "../sub/link1",
.pathAbs = "../sub/link1",
.expBackingDirRel = "sub/../sub",
.expBackingDirAbs = datadir "/sub/../sub",
.expBackingFormat = VIR_STORAGE_FILE_QCOW2,
- .expIsFile = true,
.expCapacity = 1024,
.pathRel = "sub/link2",
.pathAbs = abslink2,
qcow2.expBackingDirRel = ".";
qcow2.expBackingDirAbs = datadir;
qcow2.expBackingFormat= VIR_STORAGE_FILE_NONE;
- qcow2.expIsFile = true;
/* Behavior of an infinite loop chain */
TEST_CHAIN(16, "qcow2", absqcow2, VIR_STORAGE_FILE_QCOW2,