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:
John Baldwin 2002-11-12 20:26:52 +00:00
parent cb505683e3
commit a872d3c73b
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=106822
2 changed files with 14 additions and 4 deletions

View File

@ -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;

View File

@ -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;