]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
core/varlink-execute: skip empty mount options
authorMike Yuan <me@yhndnzj.com>
Tue, 6 Jan 2026 21:24:25 +0000 (22:24 +0100)
committerMike Yuan <me@yhndnzj.com>
Mon, 19 Jan 2026 16:35:38 +0000 (17:35 +0100)
This keeps things in line with bus_append_mount_options().

src/core/varlink-execute.c

index 6f300fa7d3d2f4f2e9b7dd6fd7e040e9d1253ddb..35ea1b1330fbcc981d3ad28c10af1f6e5bfcde6d 100644 (file)
@@ -54,7 +54,7 @@ static int json_append_mount_options(sd_json_variant **v, MountOptions *options)
                 return 0;
 
         for (PartitionDesignator j = 0; j < _PARTITION_DESIGNATOR_MAX; j++) {
-                if (!options->options[j])
+                if (isempty(options->options[j]))
                         continue;
 
                 r = sd_json_variant_append_arraybo(