*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301 USA
*/
#include <qemu-common.h>
#define NBD_BUFFER_SIZE (1024*1024)
-int verbose;
+static int verbose;
static void usage(const char *name)
{
char *device = NULL;
char *socket = NULL;
char sockpath[128];
- const char *sopt = "hVbo:p:rsnP:c:dvk:e:t";
+ const char *sopt = "hVb:o:p:rsnP:c:dvk:e:t";
struct option lopt[] = {
{ "help", 0, 0, 'h' },
{ "version", 0, 0, 'V' },
flags |= BDRV_O_SNAPSHOT;
break;
case 'n':
- flags |= BDRV_O_DIRECT;
+ flags |= BDRV_O_NOCACHE;
break;
case 'b':
bindto = optarg;
}
sharing_fds = qemu_malloc((shared + 1) * sizeof(int));
- if (sharing_fds == NULL)
- errx(ENOMEM, "Cannot allocate sharing fds");
if (socket) {
sharing_fds[0] = unix_socket_incoming(socket);