block.c (56d1b4d21d444619302d3f1291a133b1c2b9b072) block.c (1cb6f506444ddf00bb163e5ffa28ab1051b65642)
1/*
2 * QEMU System Emulator block driver
3 *
4 * Copyright (c) 2003 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

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

884 }
885
886 /* NULL means an empty set of options */
887 if (options == NULL) {
888 options = qdict_new();
889 }
890
891 bs->open_flags &= ~BDRV_O_NO_BACKING;
1/*
2 * QEMU System Emulator block driver
3 *
4 * Copyright (c) 2003 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

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

884 }
885
886 /* NULL means an empty set of options */
887 if (options == NULL) {
888 options = qdict_new();
889 }
890
891 bs->open_flags &= ~BDRV_O_NO_BACKING;
892 if (bs->backing_file[0] == '\0' && qdict_size(options) == 0) {
892 if (qdict_haskey(options, "file.filename")) {
893 backing_filename[0] = '\0';
894 } else if (bs->backing_file[0] == '\0' && qdict_size(options) == 0) {
893 QDECREF(options);
894 return 0;
895 }
896
897 bs->backing_hd = bdrv_new("");
898 bdrv_get_full_backing_filename(bs, backing_filename,
899 sizeof(backing_filename));
900

--- 3979 unchanged lines hidden ---
895 QDECREF(options);
896 return 0;
897 }
898
899 bs->backing_hd = bdrv_new("");
900 bdrv_get_full_backing_filename(bs, backing_filename,
901 sizeof(backing_filename));
902

--- 3979 unchanged lines hidden ---