X-Git-Url: http://git.ozlabs.org/?p=petitboot;a=blobdiff_plain;f=discover%2Fdevice-handler.c;h=4f7a7b7500c4fee446747df10861095d30b2ce33;hp=31cbcc2c1da50b87b9b5bf472227ebe2ce8559ab;hb=acc5ace6e58db2f3dceb1f7a27d0fc1fb29c4a27;hpb=79bfd11f662fcf46bd4ae58a0aab993cbe158dbe diff --git a/discover/device-handler.c b/discover/device-handler.c index 31cbcc2..4f7a7b7 100644 --- a/discover/device-handler.c +++ b/discover/device-handler.c @@ -1391,10 +1391,15 @@ static int umount_device(struct discover_device *dev) int device_request_write(struct discover_device *dev, bool *release) { const char *fstype, *device_path; + const struct config *config; int rc; *release = false; + config = config_get(); + if (!config->allow_writes) + return -1; + if (!dev->mounted) return -1;