mirror of
https://github.com/checkpoint-restore/criu.git
synced 2026-08-03 23:33:01 +00:00
mnt: Strip commas from options string
Not all filesystems like it. Other than this options in the image just look cleaner. Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
This commit is contained in:
parent
0457c94c69
commit
b9c6cf3dd3
1 changed files with 14 additions and 1 deletions
15
mount.c
15
mount.c
|
|
@ -795,6 +795,19 @@ uns:
|
|||
return &fstypes[0];
|
||||
}
|
||||
|
||||
static char *strip(char *opt)
|
||||
{
|
||||
int len;
|
||||
|
||||
len = strlen(opt);
|
||||
if (len > 1 && opt[len - 1] == ',')
|
||||
opt[len - 1] = '\0';
|
||||
if (opt[0] == ',')
|
||||
opt++;
|
||||
|
||||
return opt;
|
||||
}
|
||||
|
||||
static int dump_one_mountpoint(struct mount_info *pm, int fd)
|
||||
{
|
||||
MntEntry me = MNT_ENTRY__INIT;
|
||||
|
|
@ -813,7 +826,7 @@ static int dump_one_mountpoint(struct mount_info *pm, int fd)
|
|||
me.root = pm->root;
|
||||
me.mountpoint = pm->mountpoint + 1;
|
||||
me.source = pm->source;
|
||||
me.options = pm->options;
|
||||
me.options = strip(pm->options);
|
||||
me.shared_id = pm->shared_id;
|
||||
me.has_shared_id = true;
|
||||
me.master_id = pm->master_id;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue