mirror of
https://github.com/freebsd/freebsd-src
synced 2024-10-19 06:44:31 +00:00
When setting the mountpoint name, remember any previous setting of the
newfs flag for this partition. PR: bin/31837 Reported by: Oliver Breuninger <ob@www.partner.de>
This commit is contained in:
parent
cb505683e3
commit
a872d3c73b
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=106822
|
@ -344,6 +344,7 @@ get_mountpoint(struct chunk *old)
|
|||
{
|
||||
char *val;
|
||||
PartInfo *tmp;
|
||||
Boolean newfs;
|
||||
|
||||
if (old && old->private_data)
|
||||
tmp = old->private_data;
|
||||
|
@ -384,9 +385,13 @@ get_mountpoint(struct chunk *old)
|
|||
else if (old)
|
||||
old->flags &= ~CHUNK_IS_ROOT;
|
||||
|
||||
safe_free(tmp);
|
||||
newfs = FALSE;
|
||||
if (tmp) {
|
||||
newfs = tmp->newfs;
|
||||
safe_free(tmp);
|
||||
}
|
||||
val = string_skipwhite(string_prune(val));
|
||||
tmp = new_part(val, TRUE, 0);
|
||||
tmp = new_part(val, newfs, 0);
|
||||
if (old) {
|
||||
old->private_data = tmp;
|
||||
old->private_free = safe_free;
|
||||
|
|
|
@ -344,6 +344,7 @@ get_mountpoint(struct chunk *old)
|
|||
{
|
||||
char *val;
|
||||
PartInfo *tmp;
|
||||
Boolean newfs;
|
||||
|
||||
if (old && old->private_data)
|
||||
tmp = old->private_data;
|
||||
|
@ -384,9 +385,13 @@ get_mountpoint(struct chunk *old)
|
|||
else if (old)
|
||||
old->flags &= ~CHUNK_IS_ROOT;
|
||||
|
||||
safe_free(tmp);
|
||||
newfs = FALSE;
|
||||
if (tmp) {
|
||||
newfs = tmp->newfs;
|
||||
safe_free(tmp);
|
||||
}
|
||||
val = string_skipwhite(string_prune(val));
|
||||
tmp = new_part(val, TRUE, 0);
|
||||
tmp = new_part(val, newfs, 0);
|
||||
if (old) {
|
||||
old->private_data = tmp;
|
||||
old->private_free = safe_free;
|
||||
|
|
Loading…
Reference in a new issue