mirror of
https://github.com/opnsense/src.git
synced 2026-06-09 08:43:19 -04:00
makefs: Handle missing link keyword in mtree spec
PR: 241178
Reviewed by: emaste
Pull Request: https://github.com/freebsd/freebsd-src/pull/850
(cherry picked from commit d26c1a0f8b)
This commit is contained in:
parent
cba7b3b956
commit
be31bd5989
1 changed files with 4 additions and 1 deletions
|
|
@ -740,7 +740,10 @@ read_mtree_keywords(FILE *fp, fsnode *node)
|
|||
type = S_IFREG;
|
||||
} else if (node->type != 0) {
|
||||
type = node->type;
|
||||
if (type == S_IFREG) {
|
||||
if (type == S_IFLNK && node->symlink == NULL) {
|
||||
mtree_error("%s: link type requires link keyword", node->name);
|
||||
return (0);
|
||||
} else if (type == S_IFREG) {
|
||||
/* the named path is the default contents */
|
||||
node->contents = mtree_file_path(node);
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue