diff options
| author | Richard W.M. Jones <rjones@redhat.com> | 2012-04-17 15:03:02 +0100 |
|---|---|---|
| committer | Richard W.M. Jones <rjones@redhat.com> | 2012-04-17 15:03:02 +0100 |
| commit | 84d450210b3ea01de3fe26b2cf1db2b492d77aec (patch) | |
| tree | aaeb0721f9e4eb2535c80ed1a087c9fa26c46bfe /resize | |
| parent | 8d3d5a52d2746af91f770608cce5f47462f33aba (diff) | |
| download | libguestfs-84d450210b3ea01de3fe26b2cf1db2b492d77aec.tar.gz libguestfs-84d450210b3ea01de3fe26b2cf1db2b492d77aec.tar.xz libguestfs-84d450210b3ea01de3fe26b2cf1db2b492d77aec.zip | |
resize, sparsify: Add a simple-minded check to stop indisk = outdisk.
Diffstat (limited to 'resize')
| -rw-r--r-- | resize/resize.ml | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/resize/resize.ml b/resize/resize.ml index 407d80f3..95bc774a 100644 --- a/resize/resize.ml +++ b/resize/resize.ml @@ -187,6 +187,12 @@ read the man page virt-resize(1). | _ -> error "usage is: %s [--options] indisk outdisk" prog in + (* Simple-minded check that the user isn't trying to use the + * same disk for input and output. + *) + if infile = outfile then + error "you cannot use the same disk image for input and output"; + infile, outfile, align_first, alignment, copy_boot_loader, debug, debug_gc, deletes, dryrun, expand, expand_content, extra_partition, format, ignores, |
