/*
* storage_backend.c: internal storage driver backend contract
*
- * Copyright (C) 2007-2008 Red Hat, Inc.
+ * Copyright (C) 2007-2009 Red Hat, Inc.
* Copyright (C) 2007-2008 Daniel P. Berrange
*
* This library is free software; you can redistribute it and/or
#include "util.h"
#include "memory.h"
#include "node_device.h"
+#include "internal.h"
#include "storage_backend.h"
TOOL_QCOW_CREATE,
};
-static int
+static int ATTRIBUTE_NONNULL (3)
virStorageBackendCopyToFD(virConnectPtr conn,
virStorageVolDefPtr vol,
virStorageVolDefPtr inputvol,
char zerobuf[512];
char *buf = NULL;
- if (inputvol) {
- if ((inputfd = open(inputvol->target.path, O_RDONLY)) < 0) {
- virReportSystemError(conn, errno,
- _("could not open input path '%s'"),
- inputvol->target.path);
- goto cleanup;
- }
+ if ((inputfd = open(inputvol->target.path, O_RDONLY)) < 0) {
+ virReportSystemError(conn, errno,
+ _("could not open input path '%s'"),
+ inputvol->target.path);
+ goto cleanup;
}
bzero(&zerobuf, sizeof(zerobuf));