file-posix.c (668f62ec621e4e2919fb7d4caa5d805764c5852d) file-posix.c (af175e85f92c870386ad74f466e29537b79611d3)
1/*
2 * Block driver for RAW files (posix)
3 *
4 * Copyright (c) 2006 Fabrice Bellard
5 *
6 * Permission is hereby granted, free of charge, to any person obtaining a copy
7 * of this software and associated documentation files (the "Software"), to deal
8 * in the Software without restriction, including without limitation the rights

--- 476 unchanged lines hidden (view full) ---

485 const char *filename = NULL;
486 const char *str;
487 BlockdevAioOptions aio, aio_default;
488 int fd, ret;
489 struct stat st;
490 OnOffAuto locking;
491
492 opts = qemu_opts_create(&raw_runtime_opts, NULL, 0, &error_abort);
1/*
2 * Block driver for RAW files (posix)
3 *
4 * Copyright (c) 2006 Fabrice Bellard
5 *
6 * Permission is hereby granted, free of charge, to any person obtaining a copy
7 * of this software and associated documentation files (the "Software"), to deal
8 * in the Software without restriction, including without limitation the rights

--- 476 unchanged lines hidden (view full) ---

485 const char *filename = NULL;
486 const char *str;
487 BlockdevAioOptions aio, aio_default;
488 int fd, ret;
489 struct stat st;
490 OnOffAuto locking;
491
492 opts = qemu_opts_create(&raw_runtime_opts, NULL, 0, &error_abort);
493 if (!qemu_opts_absorb_qdict(opts, options, &local_err)) {
494 error_propagate(errp, local_err);
493 if (!qemu_opts_absorb_qdict(opts, options, errp)) {
495 ret = -EINVAL;
496 goto fail;
497 }
498
499 filename = qemu_opt_get(opts, "filename");
500
501 ret = raw_normalize_devicepath(&filename, errp);
502 if (ret != 0) {

--- 491 unchanged lines hidden (view full) ---

994
995 s = state->bs->opaque;
996
997 state->opaque = g_new0(BDRVRawReopenState, 1);
998 rs = state->opaque;
999
1000 /* Handle options changes */
1001 opts = qemu_opts_create(&raw_runtime_opts, NULL, 0, &error_abort);
494 ret = -EINVAL;
495 goto fail;
496 }
497
498 filename = qemu_opt_get(opts, "filename");
499
500 ret = raw_normalize_devicepath(&filename, errp);
501 if (ret != 0) {

--- 491 unchanged lines hidden (view full) ---

993
994 s = state->bs->opaque;
995
996 state->opaque = g_new0(BDRVRawReopenState, 1);
997 rs = state->opaque;
998
999 /* Handle options changes */
1000 opts = qemu_opts_create(&raw_runtime_opts, NULL, 0, &error_abort);
1002 if (!qemu_opts_absorb_qdict(opts, state->options, &local_err)) {
1003 error_propagate(errp, local_err);
1001 if (!qemu_opts_absorb_qdict(opts, state->options, errp)) {
1004 ret = -EINVAL;
1005 goto out;
1006 }
1007
1008 rs->drop_cache = qemu_opt_get_bool_del(opts, "drop-cache", true);
1009 rs->check_cache_dropped =
1010 qemu_opt_get_bool_del(opts, "x-check-cache-dropped", false);
1011

--- 2802 unchanged lines hidden ---
1002 ret = -EINVAL;
1003 goto out;
1004 }
1005
1006 rs->drop_cache = qemu_opt_get_bool_del(opts, "drop-cache", true);
1007 rs->check_cache_dropped =
1008 qemu_opt_get_bool_del(opts, "x-check-cache-dropped", false);
1009

--- 2802 unchanged lines hidden ---