file-posix.c (49780a582d8bcedf098237f8997214c8424124be) file-posix.c (b92902dfeaafbceaf744ab7473f2d070284f6172)
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

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

2400 if (qemu_close(fd) != 0 && result == 0) {
2401 result = -errno;
2402 error_setg_errno(errp, -result, "Could not close the new file");
2403 }
2404out:
2405 return result;
2406}
2407
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

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

2400 if (qemu_close(fd) != 0 && result == 0) {
2401 result = -errno;
2402 error_setg_errno(errp, -result, "Could not close the new file");
2403 }
2404out:
2405 return result;
2406}
2407
2408static int coroutine_fn raw_co_create_opts(const char *filename, QemuOpts *opts,
2408static int coroutine_fn raw_co_create_opts(BlockDriver *drv,
2409 const char *filename,
2410 QemuOpts *opts,
2409 Error **errp)
2410{
2411 BlockdevCreateOptions options;
2412 int64_t total_size = 0;
2413 bool nocow = false;
2414 PreallocMode prealloc;
2415 char *buf = NULL;
2416 Error *local_err = NULL;

--- 1395 unchanged lines hidden ---
2411 Error **errp)
2412{
2413 BlockdevCreateOptions options;
2414 int64_t total_size = 0;
2415 bool nocow = false;
2416 PreallocMode prealloc;
2417 char *buf = NULL;
2418 Error *local_err = NULL;

--- 1395 unchanged lines hidden ---