]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
discover-image: update Image.read_only flag in image_read_only()
authorYu Watanabe <watanabe.yu+github@gmail.com>
Fri, 17 May 2024 20:10:42 +0000 (05:10 +0900)
committerYu Watanabe <watanabe.yu+github@gmail.com>
Sun, 19 May 2024 16:03:14 +0000 (01:03 +0900)
Otherwise, ReadOnly DBus property in org.freedesktop.machine1.Image or
org.freedesktop.portable1.Image will not be updated by MarkReadOnly DBus
method.

src/shared/discover-image.c

index 09bad987ad4c698eb5929a9e90fdd836bdad9274..8467815efc82ce4277c19d61058b4ab925ad74e6 100644 (file)
@@ -1287,6 +1287,7 @@ int image_read_only(Image *i, bool b) {
                 return -EOPNOTSUPP;
         }
 
+        i->read_only = b;
         return 0;
 }