OSDN Git Service

softmmu/physmem: Bail out early in ram_block_discard_range() with readonly files
authorDavid Hildenbrand <david@redhat.com>
Wed, 6 Sep 2023 12:04:57 +0000 (14:04 +0200)
committerDavid Hildenbrand <david@redhat.com>
Tue, 19 Sep 2023 08:23:21 +0000 (10:23 +0200)
commitb2cccb52bd9bef2948a150d204b20119b6c3ad58
tree17a014e68686d5418c46a8ccf975fbc612409fb0
parent9e6b9f379130c77a08c8ea67a09fc90cb30f8d09
softmmu/physmem: Bail out early in ram_block_discard_range() with readonly files

fallocate() will fail, let's print a nicer error message.

Message-ID: <20230906120503.359863-6-david@redhat.com>
Suggested-by: Peter Xu <peterx@redhat.com>
Reviewed-by: Peter Xu <peterx@redhat.com>
Signed-off-by: David Hildenbrand <david@redhat.com>
softmmu/physmem.c